from amplpy import AMPL

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

t = ampl.get_variable("t").value()
x = ampl.get_variable("x").value()
y = ampl.get_variable("y").value()
z = ampl.get_variable("z").value()
print("Opt. Val.=", ampl.get_objective("Ratio").value(), ", t=", t)
print("(x,y,z)=", x/t, y/t, z/t)
