Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/pyscipopt/benders.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ cdef class Benders:

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 {}
raise NotImplementedError("benderscreatesub() is a fundamental callback and should be implemented in the derived class")

def benderspresubsolve(self, solution, enfotype, checkint):
'''sets the pre subproblem solve callback of Benders decomposition '''
Expand All @@ -60,8 +59,7 @@ cdef class Benders:

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 {}
raise NotImplementedError("bendersgetvar() is a fundamental callback and should be implemented in the derived class")

# local helper functions for the interface
cdef Variable getPyVar(SCIP_VAR* var):
Expand Down
3 changes: 1 addition & 2 deletions src/pyscipopt/benderscut.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ cdef class Benderscut:
pass

def benderscutexec(self, solution, probnumber, enfotype):
print("python error in benderscutexec: this method needs to be implemented")
return {}
raise NotImplementedError("benderscutexec() is a fundamental callback and should be implemented in the derived class")

cdef SCIP_RETCODE PyBenderscutCopy (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut) noexcept with gil:
return SCIP_OKAY
Expand Down
15 changes: 5 additions & 10 deletions src/pyscipopt/conshdlr.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,19 @@ cdef class Conshdlr:

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 {}
raise NotImplementedError("consenfolp() is a fundamental callback and should be implemented in the derived class")

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 {}
raise NotImplementedError("consenforelax() is a fundamental callback and should be implemented in the derived class")

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 {}
raise NotImplementedError("consenfops() is a fundamental callback and should be implemented in the derived class")

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 {}
raise NotImplementedError("conscheck() is a fundamental callback and should be implemented in the derived class")

def consprop(self, constraints, nusefulconss, nmarkedconss, proptiming):
'''calls propagation method of constraint handler '''
Expand All @@ -89,8 +85,7 @@ cdef class Conshdlr:

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 {}
raise NotImplementedError("conslock() is a fundamental callback and should be implemented in the derived class")

def consactive(self, constraint):
'''sets activation notification method of constraint handler '''
Expand Down
3 changes: 1 addition & 2 deletions src/pyscipopt/event.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ cdef class Eventhdlr:

def eventexec(self, event):
'''calls execution method of event handler '''
print("python error in eventexec: this method needs to be implemented")
return {}
raise NotImplementedError("eventexec() is a fundamental callback and should be implemented in the derived class")


# local helper functions for the interface
Expand Down
3 changes: 1 addition & 2 deletions src/pyscipopt/heuristic.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ cdef class Heur:

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 {}
raise NotImplementedError("heurexec() is a fundamental callback and should be implemented in the derived class")



Expand Down
3 changes: 1 addition & 2 deletions src/pyscipopt/presol.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ cdef class Presol:

def presolexec(self, nrounds, presoltiming):
'''executes presolver'''
print("python error in presolexec: this method needs to be implemented")
return {}
raise NotImplementedError("presolexec() is a fundamental callback and should be implemented in the derived class")



Expand Down
6 changes: 2 additions & 4 deletions src/pyscipopt/propagator.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@ cdef class Prop:

def propexec(self, proptiming):
'''calls execution method of propagator'''
print("python error in propexec: this method needs to be implemented")
return {}
raise NotImplementedError("propexec() is a fundamental callback and should be implemented in the derived class")

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 {}
raise NotImplementedError("propresprop() is a fundamental callback and should be implemented in the derived class")



Expand Down
Loading