Skip to content

Commit

Permalink
fixing style and schema conformance #22
Browse files Browse the repository at this point in the history
  • Loading branch information
behrisch committed Jan 10, 2024
1 parent 06127e5 commit dea3df7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
32 changes: 16 additions & 16 deletions data/xsd/tripinfo_file.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<xsd:attribute name="arrivalPosLat" use="optional" type="floatType"/>
<xsd:attribute name="arrivalSpeed" use="required" type="nonNegativeFloatTypeWithErrorValue"/>
<xsd:attribute name="duration" use="required" type="timeType"/>
<xsd:attribute name="routeLength" use="required" type="nonNegativeFloatType"/>
<xsd:attribute name="routeLength" use="required" type="nonNegativeFloatTypeWithErrorValue"/>
<xsd:attribute name="waitingTime" use="required" type="timeType"/>
<xsd:attribute name="waitingCount" use="required" type="xsd:nonNegativeInteger"/>
<xsd:attribute name="stopTime" use="required" type="timeType"/>
Expand Down Expand Up @@ -122,9 +122,9 @@

<xsd:element name="stop">
<xsd:complexType>
<xsd:attribute name="duration" use="required" type="nonNegativeFloatType"/>
<xsd:attribute name="arrival" use="required" type="nonNegativeFloatType"/>
<xsd:attribute name="arrivalPos" use="required" type="nonNegativeFloatType"/>
<xsd:attribute name="duration" use="required" type="timeTypeWithErrorValue"/>
<xsd:attribute name="arrival" use="required" type="timeTypeWithErrorValue"/>
<xsd:attribute name="arrivalPos" use="required" type="nonNegativeFloatTypeWithErrorValue"/>
<xsd:attribute name="actType" use="required" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
Expand All @@ -135,7 +135,7 @@
<xsd:attribute name="vehicle" use="required" type="xsd:string"/>
<xsd:attribute name="depart" use="required" type="timeTypeWithErrorValue"/>
<xsd:attribute name="arrival" use="required" type="timeTypeWithErrorValue"/>
<xsd:attribute name="arrivalPos" use="required" type="nonNegativeFloatType"/>
<xsd:attribute name="arrivalPos" use="required" type="nonNegativeFloatTypeWithErrorValue"/>
<xsd:attribute name="duration" use="required" type="timeTypeWithErrorValue"/>
<xsd:attribute name="routeLength" use="required" type="nonNegativeFloatTypeWithErrorValue"/>
<xsd:attribute name="timeLoss" use="required" type="timeTypeWithErrorValue"/> <!-- negative values indicate jumps -->
Expand All @@ -147,9 +147,9 @@
<xsd:attribute name="depart" use="required" type="nonNegativeFloatType"/>
<xsd:attribute name="departPos" use="required" type="nonNegativeFloatType"/>
<xsd:attribute name="arrival" use="required" type="timeTypeWithErrorValue"/>
<xsd:attribute name="arrivalPos" use="required" type="nonNegativeFloatType"/>
<xsd:attribute name="arrivalPos" use="required" type="nonNegativeFloatTypeWithErrorValue"/>
<xsd:attribute name="duration" use="required" type="timeTypeWithErrorValue"/>
<xsd:attribute name="routeLength" use="required" type="nonNegativeFloatType"/>
<xsd:attribute name="routeLength" use="required" type="nonNegativeFloatTypeWithErrorValue"/>
<xsd:attribute name="timeLoss" use="required" type="signedTimeType"/> <!-- negative values indicate jumps or shortcuts in jupedsim -->
<xsd:attribute name="maxSpeed" use="required" type="nonNegativeFloatType"/>
</xsd:complexType>
Expand All @@ -158,10 +158,10 @@
<xsd:element name="access">
<xsd:complexType>
<xsd:attribute name="stop" type="xsd:string"/>
<xsd:attribute name="depart" use="required" type="nonNegativeFloatType"/>
<xsd:attribute name="depart" use="required" type="timeTypeWithErrorValue"/>
<xsd:attribute name="arrival" use="required" type="timeTypeWithErrorValue"/>
<xsd:attribute name="duration" type="nonNegativeFloatType"/>
<xsd:attribute name="routeLength" type="nonNegativeFloatType"/>
<xsd:attribute name="duration" type="timeTypeWithErrorValue"/>
<xsd:attribute name="routeLength" type="nonNegativeFloatTypeWithErrorValue"/>
</xsd:complexType>
</xsd:element>

Expand All @@ -171,7 +171,7 @@
<xsd:attribute name="vehicle" use="required" type="xsd:string"/>
<xsd:attribute name="depart" use="required" type="timeTypeWithErrorValue"/>
<xsd:attribute name="arrival" use="required" type="timeTypeWithErrorValue"/>
<xsd:attribute name="arrivalPos" use="required" type="nonNegativeFloatType"/>
<xsd:attribute name="arrivalPos" use="required" type="nonNegativeFloatTypeWithErrorValue"/>
<xsd:attribute name="duration" use="required" type="timeTypeWithErrorValue"/>
<xsd:attribute name="routeLength" use="required" type="nonNegativeFloatTypeWithErrorValue"/>
<xsd:attribute name="timeLoss" use="required" type="timeTypeWithErrorValue"/> <!-- negative values indicate jumps -->
Expand All @@ -180,12 +180,12 @@

<xsd:element name="tranship">
<xsd:complexType>
<xsd:attribute name="depart" use="required" type="nonNegativeFloatType"/>
<xsd:attribute name="depart" use="required" type="timeTypeWithErrorValue"/>
<xsd:attribute name="departPos" use="required" type="nonNegativeFloatType"/>
<xsd:attribute name="arrival" use="required" type="nonNegativeFloatType"/>
<xsd:attribute name="arrivalPos" use="required" type="nonNegativeFloatType"/>
<xsd:attribute name="duration" use="required" type="nonNegativeFloatType"/>
<xsd:attribute name="routeLength" use="required" type="nonNegativeFloatType"/>
<xsd:attribute name="arrival" use="required" type="timeTypeWithErrorValue"/>
<xsd:attribute name="arrivalPos" use="required" type="nonNegativeFloatTypeWithErrorValue"/>
<xsd:attribute name="duration" use="required" type="timeTypeWithErrorValue"/>
<xsd:attribute name="routeLength" use="required" type="nonNegativeFloatTypeWithErrorValue"/>
<xsd:attribute name="maxSpeed" use="required" type="nonNegativeFloatType"/>
</xsd:complexType>
</xsd:element>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<!-- Vehicles, containers and containers (sorted by depart) -->
<containerFlow id="cf_0" color="red" depart="0" begin="10.00" end="3600.00" containersPerHour="1200.00">
<containerFlow id="cf_0" color="red" departPos="0" begin="10.00" end="3600.00" containersPerHour="1200.00">
<param key="KeyA1" value="valueA1"/>
<param key="KeyA3" value="valueA2"/>
<param key="KeyA2" value="valueA3"/>
<tranship from="Edge0" to="Edge2"/>
</containerFlow>
<containerFlow id="cf_1" color="blue" depart="10" begin="12.00" end="3800.00" containersPerHour="11500.00">
<containerFlow id="cf_1" color="blue" departPos="10" begin="12.00" end="3800.00" containersPerHour="11500.00">
<param key="KeyB1" value="valueB1"/>
<param key="KeyB3" value="valueB2"/>
<param key="KeyB2" value="valueB3"/>
Expand Down
5 changes: 3 additions & 2 deletions tools/createScreenshotSequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ def main(options):
listener.addTransformTarget(t, value, transform="zoom")
if options.rotate is not None:
rotateTargets = [(float(pair[:pair.index(":")]), float(pair[pair.index(":")+1:]))
for pair in options.rotate.split(";")]
for pair in options.rotate.split(";")]
for t, value in rotateTargets:
listener.addTransformTarget(t, value, transform="rotate")
if options.translate is not None:
translateTargets = [(float(pair[:pair.index(":")]), [float(c) for c in pair[pair.index(":")+1:].split(",")])
for pair in options.translate.split(";")]
for pair in options.translate.split(";")]
for t, value in translateTargets:
listener.addTransformTarget(t, value, transform="translate")
traci.addStepListener(listener)
Expand All @@ -101,6 +101,7 @@ def main(options):
t += simStep
traci.close()


class KeyFramedNumericAttribute(object):

InterpolationModes = ("linear",)
Expand Down

0 comments on commit dea3df7

Please sign in to comment.