Index: applications/doprava/aimsun_bdm/els3/configs/K_5_601.ini
===================================================================
--- applications/doprava/aimsun_bdm/els3/configs/K_5_601.ini (revision 817)
+++ applications/doprava/aimsun_bdm/els3/configs/K_5_601.ini (revision 817)
@@ -0,0 +1,219 @@
+[base_param_table]
+; global parameter of the intersection
+; version: $Id: K_601.ini 2201 2008-08-07 07:16:16Z prikryl $
+
+ssz_id = 601  ;identifikator krizovatky
+spl_switch_type = 1  ;typ prepinani sig. planu [0=IT, 1=GSP]
+sync_cyc_count  = 2  ;pocet cyklu na synchronizaci
+gsp_offset      = 10  ;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
+SE = 1, 1, 0,-1,-1, 0, 0, 5, 3  ; doplnkova sipka, proto volime typ "chodec"
+
+
+[detector_log_table]
+; name = type
+
+DVA  = 0  ;0
+DVAa = 0  ;1
+DVB  = 0  ;2
+DVBa = 0  ;3
+DVB1 = 0  ;4
+DVC  = 0  ;5
+DVD  = 0  ;6
+DVD1 = 0  ;7
+DSE  = 0  ;8
+DVE  = 0  ;9
+DSE1 = 0  ;10
+DVE1 = 0  ;11
+; extra detectors needed by the upper level controller
+S6   = 0  ;12
+S6a  = 0  ;13
+S7   = 0  ;14
+S8   = 0  ;15
+S9   = 0  ;16
+S9a  = 0  ;17
+
+
+[it_matrix_table]
+; row_nr = sg(0), sg(1), ..., sg(n)
+
+row_0 = -1,  9, -1,  4,  5,  5
+row_1 =  5, -1,  4,  5, -1, -1
+row_2 = -1,  4, -1, -1,  3, -1
+row_3 =  5,  4, -1, -1,  5, -1
+row_4 =  5, -1,  4,  3, -1, -1
+row_5 =  2, -1, -1, -1, -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, 1,  6,  3, -1, -1, 50,  0, -1  ; neg NAROK (DVD)
+det_eval_3  = 3, 1,  7,  3, -1, -1, 50,  0, -1  ; neg NAROK (DVD1)
+det_eval_4  = 3, 0,  2,  1, -1, -1, 50,  0, -1  ; NAROK (DVB)
+det_eval_5  = 3, 0,  3,  1, -1, -1, 50,  0, -1  ; NAROK (DVBa)
+det_eval_6  = 3, 0,  4,  1, -1, -1, 50,  0, -1  ; NAROK (DVB1)
+det_eval_7  = 3, 0,  6,  3, -1, -1, 50,  0, -1  ; NAROK (DVD)
+det_eval_8  = 3, 0,  7,  3, -1, -1, 50,  0, -1  ; NAROK (DVD1)
+det_eval_9  = 3, 0,  8,  5, -1, -1, 50,  0, -1  ; NAROK (DSE)
+det_eval_10 = 3, 0,  9,  4, -1, -1, 50,  0, -1  ; NAROK (DVE)
+det_eval_11 = 3, 0, 10,  5, -1, -1, 50,  0, -1  ; NAROK (DSE1)
+det_eval_12 = 3, 0, 11,  4, -1, -1, 50,  0, -1  ; NAROK (DVE1)
+det_eval_13 = 6, 0,  0,  0, -1, 35, -1, -1, -1  ; PRODLUZ (DVA)
+det_eval_14 = 6, 0,  1,  0, -1, 35, -1, -1, -1  ; PRODLUZ (DVAa)
+det_eval_15 = 6, 0,  2,  1, -1, 25, -1, -1, -1  ; PRODLUZ (DVB)
+det_eval_16 = 6, 0,  3,  1, -1, 25, -1, -1, -1  ; PRODLUZ (DVBa)
+det_eval_17 = 6, 0,  4,  1, -1, 35, -1, -1, -1  ; PRODLUZ (DVB1)
+det_eval_18 = 6, 0,  6,  3, -1, 25, -1, -1, -1  ; PRODLUZ (DVD)
+det_eval_19 = 6, 0,  7,  3, -1, 35, -1, -1, -1  ; PRODLUZ (DVD1)
+det_eval_20 = 6, 0,  8,  5, -1, 25, -1, -1, -1  ; PRODLUZ (DSE)
+det_eval_21 = 6, 0,  9,  4, -1, 25, -1, -1, -1  ; PRODLUZ (DVE)
+det_eval_22 = 6, 0, 10,  5, -1, 35, -1, -1, -1  ; PRODLUZ (DSE1)
+det_eval_23 = 6, 0, 11,  4, -1, 35, -1, -1, -1  ; PRODLUZ (DVE1)
+det_eval_24 =10, 0, -1, -1, -1, -1, -1, -1, 66  ; TX == 66
+det_eval_25 =14, 0, -1, -1, -1, -1, -1, -1, 11  ; tF3 >= 12, tF3 >= 12
+
+
+[stage_def_table]
+; stage_nr = sg_state(0), sg_state(1), ..., sg_state(n)
+
+stage_0 = 1, 0, 1, 0, 0, 0  ;F1 = VA, VC
+stage_1 = 0, 1, 0, 0, 1, 1  ;F2 = VB, VE, SE
+stage_2 = 0, 0, 1, 1, 0, 1  ;F3 = VC, VD, SE
+
+
+[stage_trans_table]
+; stg_trans_nr = duration, sg_cmd_time(0), sg_cmd_time(1), ..., sg_cmd_time(n)
+
+stg_trans_0 = 11,  2, 11,  0, -1, 11, 11  ;F1 -> F2
+stg_trans_1 = 8,   0, -1, -1,  4, -1,  8  ;F1 -> F3
+stg_trans_2 = 6,   6,  0,  6, -1,  0,  0  ;F2 -> F1
+stg_trans_3 = 10, -1,  0,  7,  5,  0, -1  ;F2 -> F3
+stg_trans_4 = 6,   6, -1, -1,  0, -1,  4  ;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 =  4, 5, 6, 10, 12  ;L3..narok na F2
+
+[frame_condition_table/3]
+
+and_0 =  7, 8, 9, 11  ;L4..narok na F3
+
+[frame_condition_table/4]
+
+and_0 = 2  ;L5..narok na F1
+and_1 = 3
+and_2 = 22
+
+[frame_condition_table/5]
+
+and_0 = 17  ;L6..ukonceno prodluzovani z F2 do F3
+and_1 = 23
+and_2 = 15, 25
+and_3 = 16, 25
+and_4 = 21, 25
+
+[frame_condition_table/6]
+
+and_0 = 17  ;L7..ukonceno prodluzovani z F2 do F1
+and_1 = 23
+and_2 = 22
+and_3 = 15, 25
+and_4 = 16, 25
+and_5 = 21, 25
+and_6 = 20, 25
+
+[frame_condition_table/7]
+
+and_0 = 19  ;L8..ukonceno prodluzovani z F3 do F1
+and_1 = 22
+and_2 = 18, 25
+and_3 = 20, 25
+
+
+[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 = 5
+; original setting was 'max = 14'
+max = -1
+stage_param_0 = 0, 4, 5
+stage_param_1 = 2, 1, 6
+
+[frame_logic_table/2]
+
+min = 1
+; original setting was 'max = 14'
+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, 60, 0
+sig_plan/1 = 0, 80, 60, 0
+
+
+[fixed_plan_table/0]
+; sg_nr = begin_go, end_go
+
+sg_0 = 54, 80
+sg_1 =  9, 20
+sg_2 = 26, 78
+sg_3 = 25, 47
+sg_4 =  9, 20
+sg_5 =  9, 51
+
+[frame_plan_table/0]
+; stage_nr = begin_stage, end_stage, begin_demand, end_demand, begin_prolongation, end_prolongation
+
+stage_0 =  0, 80, 75, 38,  0,  0
+stage_1 = 66, 12, 66, 67,  2, 12 
+stage_2 = 66, 37, 66, 13, 75, 37 
+
+
+[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
Index: applications/doprava/aimsun_bdm/els3/configs/K_5_495.ini
===================================================================
--- applications/doprava/aimsun_bdm/els3/configs/K_5_495.ini (revision 817)
+++ applications/doprava/aimsun_bdm/els3/configs/K_5_495.ini (revision 817)
@@ -0,0 +1,205 @@
+[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
