Skip to content

Instantly share code, notes, and snippets.

@titowoche30
Created November 19, 2019 00:14
Show Gist options
  • Select an option

  • Save titowoche30/5e6d66f14bfb7352eb70addec8b1eaaa to your computer and use it in GitHub Desktop.

Select an option

Save titowoche30/5e6d66f14bfb7352eb70addec8b1eaaa to your computer and use it in GitHub Desktop.
def rule_const2(model,N):
return sum(model.x[N,j] for j in model.M if j!=N) == 1
model.rest2 = pyEnv.Constraint(model.N,rule=rule_const2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment