Skip to content

Commit e97de4b

Browse files
authored
chore: refactor examples (#118)
Removing support for easy and incremental; unused for too long. Replacing Set with SequencedSet, for reproducibility (JSON deserialization). Replaces TSP with Flowshop in perf tests, as TSP is now effectively the same thing as VRP. Many TSP examples marked as large, on account of TSP now using list var and exposing its worst-case performance.
1 parent 241dcbd commit e97de4b

49 files changed

Lines changed: 1144 additions & 1849 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

data/flowshop/flowshop-Ta100.json

Lines changed: 856 additions & 0 deletions
Large diffs are not rendered by default.

scoredirector-benchmark.properties

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Not including this file with your benchmarks will execute all examples across all supported score director types.
22

3-
# Possible values: cs, cs_justified, easy, incremental
3+
# Possible values: cs, cs_justified
44
# Not including either will cause all examples to not be executed for that score director type.
55
# If included, example may still not be executed because it has no support for that score director type.
6-
score_director_type=cs,cs_justified,easy,incremental
6+
score_director_type=cs,cs_justified
77

8-
# Possible values: cloud_balancing, conference_scheduling, curriculum_course, examination, machine_reassignment,
9-
# meeting_scheduling, nurse_rostering, patient_admission_scheduling, task_assigning,
10-
# traveling_tournament, tsp, vehicle_routing
8+
# Possible values: cloud_balancing, conference_scheduling, curriculum_course, examination, flow_shop,
9+
# machine_reassignment, meeting_scheduling, nurse_rostering, patient_admission_scheduling,
10+
# task_assigning, traveling_tournament, vehicle_routing
1111
# Not including either will cause all score director types to not be executed for that example.
12-
example=cloud_balancing,conference_scheduling,curriculum_course,examination,machine_reassignment,meeting_scheduling,nurse_rostering,patient_admission_scheduling,task_assigning,traveling_tournament,tsp,vehicle_routing
12+
example=flow_shop,machine_reassignment,meeting_scheduling,nurse_rostering,patient_admission_scheduling,task_assigning,traveling_tournament,vehicle_routing
1313

1414
# How many forks to run each example with.
1515
# Default is 10.

src/main/java/ai/timefold/solver/benchmarks/competitive/tsplib95/TSPLIBDataset.java

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,21 @@ public enum TSPLIBDataset implements Dataset<TSPLIBDataset> {
5050
d198(15780),
5151
d493(35002),
5252
d657(48912),
53-
d1291(50801),
54-
d1655(62128),
55-
d2103(80450),
53+
d1291(50801, true, true),
54+
d1655(62128, true, true),
55+
d2103(80450, true, true),
5656
d15112(157308, true, true),
5757
d18512(64523, true, true),
5858
dantzig42(699),
59-
dsj1000(18660188),
59+
dsj1000(18660188, true, true),
6060
eil51(426),
6161
eil76(538),
6262
eil101(629),
6363
fl417(11861),
64-
fl1400(20127),
65-
fl1577(22249),
66-
fl3795(28772),
67-
fnl4461(182566),
64+
fl1400(20127, true, true),
65+
fl1577(22249, true, true),
66+
fl3795(28772, true, true),
67+
fnl4461(182566, true, true),
6868
fri26(937),
6969
ft53(6905, false),
7070
ft70(38673, false),
@@ -103,13 +103,13 @@ public enum TSPLIBDataset implements Dataset<TSPLIBDataset> {
103103
lin105(14379),
104104
lin318(42029),
105105
// linhp318(41345), // No support for FIXED_EDGES; LocalSolver has it.
106-
nrw1379(56638),
106+
nrw1379(56638, true, true),
107107
p43(5620, false),
108108
p654(34643),
109109
pa561(2763),
110110
pcb442(50778),
111-
pcb1173(56892),
112-
pcb3038(137694),
111+
pcb1173(56892, true, true),
112+
pcb3038(137694, true, true),
113113
pla7397(23260728, true, true),
114114
pla33810(66048945, true, true),
115115
pla85900(142382641, true, true),
@@ -123,8 +123,8 @@ public enum TSPLIBDataset implements Dataset<TSPLIBDataset> {
123123
pr264(49135),
124124
pr299(48191),
125125
pr439(107217),
126-
pr1002(259045),
127-
pr2392(378032),
126+
pr1002(259045, true, true),
127+
pr2392(378032, true, true),
128128
rat99(1211),
129129
rat195(2323),
130130
rat575(6773),
@@ -135,37 +135,37 @@ public enum TSPLIBDataset implements Dataset<TSPLIBDataset> {
135135
rbg443(2720, false),
136136
rd100(7910),
137137
rd400(15281),
138-
rl1304(252948),
139-
rl1323(270199),
140-
rl1889(316536),
138+
rl1304(252948, true, true),
139+
rl1323(270199, true, true),
140+
rl1889(316536, true, true),
141141
rl5915(565530, true, true),
142142
rl5934(556045, true, true),
143143
rl11849(923288, true, true),
144144
ry48p(14422, false),
145145
si175(21407),
146146
si535(48450),
147-
si1032(92650),
147+
si1032(92650, true, true),
148148
st70(675),
149149
swiss42(1273),
150150
ts225(126643),
151151
tsp225(3916),
152152
u159(42080),
153153
u574(36905),
154154
u724(41910),
155-
u1060(224094),
156-
u1432(152970),
157-
u1817(57201),
158-
u2152(64253),
159-
u2319(234256),
155+
u1060(224094, true, true),
156+
u1432(152970, true, true),
157+
u1817(57201, true, true),
158+
u2152(64253, true, true),
159+
u2319(234256, true, true),
160160
ulysses16(6859),
161161
ulysses22(7013),
162162
usa13509(19982859, true, true),
163-
vm1084(239297),
164-
vm1748(336556);
163+
vm1084(239297, true, true),
164+
vm1748(336556, true, true);
165165

166166
private final int bestKnownDistance;
167167
private final boolean symmetric;
168-
private final boolean large;
168+
private final boolean large; // Datasets over 1000 are typically marked large; one list var => 1000+ sized lists.
169169

170170
TSPLIBDataset(int bestKnownDistance) {
171171
this(bestKnownDistance, true);

src/main/java/ai/timefold/solver/benchmarks/examples/cloudbalancing/optional/score/CloudBalancingIncrementalScoreCalculator.java

Lines changed: 0 additions & 152 deletions
This file was deleted.

src/main/java/ai/timefold/solver/benchmarks/examples/cloudbalancing/optional/score/CloudBalancingMapBasedEasyScoreCalculator.java

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)