@@ -55,7 +55,7 @@ Abstract type for dynamic vehicle scheduling benchmarks.
5555# Fields
5656$TYPEDFIELDS
5757"""
58- @kwdef struct DVSPBenchmark <: AbstractDynamicBenchmark{true}
58+ @kwdef struct DynamicVehicleSchedulingBenchmark <: AbstractDynamicBenchmark{true}
5959 " todo"
6060 max_requests_per_epoch:: Int = 10
6161 " todo"
@@ -66,7 +66,7 @@ $TYPEDFIELDS
6666 two_dimensional_features:: Bool = false
6767end
6868
69- function Utils. generate_dataset (b:: DVSPBenchmark , dataset_size:: Int = 1 )
69+ function Utils. generate_dataset (b:: DynamicVehicleSchedulingBenchmark , dataset_size:: Int = 1 )
7070 (; max_requests_per_epoch, Δ_dispatch, epoch_duration) = b
7171 files = readdir (datadep " dvrptw" ; join= true )
7272 dataset_size = min (dataset_size, length (files))
@@ -82,23 +82,29 @@ function Utils.generate_dataset(b::DVSPBenchmark, dataset_size::Int=1)
8282 ]
8383end
8484
85- function Utils. generate_environment (:: DVSPBenchmark , instance:: Instance ; kwargs... )
85+ function Utils. generate_environment (
86+ :: DynamicVehicleSchedulingBenchmark , instance:: Instance ; kwargs...
87+ )
8688 return DVSPEnv (instance; kwargs... )
8789end
8890
89- function Utils. generate_maximizer (:: DVSPBenchmark )
91+ function Utils. generate_maximizer (:: DynamicVehicleSchedulingBenchmark )
9092 return LinearMaximizer (oracle; g, h)
9193end
9294
93- function Utils. generate_scenario_generator ( :: DVSPBenchmark )
94- return generate_scenario
95+ function Utils. generate_scenario (b :: DynamicVehicleSchedulingBenchmark , args ... ; kwargs ... )
96+ return Utils . generate_scenario (args ... ; kwargs ... )
9597end
9698
97- function Utils. generate_anticipative_solver (b:: DVSPBenchmark ; kwargs... )
98- return AnticipativeSolver (b. two_dimensional_features)
99+ function Utils. generate_anticipative_solution (
100+ b:: DynamicVehicleSchedulingBenchmark , args... ; kwargs...
101+ )
102+ return anticipative_solver (
103+ args... ; kwargs... , two_dimensional_features= b. two_dimensional_features
104+ )
99105end
100106
101- export DVSPBenchmark # , generate_environment # , generate_sample, generate_anticipative_solver
107+ export DynamicVehicleSchedulingBenchmark
102108export run_policy!,
103109 GreedyVSPPolicy, LazyVSPPolicy, KleopatraVSPPolicy, AnticipativeVSPPolicy
104110
0 commit comments