@@ -130,44 +130,7 @@ function anticipative_solver(
130130
131131 optimize! (model)
132132
133- # Debug infeasibility
134- if termination_status (model) == JuMP. MOI. INFEASIBLE
135- @warn " Model is infeasible! Let's debug..."
136- @info " Number of nodes: $nb_nodes "
137- @info " Number of job indices: $(length (job_indices)) "
138- @info " Epoch indices: $epoch_indices "
139- @info " Request epochs: $request_epoch "
140- @info " Start times: $start_time "
141- @info " Service times: $service_time "
142- @info " Epoch duration: $epoch_duration , Δ_dispatch: $Δ_dispatch "
143-
144- # Check if any job can be scheduled in any epoch
145- for i in job_indices
146- can_schedule = false
147- for t in epoch_indices
148- # Check release constraint
149- if t >= request_epoch[i]
150- # Check time limit constraint
151- travel_time = duration[1 , i]
152- arrival_time = (t - 1 ) * epoch_duration + Δ_dispatch + travel_time
153- if arrival_time <= start_time[i]
154- can_schedule = true
155- @info " Job $i can be scheduled in epoch $t (arrival: $arrival_time <= deadline: $(start_time[i]) )"
156- break
157- else
158- @info " Job $i cannot be scheduled in epoch $t : arrival $arrival_time > deadline $(start_time[i]) "
159- end
160- else
161- @info " Job $i cannot be scheduled in epoch $t : request epoch $(request_epoch[i]) > epoch $t "
162- end
163- end
164- if ! can_schedule
165- @warn " Job $i cannot be scheduled in any epoch! Request epoch: $(request_epoch[i]) , start time: $(start_time[i]) , travel time: $(duration[1 , i]) , release index $(customer_index[i]) "
166- @warn " Epochs available: $epoch_indices "
167- @warn " Epoch duration: $epoch_duration , Δ_dispatch: $Δ_dispatch "
168- end
169- end
170- end
133+ @assert termination_status (model) == JuMP. MOI. OPTIMAL " Anticipative MIP did not solve to optimality! (status: $(termination_status (model)) )"
171134 obj = JuMP. objective_value (model)
172135 epoch_routes = retrieve_routes_anticipative (
173136 value .(y), env, customer_index, epoch_indices
0 commit comments