phasing table structure

phasing table structure#

Each record on this table corresponds to a full semaphore phase detailed on Phasing_Nested_Records. the field signal associates the phasing plan with a physical signalized intersection, while the field phasing groups phase into a single phasing plan, with the field phase dictating their order and the field movements representing a simple count of the movements allowed in that semaphore phase.

The phasing_id field in this table is defined as 100 * node_id + 10 * period index + phase_index

Table Structure#

Field

Type

NULL allowed

Default Value

Foreign key

Description

phasing_id*

INTEGER

NO

phashing identifier

signal

INTEGER

YES

Signal(signal)

signal (from table signal) that this semaphore phase refers to

phasing

INTEGER

NO

0

index of phasing configuration

phase

INTEGER

NO

0

phase within the phase configuration

movements

INTEGER

NO

0

number of movements within the phase (set by POLARIS)

(* - Primary key)

The SQL statement for table and index creation is below.

create TABLE IF NOT EXISTS "Phasing" (
    "phasing_id"    INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    "signal"        INTEGER,
    "phasing"       INTEGER NOT NULL DEFAULT 0,
    "phase"         INTEGER NOT NULL DEFAULT 0,
    "movements"     INTEGER NOT NULL DEFAULT 0,

    CONSTRAINT "signal_fk" FOREIGN KEY("signal") REFERENCES "Signal"("signal") ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
);


create INDEX IF NOT EXISTS "Phasing_signal_i" ON "Phasing" ("signal");
create INDEX IF NOT EXISTS "Phasing_timing_i" ON "Phasing" ("phasing");