Skip to content

Commit

Permalink
fixup! rewrite switch section
Browse files Browse the repository at this point in the history
  • Loading branch information
younesschrifi committed Nov 12, 2023
1 parent d24da17 commit eb01cc4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,6 @@ For most track sections, their `length` is proportional to what can be seen in t
#### Node

A `Node` represents a node in the infrastructure. In an OSRD simulation, a train can only move from one section of track to another if they are linked by a node.
A node can take one of two forms :

**1) Switches**

Switches can be seen as a collection of track section links, partitioned into groups. Each group represents a state of the switch. Moving from one group to another can take time, and at most one link can be ready for use at any one time.

In the real world, switches are not unique, but rather instances of existing models.

**2) Track section links**

For the moment, we have only created track sections, which are not interconnected (geospatial data is not used to deduce which tracks are connected).

Links are used to connect two track sections together, just as a weld joint would in real life. In an OSRD simulation, a train can only move from one section of track to another if they are connected by this type of node, the `link` (or by another `NodeType`).

Whether for switches or track section links, links and groups are not part of the switch itself, but of a `Node` object, which is shared by switches in the same model.


##### Node Types

Expand Down Expand Up @@ -122,7 +106,7 @@ A Point Switch only has two positions:

![point switch position diagram](svg_diagrams/PointSwitch_AtoB1.svg) ![point switch position diagram](svg_diagrams/PointSwitch_AtoB2.svg)

**2) The Cross Switch**
**2) The Crossing**

This is simply two tracks crossing each other.

Expand All @@ -140,7 +124,7 @@ Here are the two different connections this switch type has:

![Cross Switch Diagram positions](svg_diagrams/Crossing_A1toB1.svg) ![Cross Switch Diagram positions](svg_diagrams/Crossing_A2toB2.svg)

**3) The Double cross switch**
**3) The Double slip switch**

This one is more like two point switches back to back. It has four ports: *A1*, *A2*, *B1* et *B2*.

Expand All @@ -157,7 +141,23 @@ However, it has four groups, each with one connection. The four groups are repre

![Diagramme des positions de l'aiguillage de croisement double](svg_diagrams/DoubleSlipCrossing_A2toB1.svg) ![Diagramme des positions de l'aiguillage de croisement double](svg_diagrams/DoubleSlipCrossing_A2toB2.svg)

**4) Link**
**4) The Single slip switch**

This one looks more like a cross between a single needle and a crossover. It has four ports: *A1*, *A2*, *B1* and *B2*.

![Single slip switch diagram](svg_diagrams/DoubleSlipCrossing_A1toB1.svg)

Here are the three connections that can be made by this switch:

- *A1* to *B1*
- *A1* to *B2*
- *A2* to *B2*

![Diagram of the positions of the single crossing points](svg_diagrams/SingleSlipCrossing_A1toB1.svg) ![Diagram of the positions of the single crossing points](svg_diagrams/SingleSlipCrossing_A1toB2.svg)
![Diagram of the positions of the single crossing points](svg_diagrams/SingleSlipCrossing_A2toB2.svg)


**5) Link**

This one represents the link between two sections of track. It has two ports: *A* and *B*.

Expand All @@ -179,6 +179,8 @@ Most of our example's nodes are regular point switches. The path from North stat

![Track sections and points diagram](svg_diagrams/small_infra_rails_n_points.drawio.en.svg)

It is important to note that these nodes are hard-coded into the project code. Only the `extended_switch_type` added by the user will appear in the railjson.

#### Curves and slopes

`Curves` and `Slopes` are instrumental to realistic simulations. These objects are defined as a range between a `begin` and `end` offsets of one track section. If a curve / slope spans more than one track section, it has to be added to all of them.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Pour le moment, nous n'avons créé que des sections de voies, qui ne sont pas i

Les `link` sont utilisés pour connecter deux sections de voie ensemble, tout comme un joint de soudure le ferait dans la vie réelle. Dans une simulation OSRD, un train ne peut passer d'une section de voie à une autre que si elles sont reliées par ce type de noeud, le `link` (ou par un autre `NodeType`).

Que ce soit pour les aiguillages ou les liens de sections de voies, les liens et les groupes ne font pas partie du switch lui-même, mais d'un objet `Node`, qui est partagé par les aiguillages du même modèle.
Que ce soit pour les aiguillages ou les liens de sections de voies, les liens et les groupes ne font pas partie du switch lui-même, mais d'un objet `NodeType`, qui est partagé par les aiguillages du même modèle.

###### Types de Noeud

Expand Down Expand Up @@ -194,7 +194,7 @@ La plupart des noeuds de notre exemple sont des noeuds habituels. Le chemin de l

![Diagramme des sections de voie et des aiguillages](svg_diagrams/small_infra_rails_n_points.drawio.en.svg)

Il est important de noter que ces noeuds sont présents en dur dans le code du projet. Seul les `extended_switch_type` ajoutés par l'utilisateur apparaîtront dans le railjson.
Il est important de noter que ces noeuds sont présents par défaut dans le code du projet. Seuls les `extended_switch_type` ajoutés par l'utilisateur apparaîtront dans le railjson.

#### Courbes et pentes

Expand Down

0 comments on commit eb01cc4

Please sign in to comment.