How can I force initial conditions for optimal control problem in Gekko?
Solution 1:
Okay looks like it was a simple fix. I realized that where I define the first state, radius, I was using a m.param() to define the variable. So I changed
rad = m.Var(value= Re) # radius, m
to
rad = m.Var(value= 6371203.92+79248) # radius, m
which now yields the right initial conditions: