1. INTRODUCTION
1.1 PROBLEM DEFINITION
The bus arrival time is primary information to most city transport
travelers.
Excessively
long
waiting
time
at
bus
stops
often
Department of CSE
RIT Kottayam
1.2 INTRODUCTION
This project presents a crowd-participated service to bridge those
who want to know bus arrival time (querying users) to those who are on
the bus and able to share the instant bus route information (sharing
users). To achieve such a goal, the bus passengers themselves
cooperatively sense the bus route information using commodity mobile
phones. In particular, the sharing passengers may anonymously upload
their sensing data collected on buses to a processing server which
intelligently processes the data and distributes useful information to
those querying users.
RIT Kottayam
Department of CSE
RIT Kottayam
Department of CSE
RIT Kottayam
1.3.MOTIVATION OF WORK
The bus companies usually provide free bus timetables on the web.
Such bus timetables, however, only provide very limited information
(e.g., operating hours, time intervals etc.), which are typically not timely
Department of CSE
RIT Kottayam
updated
according
to
instant
traffic
conditions.
Although
many
commercial bus information providers offer the real time bus arrival
information, the service usually comes with substantial cost. With a
fleet of thousands of buses, the installment of vehicle GPS systems
incurs tens of millions of dollars. The network infrastructure to deliver
the transit service raises the deployment cost even higher, which would
eventually translate to increased expenditure of passengers.
Department of CSE
RIT Kottayam
1.5 CONTRIBUTION
Department of CSE
RIT Kottayam
RIT Kottayam
know its arrival time at bus stop 6. Accurate prediction of the arrival
time requires the distance between bus stop 1 and 6 along the 1D
bus route (but not on the 2D map) and the average velocity of the
bus. In general, the physical positions of the bus and the bus route
on the 2D maps are not strictly necessary. In our system, instead of
pursuing the accurate 2D physical locations, we logically map the
bus routes to a space featured by sequences of nearby cellular
towers. We classify and track the bus statuses in such a logical space
so as to predict the bus arrival time.
1.6
OUTLINE
The report includes the existing systems for predicting bus arrival
time and lists out the main disadvantages in those applications. The
papers referred for developing this application is mentioned under
literature survey. Then the new application developed is explained
along with its advantages.
RIT Kottayam
design and output design are included. Table design specifies all the
tables in the database along with the fields of the table. Then
information regarding system testing and implementation are
mentioned.
the deployment
cost.
The existing system is based on GPS systems. The existing system is
less energy-friendly and do not involve crowd participation.
10
RIT Kottayam
devices
are
increasingly
eqTEM
DESIGN
AND
applications
including
ride
sharing,
location-based
Real-Time Trip Information Service for a Large Taxi Fleet Rajesh Krishna Balan et al[2]
In this paper, they describe the design, analysis, implementation,
and operational deployment of a real-time trip information system
that provides passengers with the expected fare and trip duration of
the taxi ride they are planning to take. This system was built in
cooperation with a taxi operator that operates more than 15,000
Department of CSE
11
RIT Kottayam
taxis in Singapore. They first describe the overall system design and
then explain the efficient algorithms used to achieve our predictions
based on up to 21 months of historical data consisting of
approximately 250 million paid taxi trips. They then describe various
optimisations (involving region sizes, amount of history, and data
mining techniques) and accuracy analysis (involving routes and
weather) they performed to increase both the runtime performance
and prediction accuracy. Our large scale evaluation demonstrates
that our system is (a) accuratewith the mean fare error under 1
Singapore dollar (0.76 US$) and the mean duration error under three
minutes, and (b) capable of real-time performance, processing
thousands to millions of queries per second. Finally, they describe
the lessons learned during the process of deploying this system into
a production environment.
Department of CSE
12
RIT Kottayam
user,
is
locationbasedservices
monitoring,navigation
an
important
including
and
routing,
component
in
crowd-sourced
and
many
traffic
personalized
trip
management.Using only cellular (GSM) fingerprints insteadof powerhungry GPS and WiFi radios, the marginal energyconsumed for
trajectory mapping is zero. This approachis non-trivial because we
need to process streamsof highly inaccurate GSM localization
samples (averageerror of over 175 meters) and produce an
accuratetrajectory. CTrack meets this challenge using a noveltwopass Hidden Markov Model that sequences cellularGSM fingerprints
directly without converting them togeographic coordinates, and
fuses data from low-energysensors available on most commodity
smart-phones, includingaccelerometers (to detect movement) and
magneticcompasses (to detect turns). They have implementedCTrack
on the Android platform, and evaluated it on 126hours (1,074 miles)
Department of CSE
13
RIT Kottayam
proposed
system
provides
cost-efficient
solutions
to
the
Department of CSE
14
RIT Kottayam
3. REQUIREMENT ANALYSIS
3.1 FEASIBILITY STUDY
Introduction:
A feasibility analysis involves a detailed assessment of the need,
value and practicality of a p systems development... Feasibility analysis
n forms the transparent decisions at crucial points during the
developmental process as we determine whether it is operationally,
economically and technically realistic to proceed with a particular
course of action.
Feasibility analysis can be used in each of the steps to assess the
financial, technical and operational capacity to proceed with particular
activities.
Types of feasibility:
A feasibility analysis usually involves a thorough assessment of
the financial (value), technical (practicality), and operational (need)
aspects of a proposal. In systems development projects, business
Department of CSE
15
RIT Kottayam
new
system
compared
with
the
existing
system;
training
inefficiencies
during
system
development
and
implementation).
Technical feasibility:
A systems development project may be regarded as technically
feasible or practical if the organization has the necessary expertise and
infrastructure to develop, install, operate and maintain the proposed
system. Organizations will need to make this assessment based on:
Department of CSE
16
RIT Kottayam
ECONOMICAL FEASIBILITY:
This study is carried out to check the economic impact that the system
will have on the organization. The amount of fund that the company can pour
into the research and development of the system is limited. The expenditures
must be justified. Thus the developed system as well within the budget and
this was achieved because most of the technologies used are freely available.
Only the customized products had to be purchased.
TECHNICAL FEASIBILITY:
This study is carried out to check the technical feasibility, that is, the
technical requirements of the system. Any system developed must not have a
high demand on the available technical resources. This will lead to high
demands on the available technical resources. This will lead to high demands
being placed on the client. The developed system must have a modest
requirement, as only minimal or null changes are required for implementing
this system.
SOCIAL FEASIBILITY:
The aspect of study is to check the level of acceptance of the system by the
user. This includes the process of training the user to use the system
efficiently. The user must not feel threatened by the system, instead must
Department of CSE
17
RIT Kottayam
Department of CSE
18
RIT Kottayam
Processor
- 1GHz
RAM
- 1GB
Hard Disk
- 50MB
Software Specifications:
Operating System
Web Server
Front End
Scripts
Database
: Android
: Apache
: Mobile
: PHP,MySQL, Android
: PHP
: MySQL
.
19
RIT Kottayam
PHP
Department of CSE
20
RIT Kottayam
4.SYSTEM DESIGN
4.1 LOGICAL DESIGN
UML Diagrams:
The Unified Modeling Language (UML) is a visual modeling language
used to specify, visualize, construct and document a software intensive
system.
The
embedded
real-time
software
systems
encountered
in
accommodates
changes
forced
by
steady
stream
of
new
requirements.
The UML represents a collection of best engineering practices that have
proven successful in the modeling of large and complex systems. The UML is a
very important part of developing objects oriented software and the software
development process. The UML uses mostly graphical notations to express
the design of software projects.
meaningful
models.
Provide
extensibility
and
specialization
21
RIT Kottayam
Behavioral Diagrams :
The UMLs five behavioral diagrams are used to visualize, specify,
construct, and document the dynamic aspects of a system. The UMLs
behavioral diagrams are roughly organized around the major ways which can
model the dynamics of a system.
Behavioral diagrams consists of Use case Diagram, Sequence Diagram,
Collaboration Diagram, State chart Diagram, Activity Diagram.
Department of CSE
22
RIT Kottayam
Use-Case Diagrams
A use case diagram is a graph of actors, a set of use cases enclosed by
a system boundary, communication (participation) associations between the
actors and users and generalization among use cases. The use case model
defines the outside (actors) and inside (use case) of the systems behavior.
Update_ database
Department of CSE
23
RIT Kottayam
Sharing User
Bus_ Route_
Information
Server
Querying User
The sharing user interacts with the server and shares necessary
details. The querying user queries the server and the server will answer
the query. Server also periodically updates the database with the
collected information from the sharing user.
Department of CSE
24
RIT Kottayam
various processing carried out on these data, and the output data is generated
by the system.
Level 0
Department of CSE
25
RIT Kottayam
Server
Querying User
In level 0, data flow diagram represents that sharing user and querying
user are connected to the server. Information from the respective users
Department of CSE
26
RIT Kottayam
are updated to the server, processed and results are send back to the
querying users.
Level 1
USER
VALIDATION
SENSED
DETAILS
Level 1.0
LOCATION
QUERYING
USER
VALIDATION
DESTINATION
Department of CSE
27
RIT Kottayam
In level 1.0, data flow diagram represents the login details and the
updating information provided by the querying user. Querying users are
requested to enter the login details such as username and password.
After Login, there will be fields to update the current location and
destination.
Level 1.1
ACCELEROMETER DATA
VALIDATION
SHARING USER
CELL TOWER
SEQUENCE
COLLECTS BUS
INFORMATION
In level 1.1, data flow diagram represents the login details and sensed
information provided by the sharing users. Sharing users are requested
to enter the login details such as username and password. After login,
Department of CSE
28
RIT Kottayam
Mobile
Application
Collects
and
Processes
Sensor
Department of CSE
Server
Sends Info to
Server
29
RIT Kottayam
Display
Arrival
Time
Query
Arrival Time
30
RIT Kottayam
TABLE DESIGN:
ROUTE
START_TIME
DEST_TIME
Department of CSE
DESTINATION
31
TIME
RIT Kottayam
DESTINATION
TIME
LAC
Department of CSE
LAC
32
RIT Kottayam
OUTPUT DESIGN
Department of CSE
33
RIT Kottayam
34
RIT Kottayam
of finding a yet undiscovered error. A successful test is one that uncovers a yet
undiscovered error. Any engineering product can be tested in one of the two
ways:
The purpose of testing is to discover errors. Testing is the process of trying to
discover every conceivable fault or weakness in a work product. It provides a
way to check the functionality of components, sub assemblies, assemblies
and/or a finished product It is the process of exercising software with the
intent of ensuring that the Software system meets its requirements and user
expectations and does not fail in an unacceptable manner. There are various
types of test. Each test type addresses a specific testing requirement.
TYPES OF TESTS
Unit testing
Unit testing involves the design of test cases that validate that the internal
program logic is functioning properly, and that program inputs produce valid
outputs. All decision branches and internal code flow should be validated. It is
the testing of individual software units of the application .it is done after the
completion of an individual unit before integration. This is a structural testing,
that relies on knowledge of its construction and is invasive. Unit tests perform
basic tests at component level and test a specific business process,
application, and/or system configuration. Unit tests ensure that each unique
path
of
documented
Department of CSE
35
RIT Kottayam
exposing the
Invalid Input
Functions
Output
exercised.
Systems/Procedures : interfacing systems or procedures must be invoked.
Organization and preparation of functional tests is focused on requirements,
key functions, or special test cases. In addition, systematic coverage
pertaining
to
predefined
System testing ensures that the entire integrated software system meets
requirements. It tests a configuration to ensure known and predictable results.
Department of CSE
36
RIT Kottayam
White Box Testing is a testing in which in which the software tester has
knowledge of the inner workings, structure and language of the software, or at
least its purpose. It is purpose. It is used to test areas that cannot be reached
from a black box level.
Black Box Testing
Black Box Testing is testing the software without any knowledge of the inner
workings, structure or language of the module being tested. Black box tests,
as most other kinds of tests, must be written from a definitive source
document,
such
as
specification
or requirements document,
such
as
Test objectives
Department of CSE
37
RIT Kottayam
Features to be tested
Department of CSE
38
RIT Kottayam
to
achieve
changeover
and
evaluation
of
changeover
methods.
SAMPLE CODE
Splash.java
package com.example.bustime;
import android.app.Activity;
import android.content.Intent;
import android.graphics.PixelFormat;
import android.os.Bundle;
Department of CSE
39
RIT Kottayam
import android.view.Window;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
public
void
onAttachedToWindow() {
super.onAttachedToWindow();
Window window = getWindow();
window.setFormat(PixelFormat.RGBA_8888);
}
@Override
protected
void
onCreate(Bundle savedInstanceState) {
//
TODO
Auto-
super.onCreate(savedInstanceState);
setContentView(R.layout.splashscreen);
Department of CSE
40
RIT Kottayam
StartAnimations();
Thread logoTimer
= new Thread() {
public void run(){
try{
int logoTimer
= 0;
sleep(100);
logoTimer
= logoTimer +100;
};
Intent i =
new Intent(SplashScreen.this,MainActivity.class);
startActivity(i);
overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
}
Department of CSE
41
RIT Kottayam
catch
(InterruptedException e) {
// TODO
Auto-generated catch block
e.printStackTrace();
}
finally{
finish();
}
}
};
logoTimer.start();
}
private
void
StartAnimations() {
Animation anim =
AnimationUtils.loadAnimation(this, R.anim.translatebus);
anim.reset();
ImageView iv1 =
(ImageView) findViewById(R.id.imageView1);
Department of CSE
42
RIT Kottayam
iv1.clearAnimation();
iv1.startAnimation(anim);
anim
AnimationUtils.loadAnimation(this, R.anim.translate);
anim.reset();
ImageView iv =
(ImageView) findViewById(R.id.imageView2);
iv.clearAnimation();
iv.startAnimation(anim);
}
}
Main Activity.java
package com.example.bustime;
Department of CSE
43
RIT Kottayam
import java.util.ArrayList;
import java.util.List;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.BasicResponseHandler;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import android.os.Bundle;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.telephony.CellLocation;
import android.telephony.TelephonyManager;
import android.telephony.gsm.GsmCellLocation;
Department of CSE
44
RIT Kottayam
import android.view.KeyEvent;
import android.view.Menu;
import android.view.View;
import android.widget.ImageButton;
import android.widget.RatingBar;
import android.widget.TextView;
import android.widget.Toast;
import android.graphics.Color;
void
onCreate(Bundle savedInstanceState) {
Department of CSE
45
RIT Kottayam
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//tv
(TextView)
findViewById(R.id.tV);
//tv.setText("Status:
Not Shared");
//
c = (ImageButton)
findViewById(R.id.imageButton1);
search
update
voice
(ImageButton)findViewById(R.id.imageButton3);
(ImageButton)findViewById(R.id.imageButton1);
(ImageButton)findViewById(R.id.imageButton2);
search.setOnClickListener(new View.OnClickListener() {
@Override
public
void
onClick(View v) {
Department of CSE
46
RIT Kottayam
//
TODO Auto-generated method stub
Intent i
= new Intent(MainActivity.this,Search.class);
startActivity(i);
}
});
update.setOnClickListener(new View.OnClickListener() {
@Override
public
void
onClick(View v) {
// TODO Autogenerated method stub
Intent
new Intent(MainActivity.this,Update.class);
startActivity(i);
Department of CSE
47
RIT Kottayam
}
});
voice.setOnClickListener(new View.OnClickListener() {
@Override
public
void
onClick(View v) {
// TODO Autogenerated method stub
Intent
new Intent(MainActivity.this,VoicePhyHand.class);
startActivity(i);
}
});
}
@Override
public
boolean
48
RIT Kottayam
if
(keyCode
==
KeyEvent.KEYCODE_VOLUME_UP) {
// Do something
here...
// Needed to track
long presses
//
Log.e("Main
activity", "KEYCODE_VOLUME_UP");
Toast.makeText(getApplicationContext(),
"Your
Message", Toast.LENGTH_LONG).show();
return true;
}
return
super.onKeyDown(keyCode, event);
}
@Override
public
boolean
onCreateOptionsMenu(Menu menu) {
// Inflate the menu;
this adds items to the action bar if it is present.
Department of CSE
49
RIT Kottayam
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
Department of CSE
50
RIT Kottayam
6. EXPERIMENTAL RESULTS
6.1 EVALUATION MEASURES
In this application, the main steps done are as follows:
.the destination entered by the querying user is passed to the server.
.finding the current location of the querying user and passes the
location id to the server.
.classifying buses that passes through the current location and the
destination entered by the querying user.
.from the information provided by the sharing users in those buses ,find
the nearest bus to the querying user.
.calculate the time taken
bus.
The servers holds a Route DB database which contains the route data
(sequence of tower ids). This database is made by pre-surveying the
routes and the buses that go by them. The server also has an Active
Bus DB database which contains list of buses running and on which
routes. This list is maintained from the data collected from sharing
users. When a querying user sends a request (which contains their
current location and destination), a route whose sequence coincides
with the send data is returned.
Department of CSE
51
RIT Kottayam
T = 2, 3 4 5 6
etc.
With this info the server calculates a bus moving in route 1 with a speed
of 1 tower per sec(from the sample shown).
The
querying
user
Curr=10,Dest=15).
will
From
send
the
the
query
database,
we
(of
find
the
the
form,
say
matching
Department of CSE
52
RIT Kottayam
6.2 RESULTS
ANALYSIS
The computation overhead of backend server is mainly bounded
by the uploaded cell tower sequence length l ,the cell tower set
sequence length k, and the number of cell tower set sequences in the
database N. The computation complexity of sequence matching using
dynamic programming is O(lk) , and as we need to compare with N
candidate sequences in database the overall computation complexity is
O(lkN) . Since in practice both m and n are usually small
the
Department of CSE
53
RIT Kottayam
OUTPUT SCREENS
Department of CSE
54
RIT Kottayam
Department of CSE
55
RIT Kottayam
Department of CSE
56
RIT Kottayam
Department of CSE
57
RIT Kottayam
Department of CSE
58
RIT Kottayam
Department of CSE
59
RIT Kottayam
6.3 COMPARISONS
This application differs from the related works in that it predicts
the bus arrival time based on cell tower sequence information shared
by participatory users. To encourage more participants, no explicit
location services (e.g., GPS-based localization) are invoked so as to
reduce the overhead of using such special hardware for localization.
This application does not aim to position the mobile users though
similar in spirit to the existing works in utilizing the cell tower
sequences.
Department of CSE
60
RIT Kottayam
61
RIT Kottayam
the server will get updated and the accurate result will be provided to
querying user. This application is extended for the usage by physically
handicapped people. By pressing the volume up button the user can
input the destination orally. Similarly result is given by pressing the
volume down button.
Department of CSE
62
RIT Kottayam
8.REFERENCES
[1] Pengfei Zhou, Yuanqing Zheng and Mo Li, How Long to Wait?
Predicting Bus Arrival Time With Mobile Phone Based Participatory
Sensing in IEEE transactions on Mobile Computing VOL 13,NO 6,June
2014.
[2]Bus Transport in Singapore[Online]. Available:
http://en.wikipedia.org/wiki/Bus_transport_in_Singapore
[3]EZ-Link[Online]. Available:http://www.ezlink.com.sg
[4]Octupus[Online]. Available:http://www.octopus.com.hk/home/en
[5]Oyster[Online]. Available:https://oyster.tfl.gov.uk/oyster
[6]PublicTransport@SG[Online]. Available:http://www.publictransport.sg/
[7]Buses
in
London[Online].
Available:http://en.wikipedia.org/wiki/London_bus
[8]Transport for London[Online]. Available:http://www.tfl.gov.uk/
Department of CSE
63
RIT Kottayam
Thekkath,
Startrack:
framework
for
enabling
track-based
64
RIT Kottayam
Department of CSE
65
RIT Kottayam
Department of CSE
66
RIT Kottayam