... | @@ -62,7 +62,7 @@ TODO: insert program code |
... | @@ -62,7 +62,7 @@ TODO: insert program code |
|
|
|
|
|
In the provided code, the arbitration suggested by Jones, Flynn, and Seiger [2, pp. 306] is implemented in the classes ***SharedCar*** and ***Arbiter*** in the "reverse order" compared to the code presented by Jones et al.: The Arbiter goes through the list and for the first ***SharedCar*** whose ***CarCommand*** instance is not null, calls ***CarDriver***'s *perform()* method with the *SharedCar*'s ***CarCommand*** instance and reports the *SharedCar* as the winner. It then breaks the for loop and starts over with the *SharedCar array* from 0, thus always starting from the most competent behaviour layer. The reason that this order is "reverse"; is that in the code presented by Jones et al., the arbiter goes through the behaviours in increasing order of competence, overruling the previous setting of the motor input.
|
|
In the provided code, the arbitration suggested by Jones, Flynn, and Seiger [2, pp. 306] is implemented in the classes ***SharedCar*** and ***Arbiter*** in the "reverse order" compared to the code presented by Jones et al.: The Arbiter goes through the list and for the first ***SharedCar*** whose ***CarCommand*** instance is not null, calls ***CarDriver***'s *perform()* method with the *SharedCar*'s ***CarCommand*** instance and reports the *SharedCar* as the winner. It then breaks the for loop and starts over with the *SharedCar array* from 0, thus always starting from the most competent behaviour layer. The reason that this order is "reverse"; is that in the code presented by Jones et al., the arbiter goes through the behaviours in increasing order of competence, overruling the previous setting of the motor input.
|
|
|
|
|
|
Compare this with the arbiter of Fred Martin, [4, page 214-218].
|
|
TODO: Compare this with the arbiter of Fred Martin, [2, pp. 214-218].
|
|
|
|
|
|
|
|
|
|
## Conclusion
|
|
## Conclusion
|
... | @@ -78,6 +78,8 @@ TODO: |
... | @@ -78,6 +78,8 @@ TODO: |
|
|
|
|
|
[2] Jones, Flynn, and Seiger, ["Mobile Robots, Inspiration to Implementation"](http://legolab.cs.au.dk/DigitalControl.dir/NXT/Lesson7.dir/11128_Mobile_Robots_Inspiration_to_Implementation-Flynn_and_Jones.pdf), Second Edition, 1999.
|
|
[2] Jones, Flynn, and Seiger, ["Mobile Robots, Inspiration to Implementation"](http://legolab.cs.au.dk/DigitalControl.dir/NXT/Lesson7.dir/11128_Mobile_Robots_Inspiration_to_Implementation-Flynn_and_Jones.pdf), Second Edition, 1999.
|
|
|
|
|
|
|
|
[3] Fred G. Martin, Robotic Explorations: A Hands-on Introduction to Engineering, Prentice Hall, 2001.
|
|
|
|
|
|
TODO: Kode-refs
|
|
TODO: Kode-refs
|
|
[..] [The .....java program](https://gitlab.au.dk/LEGO/lego-kode/blob/master/src/Lesson7programs/...)
|
|
[..] [The .....java program](https://gitlab.au.dk/LEGO/lego-kode/blob/master/src/Lesson7programs/...)
|
|
|
|
|
... | | ... | |