I'm loading MPS files into SCIP via pyscipopt. I would like to convert the constraints to standard form so that I can get a consistent tableau (via getLPBInvRow
). I'm unsure on how to negate existing constraints. I was picturing something like this:
def standardize(m: scip.Model):
for c in m.getConss():
if not m.isInfinity(m.getRhs(c)):
m.addCons(-c)
m.delCons(c)
-c
doesn't work, though. What is the right way to do this?