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 | ***********************************************************************************/ |
---|
6 | package vnsim.vehicular.generator; |
---|
7 | |
---|
8 | |
---|
9 | |
---|
10 | import java.util.Vector; |
---|
11 | |
---|
12 | import vnsim.vehicular.simulator.Location; |
---|
13 | import vnsim.vehicular.simulator.RouteSegment; |
---|
14 | |
---|
15 | public class NewCarEvent { |
---|
16 | public int timestamp; //simulation time |
---|
17 | public int index; //in the Mobility.entryScenarios array |
---|
18 | public int period; //simulation time (rescheduling time) |
---|
19 | |
---|
20 | public NewCarEvent(int timestamp, int index, int period) { |
---|
21 | this.index=index; |
---|
22 | this.timestamp=timestamp; |
---|
23 | this.period=period; |
---|
24 | } |
---|
25 | |
---|
26 | public int compareTo(NewCarEvent o) { |
---|
27 | if(this.timestamp > o.timestamp) |
---|
28 | return 1; |
---|
29 | if(this.timestamp==o.timestamp) |
---|
30 | return 0; |
---|
31 | return -1; |
---|
32 | } |
---|
33 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.