Changes between Version 8 and Version 9 of PTVS_Impl
- Timestamp:
- Jan 13, 2010, 11:35:31 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PTVS_Impl
v8 v9 38 38 We chose to implement the best idea from those 3: a work-pool for each intersection. 39 39 40 A thread-pool with executors is created:40 1. A thread-pool with executors is created: 41 41 '' public ExecutorService executor[];'' 42 42 43 Each intersection will be assigned to a single executor (each executor will be a single thread):43 2. Each intersection will be assigned to a single executor (each executor will be a single thread): 44 44 ''numThreads=intersectii.size();'' 45 45 … … 49 49 ''executor[i] = Executors.newFixedThreadPool(1);'' 50 50 ''}'' 51 52 3. Find the index of the closest intersection on the same road for the car. 53 54 4. Assign the event to the thread of intersection 55 56 Notice: Because of testing issues (we won't have as mush processors as intersections on a simulation machine), and because fep has 8 processors, 57 we decided to to limit the number of threads for all intersections (7 processors), the 8th one being assigned for GPS and Clear Events. 58 Each event will be computed by the 'NoIntersection % 7' thread.