To do this, I believe you need to create an event handler that gets called whenever a new feasible node is found. There are many kinds of events, see here for all the SCIP_EVENTTYPE's. For the feasible node, you would want SCIP_EVENTTYPE_NODEFEASIBLE
.
I don't know how to create custom events (like the every 10 nodes you mention), but you can always keep a tracker of the last time the parameter was changed and only execute the event handler whenever you want.
When executing this event, you then just change the parameters. Here is a sample code that should hopefully help you out:
from pyscipopt import Model, SCIP_EVENTTYPE, Eventhdlr
class changeParam(Eventhdlr):
def __init__(self, model):
self.model = model
def eventinit(self):
self.model.catchEvent(SCIP_EVENTTYPE.NODEFEASIBLE, self) # the LP/pseudo solution of the node was feasible
def eventexec(self, event):
self.model.setParams(....)
model = Model()
model.includeEventhdlr(changeParams, "Parameter changing Eventhdlr", "Event Handler for changing parameters every feasible node.")
Let me know if this helps!