coin-or / pulp

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

[wrong] Change behaviour of original bounds for Binary variables #621

Closed davidggphy closed 1 year ago

davidggphy commented 1 year ago

DONE CORRECTLY IN #622

In Binary variables, if the inputs lowBound and upBound are the default None values, in the init the bound attributes 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

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