Home » railML newsgroups » railml.timetable » operatingDay
Re: operatingDay [message #656 is a reply to message #652] Thu, 01 September 2005 18:01 Go to previous messageGo to previous message
martin.weichert is currently offline  martin.weichert
Messages: 1
Registered: September 2005
Junior Member
Hello,
I hope it is OK to just step into the discussion as a newcomer
with some questions about railML.

I am reacting to the message (originally by Joachim Rubröder):
>> I agree that this is a week point if you use this kind of description
instead of bitmasks.
>> But this is unfortunately the way, the daytypes are used within DB.
>>
>> It's still better than within SBB, there the 27th of December is an
afterHoliday and therefore must be a monday. ;-)
>>
>> The right order should be (strongest first):
>>
>> 1. holiday
>> 2. afterHoliday
>> 3. beforeHoliday
>> 4. afterAfterHoliday
>>
>> Regards,
>> Joachim Rubröder

Now my comments/questions:

Thus:

- X = holiday : if X is listed as a <holiday> entry
- X = afterHoliday : if X != holiday, X-1 = holiday.
- X = beforeHoliday : if X and X-1 != holiday, X+1 = holiday.
- X = afterAfterHoliday: if X and X-1 and X+1 != holiday, X-2 = holiday.
- X = regularday : if X and X-1 and X+1 and X-2 != holiday.

Do I understand this correctly?

Then the following problem remains: I cannot distinguish between
- "holiday-before-holiday" (a holiday that is followed by another
holiday), and
- "holiday-not-before-holiday" (a holiday that is followed by a
non-holiday).

Consider a timetable with a simple rule that a "free-day" (any Saturday,
Sunday
or holiday) shall be run as a Saturday if it is followed by another
free-day;
but as a Sunday if it is followed by "work-day" (any day that is not a
Saturday,
Sunday or holiday).

I try to define something like this:

<operatingPeriods>
<holidays>
<holiday holidayDate="2006-12-25" description="1st Christmas day, 2006 (a
Monday)" />
<holiday holidayDate="2006-12-26" description="2nd Christmas day, 2006 (a
Tuesday)" />
<holiday holidayDate="2007-12-25" description="1st Christmas day, 2007 (a
Tuesday)" />
<holiday holidayDate="2007-12-26" description="2nd Christmas day, 2007 (a
Wednesday)" />
<!-- and some more... -->
</holidays>

<service serviceID="free-day" description="any Saturday, Sunday or
holiday" startDate="2006-01-01" endDate="2008-01-01">
<operatingDay operatingCode="1111111" dayType="holiday"/>
<operatingDay operatingCode="0000011" dayType="afterHoliday"/>
<operatingDay operatingCode="0000011" dayType="beforeHoliday"/>
<operatingDay operatingCode="0000011" dayType="regularday"/>
</service>
<service serviceID="work-day" description="anything that is NOT a
free-day" startDate="2006-01-01" endDate="2008-01-01">
<operatingDay operatingCode="0000000" dayType="holiday"/>
<operatingDay operatingCode="1111100" dayType="afterHoliday"/>
<operatingDay operatingCode="1111100" dayType="beforeHoliday"/>
<operatingDay operatingCode="1111100" dayType="regularday"/>
</service>
<service serviceID="free-day before free-day" description="(includes
Saturdays and 1st Christmas day...)" startDate="2006-01-01"
endDate="2008-01-01">
<!-- NOTE the question marks here! -->
<operatingDay operatingCode="????11?" dayType="holiday"/>
<operatingDay operatingCode="000001?" dayType="afterHoliday"/>
<operatingDay operatingCode="0000011" dayType="beforeHoliday"/>
<operatingDay operatingCode="0000010" dayType="regularday"/>
</service>
<service serviceID="free-day before work-day" description="(includes
most Sundays and 2nd Christmas day...)" startDate="2006-01-01"
endDate="2008-01-01">
<!-- NOTE the question marks here! -->
<operatingDay operatingCode="????00?" dayType="holiday"/>
<operatingDay operatingCode="000000?" dayType="afterHoliday"/>
<operatingDay operatingCode="0000000" dayType="beforeHoliday"/>
<operatingDay operatingCode="0000001" dayType="regularday"/>
</service>
</operatingPeriods>

But I still have question marks in some places.
Both dates 2006-12-26 and 2007-12-25 are Tuesdays, and both of them
are holiday. By any definition that is based on dayType and day of week,
they will be treated the same.
Yet 2006-12-26 should fall into "free-day before work-day"
and 2007-12-25 into "free-day before free-day".
It seems that the definitions with "holiday", "beforeHoliday", etc.
cannot make this distinction. Correct?
The rules are complicated, but still not complicated enough!?

Maybe I should just skip all the <holiday> definitions and restrict
myself to only using explicit bitmasks?


- Another question about dayTypes:
If I am not interested in the dayType "afterAfterHoliday" and want to
treat
all such days as "regularday", can I define that in a simple way or do I
always have to list an element
<operatingDay ... dayType="afterAfterHoliday" />
alongside the
<operatingDay ... dayType="regularday" />
with the same operatingCode?
If I don't list "afterAfterHoliday" in the <service ...> element,
will all "afterAfterHoliday" days be excluded from that service?

Best regards,
Martin Weichert
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Correct use of arrivalDay/departureDay
Next Topic: Correct use of arrivalDay/departureDay
Goto Forum:
  


Current Time: Sat May 18 05:59:54 CEST 2024