Gurobi / gurobipy-pandas

Convenience wrapper for building optimization models from pandas data
https://gurobipy-pandas.readthedocs.io
Apache License 2.0
95 stars 15 forks source link

Be stricter about vtype values #92

Open simonbowly opened 1 month ago

simonbowly commented 1 month ago

Here's one that's a bit more problematic:

x = gppd.add_vars(model, df, lb="lb", ub="ub", vtype="notmytype")

whether or not "notmytype" exists as a column, this creates semi-integer variables because gurobipy is very permissive and just takes the first letter of the string ...

Originally posted by @simonbowly in https://github.com/Gurobi/gurobipy-pandas/issues/91#issuecomment-2445847812

simonbowly commented 1 month ago

We should be stricter to avoid confusion, irrespective of whether we implement #91.