@@ -91,14 +91,14 @@ function anticipative_solver(
9191 job_indices = 2 : nb_nodes
9292 epoch_indices = T
9393
94- @variable (model, y[i= 1 : nb_nodes, j= 1 : nb_nodes, t= epoch_indices]; binary= true )
94+ @variable (model, y[i = 1 : nb_nodes, j = 1 : nb_nodes, t = epoch_indices]; binary= true )
9595
9696 @objective (
9797 model,
9898 Max,
9999 sum (
100- - duration[i, j] * y[i, j, t] for i in 1 : nb_nodes, j in 1 : nb_nodes,
101- t in epoch_indices
100+ - duration[i, j] * y[i, j, t] for
101+ i in 1 : nb_nodes, j in 1 : nb_nodes, t in epoch_indices
102102 )
103103 )
104104
@@ -170,14 +170,12 @@ function anticipative_solver(
170170 routes = epoch_routes[i]
171171 epoch_customers = epoch_indices[i]
172172
173- y_true =
174- VSPSolution (
175- Vector{Int}[
176- map (idx -> findfirst (== (idx), epoch_customers), route) for
177- route in routes
178- ];
179- max_index= length (epoch_customers),
180- ). edge_matrix
173+ y_true = VSPSolution (
174+ Vector{Int}[
175+ map (idx -> findfirst (== (idx), epoch_customers), route) for route in routes
176+ ];
177+ max_index= length (epoch_customers),
178+ ). edge_matrix
181179
182180 location_indices = customer_index[epoch_customers]
183181 new_coordinates = env. instance. static_instance. coordinate[location_indices]
@@ -201,7 +199,8 @@ function anticipative_solver(
201199 is_must_dispatch[2 : end ] .= true
202200 else
203201 is_must_dispatch[2 : end ] .=
204- planning_start_time .+ epoch_duration .+ @view (new_duration[1 , 2 : end ]) .> new_start_time[2 : end ]
202+ planning_start_time .+ epoch_duration .+ @view (new_duration[1 , 2 : end ]) .>
203+ new_start_time[2 : end ]
205204 end
206205 is_postponable[2 : end ] .= .! is_must_dispatch[2 : end ]
207206 # TODO : avoid code duplication with add_new_customers!
0 commit comments