PC-Rail
Development

Home Page

Logical Model

Data Definitions

Data Values

Network Shape

Layout Display

Data Builder


John Dennis

john@pcrail.co.uk


Layout Display

The network which has been defined is mapped to the main layout window of the simulation. The positions at which objects, including Nodes, are displayed visually in the PC-Rail layout window are defined by the variables: 

  • prow - a positive value defining the object's vertical position (in pixels) from the top of layout window.
  • pcol - a positive value defining the object's horizontal position (in pixels) from the left of layout window.

For Nodes representing Points, Signals, Buffer Stops and Yard Entrances, a "label" is also displayed showing the lever number. The positions at which the labels are displayed  visually are defined by additional variables: 

  • plablrow - a positive value defining the label's vertical position (in pixels) from the top of layout window.
  • plablcol - a positive value defining the labels's horizontal position (in pixels) from the left of layout window.

Default display positions

Default display positions can be calculated for Nodes, their labels and some other objects, including Platforms and Describers. When defining Nodes, Platforms and Describers for the first time, the values of prow, pcol, plablrow and plablcol can therefore be left blank (or zero). The Data Builder software will automatically calculate the values and update the data files accordingly. Subsequently, relatively small adjustments can be made to these values by directly editing the fields, providing complete control over the precise positioning of the objects in the display.

The parameters which are used to control the default visual display of the layout are as follows:

  • r0 and c0 represent the row and  column numbers to be displayed at position (0,0) of the layout window. All other positions are diplayed relative to this position. Nodes with col < c0 will not be visible. Values of row < r0 are not generally used.
  • lyrows and lycols represent the number of rows and number of columns to be displayed in the layout window. Nodes with col > c0+lycols will not be visible. The value of lyrows is normally set to a value a little bigger than the largest node.row value.
  • The visual scaling of the display is determined by the values of the 2 variables imgsizex and imgsizey. Using a value of 3 for both variables has been found to work well.

 The default display position of a Node is then calculated as:-

  • Display row (prow) = (row - r0) x imgsizey
  • Display column (pcol) = (col - c0) x imgsizex

The default position for labels is calculated in a similar way, with adjustments to place the labels adjacent to the Nodes to which they refer.