Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def eventinit(self):
self.model.catchEvent(SCIP_EVENTTYPE.NODEFOCUSED, self)
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):
self.calls.append('eventexec')
assert event.getType() == SCIP_EVENTTYPE.NODEFOCUSED
node = event.getNode()
if node.getDepth() == 0:
assert node.getParent() is None
assert node.getParentBranchings() is None
return
variables, branchbounds, boundtypes = node.getParentBranchings()
assert len(variables) == 1
assert len(branchbounds) == 1
assert len(boundtypes) == 1
domain_changes = node.getDomchg()
bound_changes = domain_changes.getBoundchgs()
assert len(bound_changes) == 1
def eventinit(self):
self.model.catchEvent(SCIP_EVENTTYPE.LPSOLVED, self)
self.model.catchEvent(SCIP_EVENTTYPE.BESTSOLFOUND, self)
def eventexit(self):
self.model.dropEvent(SCIP_EVENTTYPE.LPSOLVED, self)
self.model.dropEvent(SCIP_EVENTTYPE.BESTSOLFOUND, self)
pbs.append(self.model.getPrimalbound())
tpbs.append(self.model.getSolvingTime())
dbs.append(dbs[-1])
tdbs.append(self.model.getSolvingTime())