Skip to content

Instantly share code, notes, and snippets.

@kangeugine
Created August 2, 2018 15:37
Show Gist options
  • Save kangeugine/87914cc4f866fc72fdec7e23abf84c6b to your computer and use it in GitHub Desktop.
Save kangeugine/87914cc4f866fc72fdec7e23abf84c6b to your computer and use it in GitHub Desktop.
def constraint_all(x):
test = [constraint_cost(x) >= 0,
constraint_unique(x) == 0,
constraint_gk(x) == 0,
constraint_def_3(x) >= 0,
constraint_def_5(x) >= 0,
constraint_mid_3(x) >= 0,
constraint_mid_5(x) >= 0,
constraint_str_1(x) >= 0,
constraint_str_3(x) >= 0]
return(all(test))
# if constraint_all(x) is True, all tests are passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment