coin-or / pulp

A python Linear Programming API
http://coin-or.github.io/pulp/
Other
2.1k stars 384 forks source link

Change behaviour of original bounds for Binary variables #622

Closed davidggphy closed 1 year ago

davidggphy commented 1 year ago

In Binary variables, if the inputs lowBound and upBound are the default None values, in the __init__ the self.lowBound and self.upBound are set to 0,1. But the self._lowbound_original, self._upbound_original are set to None. In the rest of the variables (Continuous, Integer) these two pairs of attributes coincide.

This is, the behaviour is equivalent to

self.lowBound = 0
self.upBound = 1
self._lowbound_original = None
self._upbound_original = None

It seems more consistent to have

self.lowBound = self._lowbound_original = 0
self.upBound = self._upbound_original  = 1

closes #620

davidggphy commented 1 year ago

Looks like this behaviour breaks something, but just in the macOS version 3.10.