@@ -92,14 +92,14 @@ function anticipative_solver(
9292 job_indices = 2 : nb_nodes
9393 epoch_indices = T
9494
95- @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 )
9696
9797 @objective (
9898 model,
9999 Max,
100100 sum (
101- - duration[i, j] * y[i, j, t] for
102- 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
103103 )
104104 )
105105
@@ -171,12 +171,14 @@ function anticipative_solver(
171171 routes = epoch_routes[i]
172172 epoch_customers = epoch_indices[i]
173173
174- y_true = VSPSolution (
175- Vector{Int}[
176- map (idx -> findfirst (== (idx), epoch_customers), route) for route in routes
177- ];
178- max_index= length (epoch_customers),
179- ). 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
180182
181183 location_indices = customer_index[epoch_customers]
182184 new_coordinates = env. instance. static_instance. coordinate[location_indices]
@@ -200,8 +202,7 @@ function anticipative_solver(
200202 is_must_dispatch[2 : end ] .= true
201203 else
202204 is_must_dispatch[2 : end ] .=
203- planning_start_time .+ epoch_duration .+ @view (new_duration[1 , 2 : end ]) .>
204- new_start_time[2 : end ]
205+ planning_start_time .+ epoch_duration .+ @view (new_duration[1 , 2 : end ]) .> new_start_time[2 : end ]
205206 end
206207 is_postponable[2 : end ] .= .! is_must_dispatch[2 : end ]
207208 # TODO : avoid code duplication with add_new_customers!
@@ -222,7 +223,7 @@ function anticipative_solver(
222223 compute_features (state, env. instance)
223224 end
224225
225- return DataSample (; instance = (; state, reward), y_true , x)
226+ return DataSample (; info = (; state, reward), y , x)
226227 end
227228
228229 return obj, dataset
0 commit comments