Skip to content

Commit

Permalink
Merge pull request #123 from cvvergara/pd/issue122
Browse files Browse the repository at this point in the history
Pd/issue122
  • Loading branch information
cvvergara authored May 12, 2017
2 parents 82f86d0 + 05331b4 commit bc7c4d9
Show file tree
Hide file tree
Showing 110 changed files with 1,247 additions and 1,322 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ set(PgRouting_SOURCE_NAMES
#----------------------
"max_flow" # 2.3
"contraction" # 2.3
"pickDeliver" # 2.3
#"pickDeliver" # 2.3
"pickDeliverE" # 2.5
"vrp_basic" # 2.0
"withPoints" # 2.2
Expand Down Expand Up @@ -192,8 +192,10 @@ endif()

if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
message(STATUS "Using -std=c++11.")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
message(STATUS "Using -std=c++0x.")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++0x or C++11 flags support.")
endif()
Expand Down
1 change: 1 addition & 0 deletions doc/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ exclude_patterns = [
'doc/build',
'pgr_withPointsVia.rst',
'pgr_pickDeliver.rst',
'pgr_pickDeliverEuclidean.rst',
'src/pickDeliver',
'maxFlowApplications.rst',
'*/notUsed',
Expand Down
4 changes: 2 additions & 2 deletions doc/src/pgRouting-concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,13 @@ Where:

.. pd_euclidean_sql_start

.. note:: TODO
.. note TODO

.. pd_euclidean_sql_end

.. pd_vehicle_sql_start

.. note:: TODO
.. note TODO

.. pd_vehicle_sql_end

Expand Down
4 changes: 2 additions & 2 deletions doc/src/proposed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ Experimental and Proposed functions

.. rubric:: Vehicle Routing Problems

- :ref:`pgr_pickDeliverEuclidean` - VRP Pickup & Delivery with Euclidean distances
- :ref:`pgr_gsocvrppdtw` - VRP Pickup & Delivery (Euclidean)
- :ref:`pgr_vrp_basic` - VRP One Depot

Expand All @@ -152,7 +151,6 @@ Experimental and Proposed functions
contraction-family
flow-family
pgr_labelGraph
pgr_pickDeliverEuclidean
pgr_gsoc_vrppdtw
pgr_vrpOneDepot

Expand All @@ -171,4 +169,6 @@ Experimental and Proposed functions
:hidden:
..
../src/funnyDijkstra/doc/pgr_funnyDijkstra.rst
- :ref:`pgr_pickDeliverEuclidean` - VRP Pickup & Delivery with Euclidean distances
pgr_pickDeliverEuclidean
4 changes: 2 additions & 2 deletions doxygen/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ INLINE_INHERITED_MEMB = YES
# shortest path that makes the file name unique will be used
# The default value is: YES.

FULL_PATH_NAMES = NO
FULL_PATH_NAMES = YES

# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
# Stripping is only done if one of the specified strings matches the left-hand
Expand Down Expand Up @@ -806,7 +806,7 @@ EXCLUDE_SYMLINKS = NO
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/*

EXCLUDE_PATTERNS = */notUsed/* */test/* */src/trsp/doc/README.md
EXCLUDE_PATTERNS = */notUsed/* */test/* */src/trsp/doc/README.md */pickDeliver/*

# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
Expand Down
6 changes: 2 additions & 4 deletions include/c_common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ Example

in `foo.c` file

```
#include "c_input/edges_input.h"
#include "c_input/arrays_input.h"
```
#include "c_common/edges_input.h"
#include "c_common/arrays_input.h"

2 changes: 2 additions & 0 deletions include/cpp_common/Dmatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
********************************************************************PGR-GNU*/

/*! @file */

#ifndef INCLUDE_CPP_COMMON_DMATRIX_H_
#define INCLUDE_CPP_COMMON_DMATRIX_H_
#pragma once
Expand Down
2 changes: 2 additions & 0 deletions include/cpp_common/basePath_SSEC.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
********************************************************************PGR-GNU*/

/*! @file */

#ifndef INCLUDE_CPP_COMMON_BASEPATH_SSEC_HPP_
#define INCLUDE_CPP_COMMON_BASEPATH_SSEC_HPP_
#pragma once
Expand Down
2 changes: 2 additions & 0 deletions include/cpp_common/basic_edge.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
********************************************************************PGR-GNU*/

/*! @file */

#ifndef INCLUDE_CPP_COMMON_BASIC_EDGE_H_
#define INCLUDE_CPP_COMMON_BASIC_EDGE_H_
#pragma once
Expand Down
2 changes: 2 additions & 0 deletions include/cpp_common/basic_vertex.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
********************************************************************PGR-GNU*/

/*! @file */

#ifndef INCLUDE_CPP_COMMON_BASIC_VERTEX_H_
#define INCLUDE_CPP_COMMON_BASIC_VERTEX_H_
#pragma once
Expand Down
59 changes: 59 additions & 0 deletions include/cpp_common/identifier.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*PGR-GNU*****************************************************************
*
Copyright (c) 2017 Celia Virginia Vergara Castillo
vicky_vergara@hotmail.com
------
This program 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 2 of the License, or
(at your option) any later version.
This program 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 this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
********************************************************************PGR-GNU*/

/*! @file */

#ifndef INCLUDE_CPP_COMMON_IDENTIFIER_H_
#define INCLUDE_CPP_COMMON_IDENTIFIER_H_
#pragma once

#if defined(__MINGW32__) || defined(_MSC_VER)
#include <stdint.h>
#endif

#include <ostream>

namespace pgrouting {

class Identifier {
public:
Identifier() = default;
Identifier(const Identifier &v) = default;
Identifier(const size_t _idx, const int64_t _id);

int64_t id() const;
size_t idx() const;
void reset_id(int64_t);

friend std::ostream& operator<<(std::ostream& log, const Identifier&);

private:
size_t m_idx;
int64_t m_id;
};


} // namespace pgrouting

#endif // INCLUDE_CPP_COMMON_IDENTIFIER_H_
2 changes: 2 additions & 0 deletions include/cpp_common/identifiers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
********************************************************************PGR-GNU*/

/*! @file */

#ifndef INCLUDE_CPP_COMMON_IDENTIFIERS_HPP_
#define INCLUDE_CPP_COMMON_IDENTIFIERS_HPP_
#pragma once
Expand Down
1 change: 1 addition & 0 deletions include/cpp_common/path_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
********************************************************************PGR-GNU*/

/*! @file */

#ifndef INCLUDE_CPP_COMMON_PATH_T_H_
Expand Down
4 changes: 3 additions & 1 deletion include/cpp_common/pgr_alloc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
********************************************************************PGR-GNU*/

/*! @file */

#ifndef INCLUDE_CPP_COMMON_PGR_ALLOC_HPP_
#define INCLUDE_CPP_COMMON_PGR_ALLOC_HPP_
#pragma once
Expand All @@ -36,7 +38,7 @@ extern "C" {
#endif

#include "c_common/postgres_connection.h"
#include <utils/palloc.h>
#include "utils/palloc.h"
}

#include <string>
Expand Down
2 changes: 2 additions & 0 deletions include/cpp_common/pgr_base_graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
********************************************************************PGR-GNU*/

/*! @file */

#ifndef INCLUDE_CPP_COMMON_PGR_BASE_GRAPH_HPP_
#define INCLUDE_CPP_COMMON_PGR_BASE_GRAPH_HPP_
#pragma once
Expand Down
2 changes: 2 additions & 0 deletions include/cpp_common/pgr_bidirectional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
********************************************************************PGR-GNU*/

/*! @file */

#ifndef INCLUDE_CPP_COMMON_PGR_BIDIRECTIONAL_HPP_
#define INCLUDE_CPP_COMMON_PGR_BIDIRECTIONAL_HPP_
#pragma once
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
********************************************************************PGR-GNU*/

/*! @file pgr_messages.h */
/*! @file */

#ifndef INCLUDE_PICKDELIVER_PGR_MESSAGES_H_
#define INCLUDE_PICKDELIVER_PGR_MESSAGES_H_
#ifndef INCLUDE_CPP_COMMON_PGR_MESSAGES_H_
#define INCLUDE_CPP_COMMON_PGR_MESSAGES_H_
#pragma once


Expand All @@ -35,9 +35,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#include <sstream>

namespace pgrouting {
namespace vrp {
namespace pickdeliver {


class Pgr_messages {
public:
Expand All @@ -61,6 +58,12 @@ class Pgr_messages {
*/
std::string get_notice() const;

/*! @brief get_error
*
* @returns the current contents of the log and clears the log
*/
bool has_error() const;

/*! @brief get_error
*
* @returns the current contents of the log and clears the log
Expand All @@ -84,22 +87,40 @@ class Pgr_messages {
std::string get_dbglog() const;
#endif

#if 0
void entering(const char* function) {
#if defined(__MINGW32__) || defined(_MSC_VER)
#else
log << "ENTERING: " << function << "\n";
#endif
}
#endif


public:
/*! Stores the hint information*/
std::ostringstream log;
mutable std::ostringstream log;
/*! Stores the notice information*/
std::ostringstream notice;
mutable std::ostringstream notice;
/*! Stores the error information*/
std::ostringstream error;
mutable std::ostringstream error;
#ifndef NDEBUG
mutable std::ostringstream dbg_log;
#endif
};

} // namespace pickdeliver
} // namespace vrp


#if defined(__MINGW32__) || defined(_MSC_VER)
#define ENTERING()
#define EXITING()
#else
#define ENTERING() msg.log << "--> " << __PRETTY_FUNCTION__ << "\n"
#define EXITING() msg.log << "<-- " << __PRETTY_FUNCTION__ << "\n"
#endif



} // namespace pgrouting

#endif // INCLUDE_PICKDELIVER_PGR_MESSAGES_H_
#endif // INCLUDE_CPP_COMMON_PGR_MESSAGES_H_
2 changes: 2 additions & 0 deletions include/cpp_common/xy_vertex.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
********************************************************************PGR-GNU*/

/*! @file */

#ifndef INCLUDE_CPP_COMMON_XY_VERTEX_H_
#define INCLUDE_CPP_COMMON_XY_VERTEX_H_
#pragma once
Expand Down
7 changes: 4 additions & 3 deletions include/drivers/pickDeliver/pickDeliverEuclidean_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

/*! @file pickDeliverEuclidean_driver.h */

#ifndef SRC_PICKDELIVER_SRC_PICKDELIVEREUCLIDEAN_DRIVER_H_
#define SRC_PICKDELIVER_SRC_PICKDELIVEREUCLIDEAN_DRIVER_H_
#ifndef INCLUDE_DRIVERS_PICKDELIVER_PICKDELIVEREUCLIDEAN_DRIVER_H_
#define INCLUDE_DRIVERS_PICKDELIVER_PICKDELIVEREUCLIDEAN_DRIVER_H_
#pragma once

#include "c_types/pickDeliver/general_vehicle_orders_t.h"
Expand All @@ -50,6 +50,7 @@ extern "C" {
PickDeliveryOrders_t *pd_orders_arr, size_t total_pd_orders,
Vehicle_t *vehicles_arr, size_t total_vehicles,

double factor,
int max_cycles,
int initial_solution_id,

Expand All @@ -65,4 +66,4 @@ extern "C" {
}
#endif

#endif // SRC_PICKDELIVER_SRC_PICKDELIVEREUCLIDEAN_DRIVER_H_
#endif // INCLUDE_DRIVERS_PICKDELIVER_PICKDELIVEREUCLIDEAN_DRIVER_H_
6 changes: 3 additions & 3 deletions include/drivers/pickDeliver/pickDeliver_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

/*! @file pickDeliver_driver.h */

#ifndef SRC_PICKDELIVER_SRC_PICKDELIVER_DRIVER_H_
#define SRC_PICKDELIVER_SRC_PICKDELIVER_DRIVER_H_
#ifndef INCLUDE_DRIVERS_PICKDELIVER_PICKDELIVER_DRIVER_H_
#define INCLUDE_DRIVERS_PICKDELIVER_PICKDELIVER_DRIVER_H_
#pragma once

#include "c_types/pickDeliver/pickDeliveryOrders_t.h"
Expand Down Expand Up @@ -67,4 +67,4 @@ extern "C" {
}
#endif

#endif // SRC_PICKDELIVER_SRC_PICKDELIVER_DRIVER_H_
#endif // INCLUDE_DRIVERS_PICKDELIVER_PICKDELIVER_DRIVER_H_
Loading

0 comments on commit bc7c4d9

Please sign in to comment.