BoundsError when re-solving a model

Since I modify model p at every iteration(I add a cut-off constraint which is modified over the course of the heuristic), I wanted to have a different copy of the model. And since I had trouble doing this, I used deepcopy. Is there another way around this problem?

For now, I’ve settled with re-building the problem at each iteration by calling createproblem but I’m worried if model building would consume a lot of time for larger problem instances