I want to dynamically change the parameters related to cut generation and primal heuristics depending on the state of the solving process. It doesn't give me an error when I set parameters like maxrounds after the branching on a particular node, but I can't confirm if it has made any changes to the backend processes.
Can someone confirm if changing the parameters midway the solving process will actually set those parameters to a new value for solving the problem further?
Yes, it is possible to change parameters during the search. SCIP will, for example, act on a switch of node selector priority by reordering the open nodes queue according to the new node selector's sorting strategy.
Note that in general, SCIP like other solvers does not expect that parameters are modified during the search, and weird combinations may kill the solution process.
If a certain parameter is "safe" to change during the solution process depends a bit on the particular implementation of the parameter. It should always be safe to adjust, e.g., separating/maxrounds
or other core parameters independent of a particular plugin. However, individual plugins may or may not work properly if they are enabled dynamically during the search, because they miss an initialization step.
You can have a look at src/scip/event_solvingphases.c
, which adjusts a couple of parameters by changing emphasis settings. Those parameters are certainly safe to be adjusted during the search.