shop&go for smarphones

19
Mobile Technologies and Biotechnology Research Group (G-TeC) Shop&Go: The Routing Problem Applied to the Shopping List on Smartphones Inmaculada Pardines and Victoria Lopez

Upload: victoria-lopez

Post on 16-Apr-2017

431 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Shop&go for smarphones

Mobile Technologies and Biotechnology Research Group (G-TeC)

Shop&Go: The Routing Problem Applied to the

Shopping List on SmartphonesInmaculada Pardines and Victoria Lopez

Page 2: Shop&go for smarphones

Contents topics

1Routing Problem

2Algorithms

SVS-NVS

3 Functionalities

Simulations

Page 3: Shop&go for smarphones

Routing Problem Shopping list

mobile technology

1

Page 4: Shop&go for smarphones

Nowadays, there are a lot of applications that allow users to carry out different tasks.

Smartphones have become an essential tool in our lives.

It is not only used to communicate by a voice call or a SMS, but for executing a great number of applications such as:

games, music, e-mail, MMS, PDA, digital photograph and digital video, video call, Internet and even digital television.

Routing Problem Shopping list

Lists

Search a Product

Page 5: Shop&go for smarphones

Moti

vatio

nMotivation

In our working group, we develop mobile applications that try to make people life easier with the aid of a mobile. The work presents in this paper is focused in this idea.

We propose a new mobile tool which optimizes the route, and so on, the time necessary to do the shopping in a supermarket. There were some studies about this subject but not applied to mobiles.

Moreover, there are Android applications related to the shopping list. Some examples are Hungry!, Shoplist and ShopSavvy Barcode Scanner.

Some functionalities allows to write and to save the shoppinglist, to organize the different products by colors and to send this list by e-mail or SMS. Also to identify a barcode using the mobile camera and to provide a price and store lists.

(Shop&Go)also optimizes theshopping route in a supermarket and add more functionalities

Page 6: Shop&go for smarphones

Data base of products (barcodes). Device (smarthphone) Programming language Java (Eclipse – Galileo 3.5) + ADT plugin for Android 2.2 API Google MapsSQLite database for AndroidContents Providers to share information between appsPHP to manage the virtual (and free) databaseApache server, open code for Linux and windows, HTTP protocol , SQL for relational data base, www.000webhost.com (1500 MB free server)

Testing on HTC Desire with Android 2.1 Eclair, Samsung Galaxy S II Android 2.3 Gingerbread, and tablet Archos 10 Android 2.2. between others.

Arquitecture

BBDD(Products)

supermarket

Page 7: Shop&go for smarphones

2 Algorithms NVS - SVS

How to optimize you time at shopping

Page 8: Shop&go for smarphones

Algorithms SVS - NVS

Star

t

tomato

frui

t

cash

regi

ster

s

Fig. 1. Route from the SVS

The idea is that the distance covered by the customer to make the shopping is the shortest if the products close to the cash registers are taken as the last ones.

Sorted Vertex Search Algorithm (SVS Algorithm)

This algorithm obtains the shortest path from an origin vertex to every vertex of a graph with nonnegative path costs. It uses the Dijkstra matrix to find the shortest path to go from a node to the next one.

1. The S (Solution) set is initialized with the origin node 0.2. The L (List) set is created by searching in a database which node is associated to each

product of the shopping list. It is necessary to include in the set the cash register node. Then, these vertices are sorted from low to high.

3. This loop is executed until the L set is empty: the heuristic finds the shortest path between the last node of S and the first node of L using the Dijkstra matrix. This node of L is removed and the nodes that belong to this path are included in the S set.

Page 9: Shop&go for smarphones

Algorithms SVS - NVS

Star

t

tomato

frui

t

cash

regi

ster

s

Fig. 1. Route from the SVS

Sorted Vertex Search Algorithm (SVS Algorithm)

The heuristic starts from the sets: S={0} and L={3,8,12,18}, where the node 18 corresponds to the cash registers.First, the shortest path between nodes 0 and 3 is searched. This path is through node 1, so S={0,1,3}. Node 3 is removed from L. Then, the optimum path between nodes 3 and 8 is found through node 4. The process continues in this way until L is empty. Finally, the Solution Set is S={0,1,3,4,8,9,10,12,18} and the obtained route is shown in Fig.1.

Product VertexTomato 3

Fruit 8Chocolate 12

Table 1. Shopping list of Example 1.

Page 10: Shop&go for smarphones

Algorithms SVS - NVS

Fig. 2. Route from the NVS

The decision to establish the optimum path in this heuristic is based on the idea that the customer moves always from a node to the closest one which is related to a product of the shopping list.

The decision to establish the optimum path in this heuristic is based on the idea that the customer moves always from a node to the closest one which is related to a product of the shopping list.

Nearest Vertex Search Algorithm (NVS Algorithm)

1. The S set is initialized with the origin node 0.2. The L set is created by searching in a database which node is associated to each

product of the shopping list. It is necessary to include in the set the cash register node.

3. This loop is executed until the L set is empty: the distance from the current vertex to every node of L is found. The node with the shortest distance is selected as the next one to move. This node is included in the Solution set and removed from the List set.

Star

tca

sh re

gist

ers

coffee

aube

rgin

e

Page 11: Shop&go for smarphones

Algorithms SVS - NVS

Fig. 2. Route from the NVS

Sorted Vertex Search Algorithm (SVS Algorithm)

Initially, the distance between node 0 and every node of L is calculated by using the distance between shelves from the map provided by the supermarket. In our example node 0 is five meters apart from node 16 and 13.5 meters apart from node 9. So, the heuristic selects vertex 16 as the next one to go, adding it to the S set and removing it from L set. The Dijkstra matrix is used to calculate the minimum path between two vertices. The selected node in the current iteration is used as the starting point of the next one, calculating the distances from every node of L to it. The vertex with the low distance will be the next one to move. The process continuous in this way until L is empty. When all the nodes of the shopping list have been covered, the algorithm searches for the best path from the last node of S to the cash registers. Finally, the Solution Set is S={0,17,16,6,7,9,10,12,18} and the obtained route is shown in Fig.2.

Star

tca

sh re

gist

ers

coffee

aube

rgin

e

Product VertexCoffee 16

Aubergines 9

Table 2. Shopping list of Example 2.

Example 2 describe the heuristic. The shopping list is made up of coffee and aubergines. The heuristic starts from the sets: S={0} and L={16,9}.In this case, the L elements are not numbering sorted; they are saved as the product appears in the shopping list.

Page 12: Shop&go for smarphones

Comparative between the SVS and the NVS Algorithms

List of Example 3 List of Example 4Product Vertex Product VertexSalad 3 Cereals 16Rice 5 Legumes 4Fruit 8 Tomatoes 3Chocolates 12 Honey 16

Applying the SVS algorithm to the example 3, the customer will have to pass the nodes 0, 1, 3, 2, 5, 8, 9, 10, 12, 11, 6, 16, 18, in this order. The total distance 36 meters. For this example the NVS heuristic achieves a better solution with a total distance of 27.5 meters and a route which the vertices follows the order 0, 17, 16, 5, 8, 4, 3, 2, 6, 11, 12, 18.However, for the example 4 the SVS heuristic achieves the best solution with a total distance of 22 meters (S={0,1,3,4,5,16,18}) whereas the NVS algorithm obtains a path of 24.5 meters long (S={0,17,16,2,3,4,5,16,18}).

Page 13: Shop&go for smarphones

3 Functionalities & Simulation

How much we can do for you

Page 14: Shop&go for smarphones

» Muestre y cuente su presentación con Difundir presentación de diapositivas

» Search a product in the supermarket. The customer can select a product looking for it in a shopping list or writing their name in the corresponding field. Then, the application shows the product location pointing out in a map.

» List creation and edition. Users can create lists, give then a name and add them a description. The new lists will be permanent . Once they have been created, they are saved for next searches in a new execution of the application in the future.

» List removing. The user can remove an existing shopping list at any time.» Search the price of a product. After the customer selects the products of his shopping

list, the application shows the prices of all these products.» Send a shopping list by e-mail. Once a shopping list is created, it can be sent by e-mail

and another person can do the shopping.» Selection between two heuristics. The user can select between the solution offered by

the SVS heuristic and the solution achieved by the NVS algorithm. The routes provided by this two heuristics are usually different. Then, it is the customer according to his preferences who decides what route is going to select.

» Display the route in a map. The user can see in a map the route which has to cover to purchase all the products of a shopping list. Pressing a product after taking it, removes it from the list.

» Display the route in text. And voice routing (for people with visual discapacity)

More functionalities

Page 15: Shop&go for smarphones

Java packages &classes

Page 16: Shop&go for smarphones

use

Use case diagram

Page 17: Shop&go for smarphones

Classes diagram

Page 18: Shop&go for smarphones

4 ConclusionsA mobile application for shopping in an efficient way is presented in this paper.

Two heuristics have been proposed to find the shortest route for taking the products of a shopping list. We have demonstrated that it is impossible to assure which heuristic is the best one.

Therefore, we have decided to include the two algorithms in the Shop&Go application. Shop&Go app has also other functional requirements such as creating or deleting lists, searching for a product price,

locating a product in the supermarket map and so on. Several simulations that prove the high performance of the proposed application are shown.

However, this application has a difficult marketing. The idea of doing the shopping in a short time benefits the customers but it is opposed to the interest of the

supermarkets. These businesses frequently change the products layout to force the customer to go through many corridors, increasing the probability that the customer buys more products than he needs.

Page 19: Shop&go for smarphones

Mobile Technologies and Biotechnology Research Group (G-TeC)

Thank you very much!

Xie Xie!