Research Article
Continuous and Discrete-Time Optimal Controls for an Isolated Signalized Intersection
Algorithm 1
The adjusting algorithm for the discretized approximate solution in Case I(a).
| () Set as the discretized approximate solution. Calculate by Eq. (15)-(16); | | () if then | | () Set and set ; | | () Update by Eq. (16) and set ; | | () if then | | () and update and by Eq. (15) and (16); | | end | | end | | while do; | | . Update such that stream is cleared exactly in cycle ; | | Update by Eq. (15); | | if then | | 1. Find the minimum such that ; | | Update such that stream is cleared exactly in cycle ; | | Set ; | | end | | if then | | and update and by Eq. (15) and (16); | | end | | end | | while do | | . Update such that stream is cleared exactly in cycle ; | | Update by Eq. (15); | | if then | | . Find the maximum such that ; | | Update such that stream is cleared exactly in cycle ; | | else if and then | | break; | | end | | if then | | (31) and update and by Eq. (15)-(16); | | (32) end | | (33) end | | (34) if and then | | (35) Calculate , by Eq. (2)-Eq. (3); | | (36) Set ; | | (37) for do ; | | (38) end |
|