Optimization, Operations Research, Python, Data Science, Editors Pick.
sum(model.y[:]) model.obj = pyo.Objective(rule=obj) And our model is ready to be solved! To do that I’m using the HiGHS persistent solver, which is available in pyomo in case highspy is also installed in your Python environment. solver = pyo.SolverFactory("appsi_highs")