informatiCup / informatiCup2022

Abfahrt! Der InformatiCup 2022
23 stars 3 forks source link

Fix incorrect error message #29

Closed cbl closed 2 years ago

cbl commented 2 years ago

Checking the following example input and output returns the error message: passengers - 5 - passenger (P1): boarding not possible at T1 although there is no boarding move at 5. Seems to me that it is wrong to check if boarding can be made to a train when the move is Detrain.

input

[Stations]
S1 1
S2 1

[Lines]
L1 S1 S2 1 1

[Trains]
T1 S1 0.333333333333333333333333333 1

[Passengers]
P1 S1 S2 1 6

output

[Train:T1]
2 Depart L1

[Passenger:P1]
1 Board T1
5 Detrain
Top-Ranger commented 2 years ago

Hey,

although I agree that the wording might not be optional ('boarding not possible' here means the whole process of borarding - so the Board and the Detrain action combind), the check absolutely has to stay in as otherwise illegal moves would be allowed:

Dabei ist zu beachten, dass bei einem Zug in der Abfahrts- und Ankunftsrunde keine Passagiere einsteigen oder aussteigen können.

I'll improve the wording of the error message, however, I can not accept this patch since it removes an essential rule check.