pgRouting  2.2
pgRouting extends the PostGIS / PostgreSQL geospatial database to provide geospatial routing functionality.
 All Classes Functions Variables Pages
VRP.h
1 /*PGR-GNU*****************************************************************
2 
3 Copyright (c) 2013 Khondoker Md. Razequl Islam
4 ziboncsedu@gmail.com
5 
6 ------
7 
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12 
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 
22 ********************************************************************PGR-GNU*/
23 
24 #ifndef _VRP_H
25 #define _VRP_H
26 
27 #include "postgres.h"
28 
29 
30 typedef struct vrp_vehicles
31 {
32  int id;
33  int capacity;
34 
36 
37 
38 typedef struct vrp_orders
39 {
40  int id;
41  int order_unit;
42  int open_time;
43  int close_time;
44  int service_time;
45 
46  float8 x;
47  float8 y;
48 
49 } vrp_orders_t;
50 
51 typedef struct vrp_cost_element
52 {
53  int src_id;
54  int dest_id;
55  double cost;
56  double distance;
57  double traveltime;
58 
60 
61 
62 typedef struct vrp_result_element
63 {
64  int order_id;
65  int order_pos;
66  int vehicle_id;
67  int arrival_time;
68  int depart_time;
70 
71 
72 #ifdef __cplusplus
73 extern "C"
74 #endif
75 
76 int find_vrp_solution(vrp_vehicles_t *vehicles, size_t vehicle_count,
77  vrp_orders_t *orders, size_t order_count,
78  vrp_cost_element_t *costmatrix, size_t cost_count,
79  int depot_id,
80  vrp_result_element_t **result, size_t *result_count, char **err_msg);
81 
82 #ifdef __cplusplus
83 extern "C"
84 #endif
85 
86 #endif
Definition: VRP.h:38