We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 620055b commit a926924Copy full SHA for a926924
1 file changed
class05/class05.jl
@@ -498,8 +498,8 @@ begin
498
@variable(cp_model, -u_max .<= u[1:N] .<= u_max, start=0)
499
500
# collocation points
501
- @variable(cp_model, -d_max .<= q_1_c[i=1:N-1] .<= d_max, start=(2*i + 1)/(2 * N) * d)
502
- @variable(cp_model, q_2_c[i=1:N-1], start=(2*i + 1)/(2 * N) * pi)
+ @variable(cp_model, -d_max .<= q_1_c[i=1:N-1] .<= d_max, start=(2*i - 1)/(2 * (N - 1)) * d)
+ @variable(cp_model, q_2_c[i=1:N-1], start=(2*i - 1)/(2 * (N - 1)) * pi)
503
@variable(cp_model, d_q_1_c[1:N-1], start=d/T)
504
@variable(cp_model, d_q_2_c[1:N-1], start=pi/T)
505
@variable(cp_model, -u_max .<= u_c[1:N-1] .<= u_max, start=0)
0 commit comments