@@ -54,6 +54,7 @@ function anticipative_solver(
5454)
5555 if reset_env
5656 reset! (env; reset_rng= true , seed)
57+ scenario = env. scenario
5758 end
5859
5960 @assert ! is_terminated (env)
@@ -91,14 +92,14 @@ function anticipative_solver(
9192 job_indices = 2 : nb_nodes
9293 epoch_indices = T
9394
94- @variable (model, y[i = 1 : nb_nodes, j = 1 : nb_nodes, t = epoch_indices]; binary= true )
95+ @variable (model, y[i= 1 : nb_nodes, j= 1 : nb_nodes, t= epoch_indices]; binary= true )
9596
9697 @objective (
9798 model,
9899 Max,
99100 sum (
100- - duration[i, j] * y[i, j, t] for
101- i in 1 : nb_nodes, j in 1 : nb_nodes, t in epoch_indices
101+ - duration[i, j] * y[i, j, t] for i in 1 : nb_nodes, j in 1 : nb_nodes,
102+ t in epoch_indices
102103 )
103104 )
104105
@@ -170,12 +171,14 @@ function anticipative_solver(
170171 routes = epoch_routes[i]
171172 epoch_customers = epoch_indices[i]
172173
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
174+ y_true =
175+ VSPSolution (
176+ Vector{Int}[
177+ map (idx -> findfirst (== (idx), epoch_customers), route) for
178+ route in routes
179+ ];
180+ max_index= length (epoch_customers),
181+ ). edge_matrix
179182
180183 location_indices = customer_index[epoch_customers]
181184 new_coordinates = env. instance. static_instance. coordinate[location_indices]
@@ -199,8 +202,7 @@ function anticipative_solver(
199202 is_must_dispatch[2 : end ] .= true
200203 else
201204 is_must_dispatch[2 : end ] .=
202- planning_start_time .+ epoch_duration .+ @view (new_duration[1 , 2 : end ]) .>
203- new_start_time[2 : end ]
205+ planning_start_time .+ epoch_duration .+ @view (new_duration[1 , 2 : end ]) .> new_start_time[2 : end ]
204206 end
205207 is_postponable[2 : end ] .= .! is_must_dispatch[2 : end ]
206208 # TODO : avoid code duplication with add_new_customers!
0 commit comments