3 ms·
its not so hard, if you understand how to force boolean algebra into intger form, like: x + y >= 1, where x={0,1} is a boolean OR between x, y, then it is ea
by tlarkworthy 13y ago
its not so hard,
if you understand how to force boolean algebra into intger form, like:
x + y >= 1, where x={0,1}
is a boolean OR between x, y, then it is easy to expressed in PuLP like:
x = variable("x", lowerbound=0,upperbound=1, cat='Integer')
y = variable("y", lowerbound=0,upperbound=1, cat='Integer')
problem += x + y >= 1
tada its really easy to write (once the math is defined, the modelling bit is the hard part, but it gets easier over time)