Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1085 | pj | 1 | AUTO - Another Unuseful Track simulatOr |
2 | --------------------------------------- |
||
3 | |||
4 | by Marco Dallera and Marco Fiocca, 2001 |
||
5 | |||
6 | --------------------------------------- |
||
7 | |||
8 | This project was done as a Lab assignment during the course of |
||
9 | "Informatica Industriale" at the University of Pavia, Italy. |
||
10 | |||
11 | It simulates a race between cars under a set of 4 tracks. |
||
12 | |||
13 | The authors provided also some pages that describes the application |
||
14 | (auto.ps, in italian, on the website). |
||
15 | |||
16 | To run the application, just compile it and call "x auto th" where tn is |
||
17 | the track number (0 to 4). |
||
18 | |||
19 | Since the control algorithm is quite complex, you need a quite powerful |
||
20 | machine. If you get an exception 8 (WCET violation), you need a faster PC. |
||
21 | You can anyway run the application making "auto2", that uses RR instead of |
||
22 | EDF or CBS, or "auto3", that uses the EDFACT Module (you need yo copy |
||
23 | the edfact.c and edfact.h files in the application directory to do that). |
||
24 | |||
25 | To be run, the application needs to be compiled with the |
||
26 | #define MAX_CAB set to a number greater than 20 (see include/modules/cabs.h). |
||
27 | |||
28 | The control algorithm of the cars is not yet perfect, and if you look to |
||
29 | the race for a long time, sometimes some cars go in the wrong direction. |
||
30 | If you find a better algorithm, send me a patch :-) |
||
31 | |||
32 | The code you can find in this directory is the original code of the |
||
33 | students except for the MAX_CAB test into main(), and for the idle time |
||
34 | monitor (that I took from the jumpball example) that can be useful to know |
||
35 | when the system is overloaded. For example, on my PC there is idle time until |
||
36 | the system has 9 cars. The tenth make the PC overloaded until one of them |
||
37 | crashes :-). |
||
38 | |||
39 | Finally note that the WCET and PERIODS specified by the authors are not so |
||
40 | correct, and with this setting you can run 8 cars maximum before crashing the |
||
41 | system. |
||
42 | |||
43 | Have a nice race... |
||
44 | |||
45 | Paolo |
||
46 | pj@sssup.it |
||
47 | |||
48 | PS: Sometimes on my portable the demo crashes. I wonder why!... If someone |
||
49 | finds why, please tell me, I will patch it... |
||
50 | |||
51 |