Skip to content

Instantly share code, notes, and snippets.

@francoisstamant
Created September 5, 2022 19:56
Show Gist options
  • Save francoisstamant/e60001b84a30421339448f59290ec24b to your computer and use it in GitHub Desktop.
Save francoisstamant/e60001b84a30421339448f59290ec24b to your computer and use it in GitHub Desktop.
knapsack_model.optimize()
#Get list of values
for i in range(len(my_list)):
print('%s: %g' % (my_list[i], knapsack_model.getVars()[i].x))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment