source: proiecte/ptvs/src/vnsim/applications/adaptiveTL/IntersectionPhaseStatistics.java @ 31

Last change on this file since 31 was 31, checked in by (none), 14 years ago
File size: 1.8 KB
Line 
1/************************************************************************************
2 * Copyright (C) 2008 by Politehnica University of Bucharest and Rutgers University
3 * All rights reserved.
4 * Refer to LICENSE for terms and conditions of use.
5 ***********************************************************************************/
6package vnsim.applications.adaptiveTL;
7
8public class IntersectionPhaseStatistics {
9       
10        int phaseStartFrame;
11        int phaseEndFrame = -1;
12        int color;
13       
14        int carsNo;
15        int demandCarsNo;
16        int leftDemandCarsNo;
17        double avgSpeed;
18        double queueSize;
19        double avgNoOfStops;
20        int avgControlDelay;
21        double queueDischargeRate;
22        double avgGap;
23       
24        public IntersectionPhaseStatistics(int crtTime, int color){
25                this.phaseStartFrame = crtTime;
26                this.color = color;
27                carsNo = 0;
28                demandCarsNo = 0;
29                leftDemandCarsNo = 0;
30                avgSpeed = 0;
31                queueSize = -1;
32        }
33
34        public void setAvgSpeed(double avgSpeed) {
35                this.avgSpeed = avgSpeed;
36        }
37
38        public void setCarsNo(int carsNo) {
39                this.carsNo = carsNo;
40        }
41
42        public void setQueueSize(double queueSize) {
43                this.queueSize = queueSize;
44        }
45
46        public void setPhaseEndFrame(int phaseEndFrame) {
47                this.phaseEndFrame = phaseEndFrame;
48        }
49
50        public double getAvgSpeed() {
51                return avgSpeed;
52        }
53
54        public int getCarsNo() {
55                return carsNo;
56        }
57
58        public double getQueueSize() {
59                return queueSize;
60        }
61
62        public int getPhaseEndFrame() {
63                return phaseEndFrame;
64        }
65
66        public int getPhaseStartFrame() {
67                return phaseStartFrame;
68        }
69
70        public double getAvgNoOfStops() {
71                return avgNoOfStops;
72        }
73
74        public void setAvgNoOfStops(double avgNoOfStops) {
75                this.avgNoOfStops = avgNoOfStops;
76        }
77
78        public int getColor() {
79                return color;
80        }
81
82        public void setColor(int color) {
83                this.color = color;
84        }
85       
86       
87}
Note: See TracBrowser for help on using the repository browser.