Posts Tagged ‘dynamic ridesharing’

Back to Dycapo Server

Thursday, July 22nd, 2010

I've finally gotten back to Dycapo development. During the Summer I will write my Bachelor thesis in Computer Science about the project.

Therefore, in order to write the thesis, I will first write a complete set of API and the Protocol as well. My colleague Riccardo will also report bugs of the Server and I will fix them!

I hope to be able to release a v1.0.0 version before October!

Dycapo v0.5.0 is available. Probably the last before v1.0.0 prototype

Thursday, June 10th, 2010

It's a pleasure for me to announce that Dycapo Server v0.5.0 is here.
I thought that this would have been a tiny release with no new features at all. Well, I was wrong.
While optimizing and refactoring, I suddenly realized that there were some functionalities missing :)

As always, you can download Dycapo Server here.

Here are the release notes and the changelog:

RELEASE NOTES
***************

2010-06-10  Daniel Graziotin  

Dycapo v0.5.0 is the fifth prototype version on which we are building our APIs.

Dycapo v0.5.0 incorporates and shows:
* Adoption of Dycapo Protocol [http://dycapo.org/Protocol]
* The introduction of API [http://dycapo.org/Server/API]
* Integration of Dycapo models with Django models
* Authentication system
* Registration System
* Password change system
* A a Geo-location based search Algorithm
* Geo-location methods for Persons
* Insertion of a trip by a driver
* Start of a trip by a driver
* Search of a trip by a passenger
* Send a ride request to a driver
* Let the driver accept the ride request
* Inform the passenger about the status of his/her request
* Inform the
* Let the passenger inform the system that the driver picked him/she
* Let the passenger inform the system that the he/she arrived to destination
* Let the driver finish a Trip
* A full set of tests
CHANGES SINCE v0.4.0
***************

General:
* Dycapo now requires Django 1.2.x in order to function properly, as I am using
some of the new query features of Django
* Every xml-rpc function has been optimized in terms of query and Python code
(thanks to Davide "vad" Setti for helping in this)
* Added lots of safety and privacy checks for all methods. Lots of.
* Refactoring of all code, using also a dedicated branch. Many refactoring
  and optimization done.
* Added Django 1.2.x compatibility for all models' to_xmlrpc() methods
* Added some indexex on attributes
* Added a new permission for user to be used for registrations.

server/response_codes.py
* Deleted ERROR, now using just POSITIVE and NEGATIVE as responses, for
  simplicity
* Added many other response messages

server/models/participation.py
* Added attributes holding information on the deletion of a ride request
* Added attributes holding information on the refusal of a ride request

server/matching.py
* The matching algorithm now uses a single function with a single for loop
instead of three for loops.

server/driver.py
* add_trip() is now deprecated
* Added add_trip_exp(Trip trip) that should become add_trip() replacement
* Tests make use of this new function
* Added refuse_ride_request(trip, person), for refusing a passenger ride request
* Added relative tests

server/common.py
* get_position(person) now performs privacy checks (ie: to know the position
  of a person, the requesting person must be in an active participation with
  him/she)

tests/test_registration.py
* New test suite, tests the registration methods

tests/test_password_change.py
* New test suite, tests the possibility to change password method

tests/test_multiple_matching.py
* Added another passenger to check the new introduced methods

This will probably be the last prototype before working for v1.0.0 prototype, on which I will write my Thesis. I hope to have the possibility to work on it even after my internship end.

Dycapo Road to v0.5.0 – let’s look for safety and performance

Saturday, May 29th, 2010

The next version of Dycapo Server is scheduled between 2010-06-06 and 2010-06-13. Almost all prototype methods have been implemented in Dycapo v0.4.0. Therefore, the next release will probably be the last prototype of Dycapo Server, on which I will write my Bachelor Thesis this Summer, thus defining first complete versions of Dycapo Protocol and Server API.
Dycapo v0.5.0 will be a release in which I will try to add some safety/privacy triggers and enhance performance.

I hope I will have the possibility to build a real public system beginning from October. This will depend whether I find some sponsors and if I will stay working at FBK.

Announcing Dycapo Server v0.4.0, first complete Prototype

Saturday, May 22nd, 2010

I'm glad to announce the release of Dycapo Server v0.4.0. In this release I completed the set of possible operations that users can do, except the possibility to register to the System. All the methods are working, according to tests. I did not implemented security/privacy checks yet, this is planned for version v0.5.0.

You can download Dycapo Server from the download page at dycapo.org.

The following are the release notes for Dycapo Server v0.4.0.

RELEASE NOTES
***************

2010-05-22  Daniel Graziotin  

Dycapo v0.4.0 is the fourth prototype version on which we are building our APIs.

Dycapo v0.4.0 incorporates and shows:
* Adoption of Dycapo Protocol [http://dycapo.org/Protocol]
* The introduction of API [http://dycapo.org/Server/API]
* Integration of Dycapo models with Django models
* Authentication system
* A a Geo-location based search Algorithm
* Geo-location methods for Persons
* Insertion of a trip by a driver
* Start of a trip by a driver
* Search of a trip by a rider
* Send a ride request to a driver
* Let the driver accept the ride request
* Let the rider inform the system that the driver picked him/she
* Let the rider inform the system that the he/she arrived to destination
* Let the driver finish a Trip
* A full set of tests
CHANGES SINCE v0.3.0
***************

tests/
* All new XML-RPC methods covered

tests/test_multiple_matching.py
* methods to check the geolocation based algorithm of Dycapo

server/utils.py
* Bugs fixed

server/rider.py
* Added start_ride(trip) method, that informs the system that a Ride has
been started
* Added finish_ride(trip) method, that informs the system that a Ride
has been finished

server/models/prefs.py
* Overridden save() method that checks for duplicates in the Database and
saves space

server/models/mode.py
* Added a reference to Person for checking for duplicates in the Database and
saving space

server/models/location.py
* Added factory method get_location_from_geopy_point(point) that given a Geopy
Point, it returns the corresponding Dycapo Location object
* Added get_box_around(diagonal_meters) method that given a diagonal, it returns
a GeoRSS box around the location
* Added complete_fields() method that acts as a wrapper to the methods for
completing missing attributes of a Location, using geocoding

server/matching.py
* Enhanced get_trips_destination_near_location(destination) that now uses
Location.get_box_around() to compute a dynamic delta of latitude and longitude
* Enhanced get_trips_destination_near_location(destination) that also looks for
trips with empty seats

server/driver.py
* Enhanced add_trip() method that now re-uses Mode objects if already present
in the Database instead of creating a new one each time
* Fixed bugs in check_ride_requests(trip) method

Announcing Dycapo Server v0.3.0 – this one is serious

Wednesday, May 12th, 2010

It's a pleasure for me to announce the release v0.3.0 of Dycapo Server. This release brings in a lot of enhancements, bugs fixed and features. The greater one are the introduction of a real testing suite using py.test and a real driver-riders geolocated matching algorithm. I will also write an article regarding the algorithm today.
The following are the relase notes for Dycapo v0.3.0

RELEASE NOTES
***************

2010-05-11  Daniel Graziotin  

Dycapo v0.3.0 is the third prototype version on which we are building our APIs.

Dycapo v0.3.0 incorporates and shows:
* Adoption of Dycapo Protocol [http://dycapo.org/Protocol]
* The introduction of API [http://dycapo.org/Server/API]
* Integration of Dycapo models with Django models
* Authentication system
* Insertion of a trip by a driver
* Start of a trip by a driver
* Search of a trip by a rider
* A first prototype of a Geo-location based search Algorithm
* Geo-location methods for Persons
* Send a ride request to a driver
* Let the driver accept the ride request
* Let the driver finish a Trip
* A completely rewritten testing suite
CHANGES SINCE v0.2.0
***************
General:
* Dycapo Protocol fully adopted
* Code cleaner and refactored

server/utils.py
* Code cleaner, matching functions refactored in another file

server/driver.py
* Added finish_trip method

server/rider.py
* search_trip re-written, using a new algorithm with functions located in
server/matching.py

server/matching.py
* This new module holds all the matching functions of the search_trip()
geo-located algorithm
* get_trips_destination_near_location(location) returns all the active Trips
with a destination *around* a given Location
* exclude_trips_driver_closest_to_destination(trips, rider) excludes from a
QuerySet of Trips all the Trips in which the driver is closer to the rider
to the destination
* exclude_trips_driver_not_approaching_rider(trips, rider) excludes from a
QuerySet of Trips all the Trips in which the driver is getting away from
the rider. This method uses the recent locations of the Driver and some
maths functions written by myself
* get_proximity_factor(person, position) given a person and a location, it
determines if the person is approaching it or getting away from it, by
retrieving some recent locations of the person and computing their distance
from the location. The set of ordered distances is then given
to location_proximity_factor that retrives the factor
* location_proximity_factor(distances) given a list of distances, it computes
the approaching factor which is a natural number in (-inf , +inf)
If factor > 0, the numbers in list tend to decrease
If factor == 0, the numbers in list tend to stay around the same value
If factor < 0, the numbers in list tend to increase.
* location_distance_factor(distance1, distance2) given two distances,
returns 1 if the first distance is greater than the second one.
Returns -1 if the first distance is less than the second one.
Returns 0 if they are equal. 

server/models.py
* this file does not exist anymore, models are now in server/models folder

server/models/participation.py
* added locations field, to hold all the locations of each Person during a Trip

server/models/location.py
* added distance(location) method, that returns the distance in KMs from the
current location to a given one

server/models/trip.py
* added get_destination() method, that returns the Location representing the
destination of the Trip
* added get_participations() method, returns all the Participations of the Trip

server/models/person.py
* added get_recent_locations(max_results) method, returning the
last *max_results* Locations of the Person
* added is_participating() method, that returns True if the Person is
Participating to a Trip
* added get_active_participation() method, that returns the active Participation
of the Person, if any
* added get_participating_trip() that returns the Trip in which the Person
is participating, if any

tests/
* Completely rewritten testing suite, using py.test [http://pytest.org]
* There are currently 26 XML-RPC tests, covering driver functions, rider
functions, simple matching and complex matchings

As always, you are encouraged to download Dycapo Server and eventually join the whole project.

Dycapo Server, road to v0.3.0

Saturday, May 1st, 2010

The next Dycapo Server release will include new features. For now on, I am focusing on:

  • Completely rewriting the tests. Current tests are more like a micro-world simulation. I will move them to a folder called 'world' and write some real tests using a testing framework like unittest or py lib
  • Writing a first real ride searching algorithm. The contribution of Paolo Massa is bringing to Dycapo a tiny geo-math library that will be merged with an algorithm I am writing to filter the Active trips based on the destination. The library will help me to better decide which trips should be returned to the rider based on some nice mathematics parameters applied to its position and destination.
  • Fixing lots of bugs. My colleaugue Riccardo Buttarelli is writing the first Dycapo client using Android (Java). His attempts to use Dycapo functions are really useful for me to find unexpected bugs and leaks in the Protocol.

I hope to be able to release it before next Friday. Stay tuned.