timing table structure

timing table structure#

This table holds the list of each unique timing configuration timing_id for each signal in the model.

The signal the timing refers to is defined in signal and the identifier of the the timing among the other available for this signal is defined in timing.

The field phases identifies the number of corresponding records on Timing_Nested_Records, where object_id would be equal to this table’s timing_id.

cycle defines the total cycle time for this semaphore timing plan.

For now, offset is always equal to 0

Table Structure#

Field

Type

NULL allowed

Default Value

Foreign key

Description

timing_id*

INTEGER

NO

timing identifier

signal

INTEGER

YES

Signal(signal)

signal (Signal table) which this timing refers to

timing

INTEGER

NO

0

index of the timing (within the same signal) of the tiing

type

INTEGER

NO

0

type (TIMED, ACTUATED). Generally TIMED is used

cycle

INTEGER

NO

0

cycle time (SET by POLARIS as the sum of green + intergreens across all nested records)

offset

INTEGER

NO

0

timing offset (applied based on cycle and start_time in signal table)

phases

INTEGER

NO

0

number of phases (set by POLARIS)

(* - Primary key)

The SQL statement for table and index creation is below.

create TABLE IF NOT EXISTS "Timing" (
    "timing_id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    "signal"    INTEGER,
    "timing"    INTEGER NOT NULL DEFAULT 0,
    "type"      INTEGER NOT NULL DEFAULT 0,
    "cycle"     INTEGER NOT NULL DEFAULT 0,
    "offset"    INTEGER NOT NULL DEFAULT 0,
    "phases"    INTEGER NOT NULL DEFAULT 0,

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

CREATE INDEX IF NOT EXISTS "Timing_signal_i" ON "Timing" ("signal");
CREATE INDEX IF NOT EXISTS "Timing_timing_i" ON "Timing" ("timing");