Last active
September 5, 2022 19:54
-
-
Save francoisstamant/a16fcb6f5d048e7e713a6e253e55d79f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from gurobipy import * | |
#Initialize the problem | |
my_list = ['work','errands','gym', 'yoga', 'gaming', 'netflix', 'beer_friends', 'restaurant', 'golf', 'piano'] | |
#Weekly values | |
cost_dollars = [1, 1, 1, 15, 5, 1, 15, 15, 30, 1] | |
pleasure = [4, 1, 1, 6, 8, 7, 10, 9, 9, 7] | |
wellbeing = [8, 9, 10, 9, 3, 3, 2, 3, 7, 7] | |
minimum_time = [35, 1, 3, 0, 0, 0, 0, 0, 0, 0] | |
maximum_time = [45, 2, 7, 5, 15, 15, 15, 7, 15, 10] | |
total_budget = 350 | |
total_hours = 100 | |
N = len(my_list) | |
knapsack_model = Model('knapsack') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment