Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added cleanup region in default_pass-sct

...

The main idea is, that we have a universal model of the track segments. From these single track segments, track sections, that connect train stations are modeled and from those track sections, all final schedules for the trains should be build. On each track segment, there should be at most one train: In order to drive over a track, a train must request this track, and afterwards it must free it again (details below). If two trains request the same track section, the priority, which is derived from the train number, decides, which train gets the track section. A train must request all tracks until the next possibility to stop an wait and wait in order to avoid collisions. If the train does not get all track segments, it must free them again in order to avoid deadlocks or delays of other trains. Deadlocks might occur at the exits of all train stations, and additionally, if one train with a low priority exits the Kicking-Horse-path while another train with a higher priority sends an entry-request. It remains to be seen, if additional deadlocks occur. Deadlocks can be resolved by using a superior Mutex-Controller. 

...

Code Block
linenumberstrue
scchart Default_Pass {
  bool perm_next_Segment;
  initial state Fooprev
  --> Gleissegment with 'contact(Segment,0)';
  state Gleissegment {
    entry / 'req(next_Segment)';
    entry / 'setSignal(prevSegment, red)';
  
  initalinitial state Entry
    --> Continue with 'contact(Segment,0)' & perm_next_Segment
  
  --> Slowdown with 'contact(Segment,0)';
  
  state Slowdown {
      entry / 'setSpeed(Segment,SLOW)';
    }
    --> Waiting with 'contact(Segment,1)'
    --> Continue with perm_next_Segment;
    
  state Waiting {
      entry / 'setSpeed(Segment,BRAKE)';
    }
    --> Continue with perm_next_Segment;
  
  state Continue {
      entry / 'setSignal(Segment,green)';
      entry / 'setSpeed(Segment,full)';
      entry / 'setSpeed(nextSegment,full)';
      entry / 'setSignal(nextSegment, red)';
    }
    --> leave immediate;
    final state leave;
    region:
    initial state Entry
    --> cleanup with 'contact(Segment, 0)';
    state cleanup {
      entry / 'free(prevSegment)';
      entry / 'setSpeed(prevSegment,OFF)';
    }
    --> leavedone immediate;
    final state done;
  }
  >-> next with  final'contact(nextSegment, 0)';
  state leavenext;
}

Behaviour modeled in an SCChart (without deadlock prevention):

...