Bravos-Power / pyoframe

Rapidly formulate huge optimization models
https://bravos-power.github.io/pyoframe/
MIT License
2 stars 1 forks source link

Use `Enum` instead of string literals for `vtype` #13

Closed kjartan-at-bravos closed 6 months ago

kjartan-at-bravos commented 6 months ago

For instance,

import polars as pl import pyoframe as pf m = pf.Model() m.x = pf.Variable(pl.DataFrame([1,2,3]), vtype=pf.BINARY)

staadecker commented 6 months ago

Done.

Although you'd need to do pf.VType.BINARY. (I like to do from pyoframe import ... to make the code less verbose)