Closed rluce closed 1 year ago
A good example where this would help users fail fast-and-early in modelling is time-period based models which require correct alignment via pd.Dataframe.shift
. We don't want the API trying to guess what's going on, we should expect an exact alignment.
Secondly, users can modify a subset of variables by slicing them out, rather than trying to align a partial index, e.g.:
x.loc[4, :].grb.Obj = 3.0
Fixed, the user must use a correctly aligned series with no missing values when setting attributes.
Fixed, the user must use a correctly aligned series with no missing values when setting attributes.
But if you had a Series
named s
with decision variables, could you do s.ub = 10
to set the upper bounds of all of the variables in the series to 10?
That should be supported, and then it's probably not right to say that you have to use a "correctly aligned series" - better to say "correctly aligned series or constant"
Yes, setting all attributes to a constant is already possible. This issue refers specifically to the case when users are assigning to attributes using a series.