I want to stop the optimization using glpk solver in Pyomo after very first iterations because after the solution is not getting better and use this value as the result of my model. How is it possible to do that in Pyomo? Setting options as mipgap or tmlim do not help at all. On the screenshot I want to stop my solver right after 1811 and use this value as the result of my objective function.
solver = SolverFactory("glpk")# solver.options["mipgap"] = 100# solver.options["tmlim"] = 2results = solver.solve(pyomo_model, options={"seed": PYOMO_SEED}, tee=True)results.write()