A width constraint is modified and commented on. Now the text in readme corresponds to the code
Code modifications:
Without loss of generality we can assign the first case to the first bin, therefore the variable bin_loc[0,0] is fixed to be equal to 1.
Since the minimum number of bins is estimated and saved in bins.lowest_num_bin, we can fix the first bins.lowest_num_binbin_on[j] variables to be equal to one. Thus we can remove bins.lowest_num_bin variables, as well as, 2 * bins.lowest_num_bin constraints.
The width constraints are now added only once
The length constraint for j=0 is not add, since it is redundant.
All the inequality constraints are changed to have be lower or equal than <= for consistency.
The order of adding the constraints is modified so that the add_discrete are added first.
Minor fixes to the example:
Readme modifications:
bins.lowest_num_bin
Code modifications:
bin_loc[0,0]
is fixed to be equal to1
.bins.lowest_num_bin
, we can fix the firstbins.lowest_num_bin
bin_on[j]
variables to be equal to one. Thus we can removebins.lowest_num_bin
variables, as well as,2 * bins.lowest_num_bin
constraints.j=0
is not add, since it is redundant.<=
for consistency.add_discrete
are added first.