CHAPTER 4. CODING PROCESS
16
TLDecision holds a tuple of a TrafficLight and a float value to represent the
reward for the TrafficLight to be kept.3
TLCFactory is used to get instances of traffic light controllers. An instance is
created in the method setTLC of SimController.
SignController decides how each sign should work. Only one instance is cre-
ated in the SimModel.
The method switchSigns is called by doStep of SimModel.
switchTrafficLights
Sign CoiiTro lie г
+CrossNodesSafelv:hooi ean- t rue
⅜shortXML.Nam e:Strinq= "Siqncontrollgr"
iin-ium_nodes:int
^generator: Random
#t !controller: TLControIIer
⅛nfra: Infrastructure
⅛curre πtSCιSign[][]
+g et I nf rast ru ct ure f): I nf rast ru ct u re
-ι-g etTLC 0:7 LContro! Ier
+sv∣j'tcr∣Sigr∣s∣j∣t,∣∣,L∣id
+save Se IfCrXMLEiem ent
+get×M LN a me (JiString
+set Parent Nam e(pare nt Nam e: String)ιvoi d
<< create >>+ SignControI ler(t: TLControSIer1I'. Infrastructure): SignControI Ier
+s at I nf rast ru ct u re (і 11 nf rast ru ct u re) tv Oi d
+setTLC(t: TLControiler):void
-switchNonTrafficLights(nodeιNonTLJuncti onj decιTLDecision[D∣voi d
+SWitchTraffi cLights(nodeιJunction, decιTLDecision[])ιvoid
≠calcCverl ap(arlιSign[],ar2ιSιgn[∣)ιSign[]
+load(myElem ent:XMLEIem entJoader:XMLLoader):voi d
+≤ ave Ch і і d s (s ave rXM LS av e r): V oi d
Created with Poseidon for UML Community Edition. Not for Commercial Use.
Figure 4.4: UML diagram: SignController
3 from info TLDecision.java
More intriguing information
1. Keynesian Dynamics and the Wage-Price Spiral:Estimating a Baseline Disequilibrium Approach2. PACKAGING: A KEY ELEMENT IN ADDED VALUE
3. The name is absent
4. New urban settlements in Belarus: some trends and changes
5. Social Irresponsibility in Management
6. The name is absent
7. DURABLE CONSUMPTION AS A STATUS GOOD: A STUDY OF NEOCLASSICAL CASES
8. Second Order Filter Distribution Approximations for Financial Time Series with Extreme Outlier
9. The name is absent
10. A Critical Examination of the Beliefs about Learning a Foreign Language at Primary School