BoundsError: attempt to access 20-element Vector{JuMP.VariableRef} at index [0]
You have:
@constraint(model, [i=1:num_time_steps, j=[1]], acceleration[j, i] == accel_Thr[i-1]*sin(angle))
Here i=1:num_time_steps, but you’re calling accel_Thr[i-1]. When i=1, this is calling accel_Thr[0], which doesn’t exist.
Perhaps you meant
@constraint(model, [i=2:num_time_steps, j=[1]], acceleration[j, i] == acceleration[j, i-1] + accel_Thr[i-1]*sin(angle[i-1]))
In no case should you use undef inside a JuMP macro.