[base_param_table]
; global parameter of the intersection
; version: $Id: K_495.ini 2201 2008-08-07 07:16:16Z prikryl $

ssz_id = 495  ;identifikator krizovatky
spl_switch_type = 1  ;typ prepinani sig. planu [0=IT, 1=GSP]
sync_cyc_count  = 2  ;pocet cyklu na synchronizaci
gsp_offset      = 9  ;offset GSP od pocatku faze 1 
aggreg_period	= 90 ;perioda agregace dopravnich dat


[sg_log_table]
; name = type, go_color, stop_color, go_stop_color, stop_go_color, go_stop_time, stop_go_time, min_go_time, min_stop_time

VA = 0, 1, 0, 2, 0, 3, 0, 5, 3
VB = 0, 1, 0, 2, 0, 3, 0, 5, 3
VC = 0, 1, 0, 2, 0, 3, 0, 5, 3
VD = 0, 1, 0, 2, 0, 3, 0, 5, 3
VE = 0, 1, 0, 2, 0, 3, 0, 5, 3
VF = 0, 1, 0, 2, 0, 3, 0, 5, 3


[detector_log_table]
; name = type

DVA  = 0 ;0
DVB  = 0 ;1
DVA1 = 0 ;2
DVB1 = 0 ;3
DVC  = 0 ;4
DVD  = 0 ;5
DVE  = 0 ;6
DVF  = 0 ;7
DVF1 = 0 ;8
; extra detectors needed by the upper level controller
S1   = 0 ;9
S2   = 0 ;10
S3   = 0 ;11
S4   = 0 ;12
S5   = 0 ;13
S5a  = 0 ;14


[it_matrix_table]
; row_nr = sg(0), sg(1), ..., sg(n)

row_0 = -1, -1, -1,  2, -1, -1
row_1 = -1, -1, -1,  4,  5,  5
row_2 = -1, -1, -1, -1, -1,  1
row_3 =  5,  4, -1, -1, -1,  4
row_4 = -1,  3, -1, -1, -1, -1
row_5 = -1,  5,  6,  5, -1, -1


[detector_eval_table]
; det_eval_nr = det_func, neg_res, det_log_nr, sg_log_nr, occup_time, slack_time, clear_time, dem_delay, time_cond_val

det_eval_0  = 0, 0, -1, -1, -1, -1, -1, -1, -1  ; FALSE
det_eval_1  = 1, 0, -1, -1, -1, -1, -1, -1, -1  ; TRUE
det_eval_2  = 3, 0,  0,  0, -1, -1, 50,  0, -1  ; NAROK (DVA)
det_eval_3  = 3, 0,  2,  0, -1, -1, 50,  0, -1  ; NAROK (DVA1)
det_eval_4  = 3, 1,  1,  1, -1, -1, 50,  0, -1  ; neg NAROK (DVB)
det_eval_5  = 3, 1,  3,  1, -1, -1, 50,  0, -1  ; neg NAROK (DVB1)
det_eval_6  = 3, 0,  1,  1, -1, -1, 50,  0, -1  ; NAROK (DVB)
det_eval_7  = 3, 0,  3,  1, -1, -1, 50,  0, -1  ; NAROK (DVB1)
det_eval_8  = 3, 1,  7,  5, -1, -1, 50,  0, -1  ; neg NAROK (DVF)
det_eval_9  = 3, 1,  8,  5, -1, -1, 50,  0, -1  ; neg NAROK (DVF1)
det_eval_10 = 3, 0,  7,  5, -1, -1, 50,  0, -1  ; NAROK (DVF)
det_eval_11 = 3, 0,  8,  5, -1, -1, 50,  0, -1  ; NAROK (DVF1)
det_eval_12 = 6, 0,  0,  0, -1, 25, -1, -1, -1  ; PRODLUZ (DVA)
det_eval_13 = 6, 0,  2,  0, -1, 35, -1, -1, -1  ; PRODLUZ (DVA1)
det_eval_14 = 6, 0,  1,  1, -1, 25, -1, -1, -1  ; PRODLUZ (DVB)
det_eval_15 = 6, 0,  3,  1, -1, 35, -1, -1, -1  ; PRODLUZ (DVB1)
det_eval_16 = 6, 0,  7,  5, -1, 25, -1, -1, -1  ; PRODLUZ (DVF)
det_eval_17 = 6, 0,  8,  5, -1, 30, -1, -1, -1  ; PRODLUZ (DVF1)
det_eval_18 =10, 0, -1, -1, -1, -1, -1, -1, 47  ; TX == 47
det_eval_19 =14, 0, -1, -1, -1, -1, -1, -1,  5  ; TF2 >= 5
det_eval_20 =14, 0, -1, -1, -1, -1, -1, -1, 18  ; TF2 >= 18


[stage_def_table]
; stage_nr = sg_state(0), sg_state(1), ..., sg_state(n)

stage_0 = 0, 0, 1, 1, 1, 0  ;F1 = VC, VD, VE
stage_1 = 1, 0, 0, 0, 1, 1  ;F2 = VA, VE, VF
stage_2 = 1, 1, 1, 0, 0, 0  ;F3 = VA, VB, VC


[stage_trans_table]
; stg_trans_nr = duration, sg_cmd_time(0), sg_cmd_time(1), ..., sg_cmd_time(n)

stg_trans_0 = 5,  5, -1,  0,  0, -1,  4  ;F1 -> F2
stg_trans_1 = 6,  5,  4, -1,  0,  1, -1  ;F1 -> F3
stg_trans_2 = 6,  3, -1,  6,  5, -1,  0  ;F2 -> F1
stg_trans_3 = 6, -1,  5,  6, -1,  0,  0  ;F2 -> F3
stg_trans_4 = 5,  0,  0, -1,  4,  5, -1  ;F3 -> F1


[stage_trans_matrix_table]
; from_stg_nr = to_stg(0), to_stg(1), ..., to_stg(n)

from_stg_0 = -1,  0,  1
from_stg_1 =  2, -1,  3
from_stg_2 =  4, -1, -1


[frame_condition_table/0]
; and_0 = or_index(0), or_index(1), ..., or_index(8)

and_0 = 0  ;always FALSE

[frame_condition_table/1]

and_0 = 1  ;always TRUE

[frame_condition_table/2]

and_0 = 2, 3, 10, 11  ;L3..narok na F2
and_1 = 4, 5, 10, 11

[frame_condition_table/3]

and_0 = 6, 7  ;L4..narok na F3
and_1 = 8, 9

[frame_condition_table/4]

and_0 = 6, 7  ;L5..narok na F3

[frame_condition_table/5]

and_0 = 17  ;L6..ukonceno prodluzovani z F2 do F3
and_1 = 16, 19

[frame_condition_table/6]

and_0 = 17  ;L7..ukonceno prodluzovani z F2 do F1
and_1 = 13
and_2 = 16, 19
and_3 = 12, 19

[frame_condition_table/7]

and_0 = 13  ;L8..ukonceno prodluzovani z F3 do F1
and_1 = 15
and_2 = 12, 20
and_3 = 14, 20


[frame_logic_table/0]
; min = min_stage_time  (default =  0)
; max - max_stage_time  (default = -1)
; stage_param_nr = dest_stage, demand_condition, prolong_condition
min =  0
max = -1
stage_param_0 = 1, 2, 1
stage_param_1 = 2, 3, 1

[frame_logic_table/1]

min = 4
; original setting was max = 7
max = -1
stage_param_0 = 2, 4, 5
stage_param_1 = 0, 1, 6

[frame_logic_table/2]

min =  4
; original setting was max = 26
max = -1
stage_param_0 = 0, 1, 7


[signal_plan_table]
; sig_plan/index = type, cycle_time, gsp_time, tab_index

sig_plan/0 = 1, 80, 40, 0
sig_plan/1 = 0, 80, 40, 0


[fixed_plan_table/0]
; sg_nr = begin_go, end_go

sg_0 = 72, 31
sg_1 =  4, 31
sg_2 =  5, 67
sg_3 = 35, 67
sg_4 = 36, 79
sg_5 = 71, 79

[frame_plan_table/0]
; stage_nr = begin_stage, end_stage, begin_demand, end_demand, begin_prolongation, end_prolongation

stage_0 =  0, 80, 56, 12,  0,  0
stage_1 = 47, 59, 47, 48, 56, 59 
stage_2 = 47, 11, 47, 60, 57, 11 


[base_stage_table]
; row_nr = base_stage, alter_stage_1, alter_stage_2, alter_stage_3, prolongation

row_0 = 0, -1, -1, -1, 30
row_1 = 1,  2,  0, -1,  0
row_2 = 2,  0, -1, -1, 30
