Python PuLP Variable Constraints – How to constrain variable to discrete set of values?
Solving a schedule optimization problem where the value of my X_i’s have to be from a discrete set of values, i.e all X_i’s must be of the set {1,2,3}.
lpSum value dependent multiplier in Pulp
I am struggling to select the correct cost_coefficient that is dependent on lpSum of the decision variables. I need to compare the lpSum(binary_option[option] for option in options) against the elements in threshold. The first element which is greater than lpSum(binary_option[option] for option in options), its corresponding cost coefficient (with the same index) should be used as the multiplier for the objective function. The following is what i have so far.