@@ -93,14 +93,14 @@ function anticipative_solver(
9393 job_indices = 2 : nb_nodes
9494 epoch_indices = T
9595
96- @variable (model, y[i= 1 : nb_nodes, j= 1 : nb_nodes, t= epoch_indices]; binary= true )
96+ @variable (model, y[i = 1 : nb_nodes, j = 1 : nb_nodes, t = epoch_indices]; binary= true )
9797
9898 @objective (
9999 model,
100100 Max,
101101 sum (
102- - duration[i, j] * y[i, j, t] for i in 1 : nb_nodes, j in 1 : nb_nodes,
103- t in epoch_indices
102+ - duration[i, j] * y[i, j, t] for
103+ i in 1 : nb_nodes, j in 1 : nb_nodes, t in epoch_indices
104104 )
105105 )
106106
@@ -172,14 +172,12 @@ function anticipative_solver(
172172 routes = epoch_routes[i]
173173 epoch_customers = epoch_indices[i]
174174
175- y_true =
176- VSPSolution (
177- Vector{Int}[
178- map (idx -> findfirst (== (idx), epoch_customers), route) for
179- route in routes
180- ];
181- max_index= length (epoch_customers),
182- ). edge_matrix
175+ y_true = VSPSolution (
176+ Vector{Int}[
177+ map (idx -> findfirst (== (idx), epoch_customers), route) for route in routes
178+ ];
179+ max_index= length (epoch_customers),
180+ ). edge_matrix
183181
184182 location_indices = customer_index[epoch_customers]
185183 new_coordinates = env. instance. static_instance. coordinate[location_indices]
@@ -203,7 +201,8 @@ function anticipative_solver(
203201 is_must_dispatch[2 : end ] .= true
204202 else
205203 is_must_dispatch[2 : end ] .=
206- planning_start_time .+ epoch_duration .+ @view (new_duration[1 , 2 : end ]) .> new_start_time[2 : end ]
204+ planning_start_time .+ epoch_duration .+ @view (new_duration[1 , 2 : end ]) .>
205+ new_start_time[2 : end ]
207206 end
208207 is_postponable[2 : end ] .= .! is_must_dispatch[2 : end ]
209208 # TODO : avoid code duplication with add_new_customers!
0 commit comments