Hello,
I've looked through the model description and as far as i understand, values for 2n+1 Prob variables, m PENC, m’ PENP and PENS variable should be found. Other values will be calculated in the code, that You already have.
I think, that this problem can be solved with Genetical optimization or Particle swarm optimization, i can implement both of them in Python. You've written, that "Number of constraints can be quite high depending on m and m’ ". Could You give an example of the dimensions for (n, m, m' )? And I think, that information for time limits will be useful because all this optimization algorithms could be rather slow, and maybe we need to speed up some.
Anyway, I will be glad to work with You and will do my best to solve this problem for You.
Please, contact me if You have any questions.
best regards, Sofya