Modifying hotstart of a variable

I would like to modify the hot start of a variable. I’ve given an minimum working example below:

using JuMP, Gurobi, Ipopt

m = Model(with_optimizer(Ipopt.Optimizer))
@variable(m, x, start = 0) # hot start
@constraint(m, -x <= 0)
@constraint(m, x <= 4*pi)
@NLobjective(m, Min, sin(x))

optimize!(m) # Assume this didn't work, let's try again

@variable(m, x, start = pi) # JuMP complains about redefining variables

Obviously I could just rerun my model, but this is silly - there must be a better way of doing this?

See the docs: https://www.juliaopt.org/JuMP.jl/v0.20.0/variables/#Start-values-1

Note that

optimize!(m) # Assume this didn't work, let's try again

@variable(m, x, start = pi) # JuMP complains about redefining variables

is indeed trying to make a new variable called x. It is not updating the old variable x, hence JuMP’s complaint.