Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Commit

Permalink
Added licence headers on all files
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristramg committed Jul 27, 2010
1 parent 76b4290 commit ea5baca
Show file tree
Hide file tree
Showing 20 changed files with 349 additions and 37 deletions.
23 changes: 0 additions & 23 deletions INSTALL

This file was deleted.

10 changes: 8 additions & 2 deletions README
Expand Up @@ -2,14 +2,20 @@ Mumoro: MUltiModal MUltiObjective ROuting

This library aims to provide multimodal routing: combining subway, walking and bike.

It is also multiobjective: it finds the best route optimizing according to time taken,
mode changes, CO2 emissions etc.
If there are two routes, the first being faster but emits more CO2 (100% by car) than
an other route (100% cycling), it will return both routes as none is strictly better than
an other.

The lib folder provides the algorithms
The web folder is an example of web application (can be run as standalone web server)


== Requirements ==
On ubuntu or debian, please install the developpment versions
* GCC: C++ complier (other aren't testetd)
* Boost: no C++ dev should live without it (used for its Dijkstra's algorithm)
Only the headers are needed
* Boost: (used for graph the graph structures and serialization)
* Python
* Swig: for interfacing python

Expand Down
20 changes: 20 additions & 0 deletions data_import.py
@@ -1,3 +1,23 @@
# -*- coding: utf-8 -*-

# This file is part of Mumoro.
#
# Mumoro is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Mumoro is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Mumoro. If not, see <http://www.gnu.org/licenses/>.
#
# © Université de Toulouse 1 2010
# Author: Tristram Gräbener, Odysseas Gabrielides

import sys
from lib.core.mumoro import *
import osm4routing
Expand Down
20 changes: 20 additions & 0 deletions lib/bikestations.py
@@ -1,3 +1,23 @@
# -*- coding: utf-8 -*-

# This file is part of Mumoro.
#
# Mumoro is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Mumoro is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Mumoro. If not, see <http://www.gnu.org/licenses/>.
#
# © Université de Toulouse 1 2010
# Author: Tristram Gräbener, Odysseas Gabrielides

import os.path
import urllib
import datetime
Expand Down
18 changes: 18 additions & 0 deletions lib/core/graph_wrapper.cpp
@@ -1,3 +1,21 @@
/* This file is part of Mumoro.
Mumoro is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Mumoro is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Mumoro. If not, see <http://www.gnu.org/licenses/>.
© Université de Toulouse 1 2010
Author: Tristram Gräbener*/

#include "graph_wrapper.h"
#include <iostream>
#include <fstream>
Expand Down
18 changes: 18 additions & 0 deletions lib/core/graph_wrapper.h
@@ -1,3 +1,21 @@
/* This file is part of Mumoro.
Mumoro is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Mumoro is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Mumoro. If not, see <http://www.gnu.org/licenses/>.
© Université de Toulouse 1 2010
Author: Tristram Gräbener*/

#include <boost/graph/adjacency_list.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/serialization/map.hpp>
Expand Down
18 changes: 18 additions & 0 deletions lib/core/martins.cpp
@@ -1,3 +1,21 @@
/* This file is part of Mumoro.
Mumoro is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Mumoro is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Mumoro. If not, see <http://www.gnu.org/licenses/>.
© Université de Toulouse 1 2010
Author: Tristram Gräbener*/

#include "martins_impl.h"
#include "martins.h"

Expand Down
18 changes: 18 additions & 0 deletions lib/core/martins.h
@@ -1,3 +1,21 @@
/* This file is part of Mumoro.
Mumoro is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Mumoro is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Mumoro. If not, see <http://www.gnu.org/licenses/>.
© Université de Toulouse 1 2010
Author: Tristram Gräbener*/

#ifndef MARTINS_H
#define MARTINS_H

Expand Down
18 changes: 18 additions & 0 deletions lib/core/martins_impl.h
@@ -1,3 +1,21 @@
/* This file is part of Mumoro.
Mumoro is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Mumoro is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Mumoro. If not, see <http://www.gnu.org/licenses/>.
© Université de Toulouse 1 2010
Author: Tristram Gräbener*/

#ifndef MARTINS_IMPL_H
#define MARTINS_IMPL_H

Expand Down
18 changes: 18 additions & 0 deletions lib/core/tsaggouris.cpp
@@ -1,3 +1,21 @@
/* This file is part of Mumoro.
Mumoro is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Mumoro is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Mumoro. If not, see <http://www.gnu.org/licenses/>.
© Université de Toulouse 1 2010
Author: Tristram Gräbener*/

#include "tsaggouris.h"

#include <math.h>
Expand Down
18 changes: 18 additions & 0 deletions lib/core/tsaggouris.h
@@ -1,3 +1,21 @@
/* This file is part of Mumoro.
Mumoro is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Mumoro is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Mumoro. If not, see <http://www.gnu.org/licenses/>.
© Université de Toulouse 1 2010
Author: Tristram Gräbener*/

#include "graph_wrapper.h"
#ifndef TSAGGOURIS_H
#define TSAGGOURIS_H
Expand Down
20 changes: 20 additions & 0 deletions lib/datastructures.py
@@ -1,3 +1,23 @@
# -*- coding: utf-8 -*-

# This file is part of Mumoro.
#
# Mumoro is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Mumoro is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Mumoro. If not, see <http://www.gnu.org/licenses/>.
#
# © Université de Toulouse 1 2010
# Author: Tristram Gräbener, Odysseas Gabrielides

from sqlalchemy import *

class Metadata(object):
Expand Down
20 changes: 20 additions & 0 deletions lib/elevation.py
@@ -1,3 +1,23 @@
# -*- coding: utf-8 -*-

# This file is part of Mumoro.
#
# Mumoro is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Mumoro is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Mumoro. If not, see <http://www.gnu.org/licenses/>.
#
# © Université de Toulouse 1 2010
# Author: Tristram Gräbener, Odysseas Gabrielides

import array
import math
import zipfile
Expand Down
20 changes: 20 additions & 0 deletions lib/gtfs_reader.py
@@ -1,3 +1,23 @@
# -*- coding: utf-8 -*-

# This file is part of Mumoro.
#
# Mumoro is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Mumoro is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Mumoro. If not, see <http://www.gnu.org/licenses/>.
#
# © Université de Toulouse 1 2010
# Author: Tristram Gräbener

from datastructures import *
import sys
import transitfeed
Expand Down
40 changes: 33 additions & 7 deletions lib/kalkati_reader.py
@@ -1,3 +1,23 @@
# -*- coding: utf-8 -*-

# This file is part of Mumoro.
#
# Mumoro is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Mumoro is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Mumoro. If not, see <http://www.gnu.org/licenses/>.
#
# © Université de Toulouse 1 2010
# Author: Tristram Gräbener

from datastructures import *
import sys
import datetime
Expand Down Expand Up @@ -106,8 +126,11 @@ def startElement(self, name, attrs):
self.service = attrs["ServiceId"]
self.prev_stop = None
self.prev_time = None
self.map = {}


elif name == "ServiceNbr": #[1..1] in Service
self.trip = attrs["ServiceNbr"]
if not self.map.has_key(self.trip):
self.map[self.trip] = {}

elif name == "ServiceValidity": # in Service
self.footnote = attrs["FootnoteId"]
Expand All @@ -120,11 +143,11 @@ def startElement(self, name, attrs):

elif name == "Stop": #[1..*] in Service
station = attrs["StationId"]
if not self.map.has_key(station):
self.map[station] = self.count
if not self.map[self.trip].has_key(station):
self.map[self.trip][station] = self.count
self.count += 1

current_stop = self.map[attrs["StationId"]]
self.session.add(PT_Node(station, self.stations[station]["x"],self.stations[station]["y"], self.trip))
current_stop = self.map[self.trip][station]
if attrs.has_key("Arrival"):
arrival = int(attrs["Arrival"]) * 60
else:
Expand All @@ -136,7 +159,7 @@ def startElement(self, name, attrs):


if self.prev_stop:
length = distance( (self.stations[station]["x"],self.stations[station]["x"]), (self.prev_lon, self.prev_lat))
length = distance( (self.stations[station]["x"],self.stations[station]["y"]), (self.prev_lon, self.prev_lat))


self.session.add(PT_Edge(
Expand Down Expand Up @@ -172,6 +195,9 @@ def endElement(self, name):
if name == "Synonym":
self.synonym = False

def endDocument(self):
self.session.commit()

def convert(filename, session, start_date, end_date):
handler = KalkatiHandler(session, start_date, end_date)
session.commit()
Expand Down

0 comments on commit ea5baca

Please sign in to comment.