Warm-start ignored in lexicographic optimization
Hi, everyone!
First of, thanks for the amazing solver
I think I might have stumbled upon a little bug in HiGHS' lexicographic optimization. In all my experiments, whenever I add a linear objective function with addLinearObjective, HiGHS ignores the warm-start I provide.
Settings:
Python 3.11.7 highspy 1.11.0
Code to reproduce the behaviour:
import highspy as hp
m = hp.Highs()
x = m.addVariable(0, 1)
w = m.addVariable(0, 1)
y = m.addBinary()
z = m.addBinary()
m.addConstr(x == y, name="constr")
m.addConstr(w == z, name="constr_1")
m.addConstr(y + z == 1, name="constr_2")
m.setObjective(x + w)
m.setOptionValue("presolve", "off")
m.setSolution(4, [0, 1, 2, 3], [1, 0, 1, 0])
m.run()
print("\n\n\nNow with lexicography\n\n\n")
m = hp.Highs()
x = m.addVariable(0, 1)
w = m.addVariable(0, 1)
y = m.addBinary()
z = m.addBinary()
m.addConstr(x == y, name="constr")
m.addConstr(w == z, name="constr_1")
m.addConstr(y + z == 1, name="constr_2")
objs = [hp.HighsLinearObjective() for _ in range(2)]
for i, obj in enumerate(objs):
obj.weight = 1
obj.offset = 0
obj.priority = i + 1
obj.abs_tolerance = 0
obj.rel_tolerance = 0
if i == 0:
obj.coefficients = [0, 0, 0, -1]
else:
obj.coefficients = [0, 0, -1, 0]
m.addLinearObjective(obj)
m.setOptionValue("blend_multi_objectives", "off")
m.setOptionValue("presolve", "off")
m.setSolution(4, [0, 1, 2, 3], [1, 0, 1, 0])
m.run()
With a single objective function, added to the model with setObjective, HiGHS, as expected, evaluates the warm-start provided:
In the lexicographic optimization, it doesn't matter if I call the optimization using run, solve, or minimize. It also doesn't matter whether presolve and blend_multi_objectives are on or off. In any setting, HiGHS seems to simply ignore the solution provided.
Thanks in advance!
OK thanks, I'll look at this
Closed by #2450