Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExcpectedDepartureOccupancy missing from ProductionTimetable #128

Open
ue71603 opened this issue Nov 17, 2023 · 3 comments
Open

ExcpectedDepartureOccupancy missing from ProductionTimetable #128

ue71603 opened this issue Nov 17, 2023 · 3 comments
Assignees

Comments

@ue71603
Copy link
Collaborator

ue71603 commented Nov 17, 2023

I have found ExpectedDepartureOccupancy in SIRI VM and SIRI ET. I don't see it in SIRI PT. Why not? Occupancy precalculations are often done in the planning. Was this a mistake and should I correct it in a PR?

@skinkie @Aurige @haeckerbaer

VM

<?xml version="1.0" encoding="UTF-8"?>
<!-- Example occupancy in SIRI VM (could also be SIRI ET) -->
<Siri xmlns="http://www.siri.org.uk/siri" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://www.siri.org.uk/siri ../../xsd/siri.xsd">
	<ServiceDelivery>
		<!--=======ENDPOINT ===================================== -->
		<ResponseTimestamp>2023-11-17T09:30:47-05:00</ResponseTimestamp>
		<ProducerRef>MPG_Manual</ProducerRef>
		<!--=======PAYLOAD ===================================== -->
		<Status>true</Status>
		<MoreData>false</MoreData>
		<!--=======FIRST SUBSCRIPTION======================== -->
		<VehicleMonitoringDelivery version="2.0">
			<ResponseTimestamp>2023-11-16T09:30:47-05:00</ResponseTimestamp>
			<Status>true</Status>
			<ValidUntil>2023-11-17T09:30:47-05:00</ValidUntil>
			<VehicleActivity>
				<RecordedAtTime>2023-11-16T09:30:47-05:00</RecordedAtTime>
				<ValidUntilTime>22023-11-17T09:30:47-05:00</ValidUntilTime>
				<MonitoredVehicleJourney>
					<LineRef>unknown</LineRef> <!-- slnid -->
					<DirectionRef>ch:1:Direction:H</DirectionRef> <!-- you didn't have this in the JSON, but I think it would be good, if we know this -->
					<FramedVehicleJourneyRef>
						<DataFrameRef>2023-11-16</DataFrameRef> <!-- operating day -->
						<DatedVehicleJourneyRef>ch:1:sjyid:11:11293191923919</DatedVehicleJourneyRef> <!-- not yet available -->
					</FramedVehicleJourneyRef>
					<OperatorRef>11</OperatorRef>
					<OriginRef>8504300</OriginRef>
					<OriginName>Biel/Bienne</OriginName>
					<DestinationRef>8504221</DestinationRef>
					<DestinationName>Neuchâtel</DestinationName>
					<Monitored>true</Monitored>
					<InCongestion>false</InCongestion>
					<TrainNumbers>
						<TrainNumberRef>504</TrainNumberRef>
					</TrainNumbers>
					<OnwardCalls>
						<OnwardCall> <!-- we can do it for all stops in the train. It is OnwardCall, because it is in the future -->
							<StopPointRef>8504300</StopPointRef>
							<VisitNumber>1</VisitNumber>
							<StopPointName>Biel/Bienne</StopPointName>
							<ExpectedDepartureTime>2023-11-16T05:14:00Z</ExpectedDepartureTime> <!-- Zulu time usually -->
							<ExpectedDepartureOccupancy>
								<FareClass>businessClass</FareClass> <!-- or firstClass -->
								<OccupancyLevel>fewSeatsAvailable</OccupancyLevel>
								<OccupancyPercentage>65</OccupancyPercentage>
							</ExpectedDepartureOccupancy>
							<ExpectedDepartureOccupancy>
								<FareClass>secondClass </FareClass>
								<OccupancyLevel>manySeatsAvailable</OccupancyLevel>
								<OccupancyPercentage>24</OccupancyPercentage>
							</ExpectedDepartureOccupancy>							
						</OnwardCall>
					</OnwardCalls>
				</MonitoredVehicleJourney>
			</VehicleActivity>
		</VehicleMonitoringDelivery>
	</ServiceDelivery>
</Siri> 

SIRI ET:

<?xml version="1.0" encoding="UTF-8"?>
<!-- (C) Copyright 2005-2012 CEN SIRI -->
<Siri xmlns="http://www.siri.org.uk/siri" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://www.siri.org.uk/siri ../../xsd/siri.xsd">
	<ServiceDelivery>
		<ResponseTimestamp>2023-11-16T09:30:47-05:00</ResponseTimestamp>
		<Status>true</Status>
		<EstimatedTimetableDelivery version="2.0">
			<ResponseTimestamp>2023-11-16T09:30:47-05:00</ResponseTimestamp>
			<ValidUntil>2023-11-17T09:30:47-05:00</ValidUntil>
			<EstimatedJourneyVersionFrame>
				<RecordedAtTime>2023-11-16T09:30:47-05:00</RecordedAtTime>
				<!--==journey 1========================== -->
				<EstimatedVehicleJourney>
					<LineRef>unknown</LineRef>
					<!-- slnid -->
					<DirectionRef>ch:1:Direction:H</DirectionRef>
					<!-- you didn't have this in the JSON, but I think it would be good, if we know this -->
					<FramedVehicleJourneyRef>
						<DataFrameRef>2023-11-16</DataFrameRef>
						<!-- operating day -->
						<DatedVehicleJourneyRef>ch:1:sjyid:11:11293191923919</DatedVehicleJourneyRef>
						<!-- not yet available -->
					</FramedVehicleJourneyRef>
					<OriginRef>8504300</OriginRef>
					<OriginName>Biel/Bienne</OriginName>
					<DestinationRef>8504221</DestinationRef>
					<DestinationName>Neuchâtel</DestinationName>
					<OperatorRef>11</OperatorRef>
					<TrainNumbers>
						<TrainNumberRef>504</TrainNumberRef>
					</TrainNumbers>
					<EstimatedCalls>
						<!-- CALL 1-->
						<EstimatedCall>
							<!-- we can do it for all stops in the train. It is OnwardCall, because it is in the future -->
							<StopPointRef>8504300</StopPointRef>
							<VisitNumber>1</VisitNumber>
							<StopPointName>Biel/Bienne</StopPointName>
							<ExpectedDepartureTime>2023-11-16T05:14:00Z</ExpectedDepartureTime>
							<!-- Zulu time usually -->
							<ExpectedDepartureOccupancy>
								<FareClass>businessClass</FareClass>
								<!-- or firstClass -->
								<OccupancyLevel>fewSeatsAvailable</OccupancyLevel>
								<OccupancyPercentage>65</OccupancyPercentage>
							</ExpectedDepartureOccupancy>
							<ExpectedDepartureOccupancy>
								<FareClass>secondClass </FareClass>
								<OccupancyLevel>manySeatsAvailable</OccupancyLevel>
								<OccupancyPercentage>24</OccupancyPercentage>
							</ExpectedDepartureOccupancy>
						</EstimatedCall>
						<EstimatedCall>
							<!--at least two stops needed. The last one does not have an Occupancy -->
							<StopPointRef>8504221</StopPointRef>
							<VisitNumber>2</VisitNumber>
							<StopPointName>Neuchâtel</StopPointName>
							<AimedArrivalTime>2023-11-16T05:14:00Z</AimedArrivalTime>
							<!-- Zulu time usually -->
						</EstimatedCall>
					</EstimatedCalls>
				</EstimatedVehicleJourney>
			</EstimatedJourneyVersionFrame>
		</EstimatedTimetableDelivery>
	</ServiceDelivery>
</Siri>
@PieterGit
Copy link

Hi @ue71603 . Perhaps I'm overlooking it, but I can't find ExcpectedDepartureOccupancy on the master branch of this repo. Am I overlooking something? Can you please explain where I can find the corresponding XSD files to your examples?

@ue71603
Copy link
Collaborator Author

ue71603 commented Mar 15, 2024

@PieterGit I think you are right. As the ExpectedDepartureOccupancy is a part of the Monitored Journey it is not in PT. Perhaps this is something that should be considered in future. @Aurige @haeckerbaer . That is a reason, why we use SIRI ET even for occupancy in the future: https://www.xn--v-info-vxa.ch/sites/default/files/2024-01/occupancy_forecast_profile_ch_v0.9.pdf

@ue71603
Copy link
Collaborator Author

ue71603 commented Mar 20, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants