PGROUTING  2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VRP.h
Go to the documentation of this file.
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 SRC_VRP_BASIC_SRC_VRP_H_
25 #define SRC_VRP_BASIC_SRC_VRP_H_
26 
27 #include <stddef.h>
28 
29 typedef struct vrp_vehicles {
30  int id;
31  int capacity;
33 
34 
35 typedef struct vrp_orders {
36  int id;
38  int open_time;
41 
42  double x;
43  double y;
44 } vrp_orders_t;
45 
46 typedef struct vrp_cost_element {
47  int src_id;
48  int dest_id;
49  double cost;
50  double distance;
51  double traveltime;
53 
54 
55 typedef struct vrp_result_element {
56  int order_id;
57  int order_pos;
62 
63 
64 #ifdef __cplusplus
65 extern "C" {
66 #endif
67 
68 int find_vrp_solution(vrp_vehicles_t *vehicles, size_t vehicle_count,
69  vrp_orders_t *orders, size_t order_count,
70  vrp_cost_element_t *costmatrix, size_t cost_count,
71  int depot_id,
72  vrp_result_element_t **result, size_t *result_count, char **err_msg);
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif // SRC_VRP_BASIC_SRC_VRP_H_
int capacity
Definition: VRP.h:31
struct vrp_vehicles vrp_vehicles_t
double y
Definition: VRP.h:43
struct vrp_orders vrp_orders_t
struct vrp_result_element vrp_result_element_t
int depart_time
Definition: VRP.h:60
int id
Definition: VRP.h:30
int service_time
Definition: VRP.h:40
double distance
Definition: VRP.h:50
int dest_id
Definition: VRP.h:48
int open_time
Definition: VRP.h:38
double traveltime
Definition: VRP.h:51
int order_unit
Definition: VRP.h:37
struct vrp_cost_element vrp_cost_element_t
int order_id
Definition: VRP.h:56
int id
Definition: VRP.h:36
int arrival_time
Definition: VRP.h:59
int order_pos
Definition: VRP.h:57
int find_vrp_solution(vrp_vehicles_t *vehicles, size_t vehicle_count, vrp_orders_t *orders, size_t order_count, vrp_cost_element_t *costmatrix, size_t cost_count, int depot_id, vrp_result_element_t **result, size_t *result_count, char **err_msg)
Definition: VRP_core.cpp:139
int src_id
Definition: VRP.h:47
Definition: VRP.h:35
double cost
Definition: VRP.h:49
char * err_msg
Definition: BDATester.cpp:50
int close_time
Definition: VRP.h:39
double x
Definition: VRP.h:42
int vehicle_id
Definition: VRP.h:58