from amplpy import AMPL

ampl = AMPL()
ampl.read("lo1.mod")
ampl.option["solver"] = "highs"
ampl.solve()
assert ampl.solve_result == "solved"

print("Opt. Value=", ampl.get_objective("Profit").value())
for name in ["x1", "x2", "x3"]:
    print(name, ampl.get_variable(name).value())
