Skip to content

Commit

Permalink
Predicted occupation (#605)
Browse files Browse the repository at this point in the history
* Occupancy solved for Call

* Lint and update documentation tables

* XML Spy integration

Addition of the 2 files in the XMLSpy project

* Update xsd/netex_framework/netex_reusableComponents/netex_trainElement_support.xsd

* Update xsd/netex_framework/netex_reusableComponents/netex_trainElement_support.xsd

* fixed everything discussed last week

switched to part 2
DayType added
occupancies now also as part of TimetableFrameGroup
occupancies added to JourneyGroup and JourneyPartGroup
made Occupancy a first class citizen
rebuild everything to occupancies
updates example

* fix example

* Lint and update documentation tables

* fixed all comments

- PassingTime right
- additional PassingTime example
- fixed documentation of values
- fixed example

* Lint and update documentation tables

* Update xsd/netex_part_2/part2_occupancy/netex_oc_occupancy_version.xsd

Co-authored-by: Christophe Duquesne <[email protected]>

* Update xsd/netex_part_2/part2_occupancy/netex_oc_occupancy_version.xsd

Co-authored-by: Christophe Duquesne <[email protected]>

* Update xsd/netex_part_2/part2_journeyTimes/netex_call_version.xsd

Co-authored-by: Christophe Duquesne <[email protected]>

* Update xsd/netex_part_2/part2_journeyTimes/netex_coupledJourney_version.xsd

Co-authored-by: Christophe Duquesne <[email protected]>

* Update xsd/netex_part_2/part2_journeyTimes/netex_journey_version.xsd

Co-authored-by: Christophe Duquesne <[email protected]>

* Update xsd/netex_part_2/part2_journeyTimes/netex_passingTimes_version.xsd

Co-authored-by: Christophe Duquesne <[email protected]>

* Update xsd/netex_part_2/part2_occupancy/netex_oc_occupancy_version.xsd

Co-authored-by: Christophe Duquesne <[email protected]>

* Occupancy -> OccupancyView

* added checking as well.

* fixing examples with id

* Update Netex_51.1_Occupancy.xml

* Lint and update documentation tables

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Christophe Duquesne <[email protected]>
Co-authored-by: Stefan de Konink <[email protected]>
  • Loading branch information
4 people authored Jul 25, 2024
1 parent 3465eec commit c00ccdd
Show file tree
Hide file tree
Showing 13 changed files with 1,439 additions and 1 deletion.
8 changes: 8 additions & 0 deletions NeTEx.spp
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,10 @@
<File FilePath="xsd\netex_part_2\part2_vehicleService\netex_duty_support.xsd" HomeFolder="Yes"/>
<File FilePath="xsd\netex_part_2\part2_vehicleService\netex_duty_version.xsd" HomeFolder="Yes"/>
</Folder>
<Folder FolderName="netex_part_2_OC">
<File FilePath="xsd\netex_part_2\part2_occupancy\netex_oc_occupancy_support.xsd" HomeFolder="Yes"/>
<File FilePath="xsd\netex_part_2\part2_occupancy\netex_oc_occupancy_version.xsd" HomeFolder="Yes"/>
</Folder>
</Folder>
<Folder FolderName="netex_part_3 Fares">
<Folder FolderName="netex_part_3_FM">
Expand Down Expand Up @@ -606,6 +610,10 @@
<File FilePath="xsd\netex_part_5\part5_frames\netex_nm_mobilityJourneyFrame_version.xsd" HomeFolder="Yes"/>
<File FilePath="xsd\netex_part_5\part5_frames\netex_nm_mobilityServiceFrame_version.xsd" HomeFolder="Yes"/>
</Folder>
<Folder FolderName="netec_part5_NM_OC">
<File FilePath="xsd\netex_part_5\part5_oc\netex_oc_occupancy_support.xsd" HomeFolder="Yes"/>
<File FilePath="xsd\netex_part_5\part5_oc\netex_oc_occupancy_version.xsd" HomeFolder="Yes"/>
</Folder>
<File FilePath="xsd\netex_part_5\netex_all_objects_part5_newModes.xsd" HomeFolder="Yes"/>
</Folder>
<Folder FolderName="netex_service">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,17 @@ The Calendar is shown coded as
</Arrival>
<Departure>
<Time>14:20:00.0Z</Time>
<occupancies>
<OccupancyView version="any" id="occ1">
<OccupancyLevel>fewSeatsAvailable</OccupancyLevel>
<OccupancyPercentage>40</OccupancyPercentage>
<WheelchairsOnboardCount>1</WheelchairsOnboardCount>
<GroupReservation>
<NameOfGroup>a group</NameOfGroup>
<NumberOfReservedSeats>4</NumberOfReservedSeats>
</GroupReservation>
</OccupancyView>
</occupancies>
</Departure>
</Call>
<Call version="any" id="acs:sj_24o_01_002" order="2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,14 @@ The TIMETABLE FRAME groups the servicee elements
<vehicleJourneys>
<ServiceJourney version="any" id="bbd:sj_447">
<Description>447 Amsterdam to Warsaw</Description>
<occupancies>
<OccupancyView version="any" id="occ22">
<TrainRef version="any" ref="bbd:trn_447"/>
<TrainElementRef version="any" ref="bbd:trne_447_02"/>
<FareClass>businessClass</FareClass>
<OccupancyPercentage>20</OccupancyPercentage>
</OccupancyView>
</occupancies>
<DepartureTime>09:00:00Z</DepartureTime>
<ServiceJourneyPatternRef version="any" ref="bbd:JP_447_amsterdam_warsaw"/>
<TrainRef version="any" ref="bbd:trn_447"/>
Expand Down Expand Up @@ -391,6 +399,11 @@ The TIMETABLE FRAME groups the servicee elements
<StartTime>09:00:00Z</StartTime>
<EndTime>12:00:00Z</EndTime>
<PurposeOfJourneyPartitionRef ref="bbd:coupling">coupling</PurposeOfJourneyPartitionRef>
<occupancies>
<OccupancyView version="any" id="bbd:occ:1">
<OccupancyLevel>fewSeatsAvailable</OccupancyLevel>
</OccupancyView>
</occupancies>
</JourneyPart>
<JourneyPart version="any" id="bbd:jpt_447_02">
<Description>Hannover to Berlin</Description>
Expand Down
1,062 changes: 1,062 additions & 0 deletions examples/functions/timetable/Netex_51.1_Occupancy.xml

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion xsd/NeTEx_publication.xsd

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<xsd:include schemaLocation="netex_timingPattern_version.xsd"/>
<xsd:include schemaLocation="netex_siteConnection_version.xsd"/>
<xsd:include schemaLocation="../part1_networkDescription/netex_flexibleNetwork_version.xsd"/>
<xsd:include schemaLocation="../../netex_part_2/part2_occupancy/netex_oc_occupancy_version.xsd"/>
<!-- ======================================================================= -->
<xsd:annotation>
<xsd:appinfo>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ Rail transport, Roads and Road transport
<xsd:group ref="InterchangeInFrameGroup"/>
<xsd:group ref="VehicleTypeInFrameGroup"/>
<xsd:group ref="JourneyAccountingInFrameGroup"/>
<xsd:group ref="OccupancyViewInFrameGroup"/>
</xsd:sequence>
</xsd:group>
<xsd:group name="TimetableDefaultsGroup">
Expand Down
6 changes: 6 additions & 0 deletions xsd/netex_part_2/part2_journeyTimes/netex_call_version.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<xsd:include schemaLocation="../../netex_framework/netex_reusableComponents/netex_facility_support.xsd"/>
<xsd:include schemaLocation="../../netex_part_1/part1_tacticalPlanning/netex_servicePattern_version.xsd"/>
<xsd:include schemaLocation="../../netex_part_1/part1_tacticalPlanning/netex_stopAssignment_version.xsd"/>
<xsd:include schemaLocation="../../netex_part_2/part2_occupancy/netex_oc_occupancy_version.xsd"/>
<xsd:include schemaLocation="netex_passengerAtStopTime_version.xsd"/>
<xsd:include schemaLocation="netex_interchangeRule_version.xsd"/>
<xsd:include schemaLocation="netex_passingTimes_version.xsd"/>
Expand Down Expand Up @@ -249,6 +250,11 @@ Rail transport, Roads and Road transport
</xsd:annotation>
</xsd:element>
<xsd:group ref="CallPartGroup"/>
<xsd:element name="occupancies" type="OccupancyView_RelStructure" minOccurs="0">
<xsd:annotation>
<xsd:documentation>OCCUPANCYs associated with this journey.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:group name="CallPartGroup">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<xsd:include schemaLocation="../../netex_part_1/part1_tacticalPlanning/netex_servicePattern_support.xsd"/>
<xsd:include schemaLocation="netex_vehicleService_support.xsd"/>
<xsd:include schemaLocation="../../netex_framework/netex_reusableComponents/netex_facility_version.xsd"/>
<xsd:include schemaLocation="../../netex_part_2/part2_occupancy/netex_oc_occupancy_version.xsd"/>
<!-- ======================================================================= -->
<xsd:annotation>
<xsd:appinfo>
Expand Down Expand Up @@ -202,6 +203,11 @@ of the corresponding VEHICLE TYPE. true for forward.</xsd:documentation>
<xsd:documentation>Positions in Train of JOURNEY PART.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="occupancies" type="OccupancyView_RelStructure" minOccurs="0">
<xsd:annotation>
<xsd:documentation>OCCUPANCYs associated with this journey.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="TypeOfProductCategoryRef" minOccurs="0"/>
</xsd:sequence>
</xsd:group>
Expand Down
6 changes: 6 additions & 0 deletions xsd/netex_part_2/part2_journeyTimes/netex_journey_version.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<xsd:include schemaLocation="../../netex_framework/netex_genericFramework/netex_accessibility/netex_acsb_accessibility.xsd"/>
<xsd:include schemaLocation="../../netex_framework/netex_reusableComponents/netex_noticeAssignment_version.xsd"/>
<xsd:include schemaLocation="../../netex_framework/netex_reusableComponents/netex_mode_version.xsd"/>
<xsd:include schemaLocation="../../netex_part_2/part2_occupancy/netex_oc_occupancy_version.xsd"/>
<xsd:include schemaLocation="netex_journeyAccounting_version.xsd"/>
<!-- ======================================================================= -->
<xsd:annotation>
Expand Down Expand Up @@ -132,6 +133,11 @@ Rail transport, Roads and Road transport
<xsd:documentation>NOTICEs relevant for the whole GROUP OF SERVICEs.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="occupancies" type="OccupancyView_RelStructure" minOccurs="0">
<xsd:annotation>
<xsd:documentation>OCCUPANCYs associated with this journey.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:group>
<!-- ======================================================================= -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<xsd:include schemaLocation="netex_vehicleJourney_support.xsd"/>
<xsd:include schemaLocation="netex_passingTimes_support.xsd"/>
<xsd:include schemaLocation="../../netex_part_1/part1_tacticalPlanning/netex_journeyTiming_version.xsd"/>
<xsd:include schemaLocation="../../netex_part_2/part2_occupancy/netex_oc_occupancy_version.xsd"/>
<!-- ======================================================================= -->
<!-- ==CLOSELY COUPLED ===================================================== -->
<xsd:annotation>
Expand Down Expand Up @@ -202,6 +203,11 @@ Rail transport, Roads and Road transport
<xsd:documentation>Number of days after the starting time of the journey if not same calendar day. Default is 0 for same day.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="occupancies" type="OccupancyView_RelStructure" minOccurs="0">
<xsd:annotation>
<xsd:documentation>OCCUPANCYs associated with this journey.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:group>
<!-- ======================================================================= -->
Expand Down
68 changes: 68 additions & 0 deletions xsd/netex_part_2/part2_occupancy/netex_oc_occupancy_support.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:core="http://www.govtalk.gov.uk/core" xmlns="http://www.netex.org.uk/netex" xmlns:netex="http://www.netex.org.uk/netex" targetNamespace="http://www.netex.org.uk/netex" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.2.2" id="netex_occupancy_support">
<xsd:include schemaLocation="../../netex_framework/netex_responsibility/netex_responsibility_support.xsd"/>
<!-- ======================================================================= -->
<!-- ==== INDIVIDUAL TRAVELLER ============================================ -->
<xsd:simpleType name="OccupancyEnumeration">
<xsd:annotation>
<xsd:documentation>Passenger load status of a VEHICLE - GTFS-R / TPEG Pts045</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="unknown">
<xsd:annotation>
<xsd:documentation>Unknown. Maps to TPEG Pts45_0.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="empty">
<xsd:annotation>
<xsd:documentation>The vehicle is considered empty by most measures, and has few or no passengers onboard, but is still accepting passengers. Maps to GTFS-R "EMPTY".</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="manySeatsAvailable">
<xsd:annotation>
<xsd:documentation>The vehicle has a large percentage of seats available. What percentage of free seats out of the total seats available is to be considered large enough to fall into this category is determined at the discretion of the producer. Maps to GTFS-R "MANY_SEATS_AVAILABLE" / TPEG Pts45_1, many seats available.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="fewSeatsAvailable">
<xsd:annotation>
<xsd:documentation>The vehicle has a small percentage of seats available. What percentage of free seats out of the total seats available is to be considered small enough to fall into this category is determined at the discretion of the producer. Maps to GTFS-R "FEW_SEATS_AVAILABLE" / TPEG Pts45_2, few seats available.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="standingRoomOnly">
<xsd:annotation>
<xsd:documentation>The vehicle can currently accommodate only standing passengers. Standing room only (and TPEG Pts45_3, no seats available). Maps to GTFS-R "STANDING_ROOM_ONLY" / TPEG Pts45_4.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="crushedStandingRoomOnly">
<xsd:annotation>
<xsd:documentation>The vehicle can currently accommodate only standing passengers and has limited space for them. Maps to GTFS-R "CRUSHED_STANDING_ROOM_ONLY".</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="full">
<xsd:annotation>
<xsd:documentation>Depends on the MODE and MODE OF OPERATION. In general the vehicle will be at capacity at departure. Maps to GTFS-R "FULL" / TPEG Pts45_5, full.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="notAcceptingPassengers">
<xsd:annotation>
<xsd:documentation>The vehicle cannot accept passengers. Maps to GTFS-R "NOT_ACCEPTING_PASSENGERS"</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="undefined">
<xsd:annotation>
<xsd:documentation>Undefined occupancy- Maps to TPEG Pts45_255.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="seatsAvailable">
<xsd:annotation>
<xsd:documentation>(SIRI 2.1) deprecated - use a more specific value</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="standingAvailable">
<xsd:annotation>
<xsd:documentation>(SIRI 2.1) deprecated - use a more specific value</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
Loading

0 comments on commit c00ccdd

Please sign in to comment.