![]() |
vrpRouting
0.3
|
#include "drivers/optimize_driver.h"
#include <cstring>
#include <sstream>
#include <string>
#include <vector>
#include <utility>
#include <algorithm>
#include "problem/pickDeliver.h"
#include "c_types/pickDeliveryOrders_t.h"
#include "c_types/short_vehicle_rt.h"
#include "c_types/vehicle_t.h"
#include "problem/matrix.h"
#include "cpp_common/pgr_assert.h"
#include "cpp_common/pgr_messages.h"
#include "initialsol/tabu.h"
#include "optimizers/tabu.h"
#include "c_common/pgr_alloc.hpp"
#include "cpp_common/interruption.h"
Go to the source code of this file.
Namespaces | |
anonymous_namespace{optimize_driver.cpp} | |
Functions | |
void | do_optimize (PickDeliveryOrders_t *shipments_arr, size_t total_shipments, Vehicle_t *vehicles_arr, size_t total_vehicles, Matrix_cell_t *matrix_cells_arr, size_t total_cells, Time_multipliers_t *multipliers_arr, size_t total_multipliers, double factor, int max_cycles, int64_t execution_date, bool check_triangle_inequality, bool subdivide, bool subdivide_by_vehicle, Short_vehicle_rt **return_tuples, size_t *return_count, char **log_msg, char **notice_msg, char **err_msg) |
std::vector< Short_vehicle > | anonymous_namespace{optimize_driver.cpp}::get_initial_stops (Vehicle_t *vehicles_arr, size_t total_vehicles) |
get the original stops More... | |
std::vector< Short_vehicle > | anonymous_namespace{optimize_driver.cpp}::one_processing (PickDeliveryOrders_t *shipments_arr, size_t total_shipments, Vehicle_t *vehicles_arr, size_t total_vehicles, std::vector< Short_vehicle > new_stops, const vrprouting::problem::Matrix &time_matrix, int max_cycles, int64_t execution_date) |
Executes an optimization with the input data. More... | |
Identifiers< TTimestamp > | anonymous_namespace{optimize_driver.cpp}::processing_times_by_shipment (PickDeliveryOrders_t *shipments_arr, size_t total_shipments) |
: extract the times where the shipments opens or closes More... | |
Identifiers< TTimestamp > | anonymous_namespace{optimize_driver.cpp}::processing_times_by_vehicle (Vehicle_t *vehicles_arr, size_t total_vehicles) |
: extract the times where the vehicle opens or closes More... | |
std::vector< Short_vehicle > | anonymous_namespace{optimize_driver.cpp}::subdivide_processing (PickDeliveryOrders_t *shipments_arr, size_t total_shipments, Vehicle_t *vehicles_arr, size_t total_vehicles, const vrprouting::problem::Matrix &time_matrix, int max_cycles, int64_t execution_date, bool subdivide_by_vehicle, std::ostringstream &log) |
Executes an optimization by subdivision of data. More... | |
void | anonymous_namespace{optimize_driver.cpp}::update_stops (std::vector< Short_vehicle > &the_stops, const std::vector< Short_vehicle > new_values) |
Update the vehicle stops to the new values. More... | |
void do_optimize | ( | PickDeliveryOrders_t * | shipments_arr, |
size_t | total_shipments, | ||
Vehicle_t * | vehicles_arr, | ||
size_t | total_vehicles, | ||
Matrix_cell_t * | matrix_cells_arr, | ||
size_t | total_cells, | ||
Time_multipliers_t * | multipliers_arr, | ||
size_t | total_multipliers, | ||
double | factor, | ||
int | max_cycles, | ||
int64_t | execution_date, | ||
bool | check_triangle_inequality, | ||
bool | subdivide, | ||
bool | subdivide_by_vehicle, | ||
Short_vehicle_rt ** | return_tuples, | ||
size_t * | return_count, | ||
char ** | log_msg, | ||
char ** | notice_msg, | ||
char ** | err_msg | ||
) |
[in] | shipments_arr | A C Array of pickup and dropoff shipments |
[in] | total_shipments | size of the shipments_arr |
[in] | vehicles_arr | A C Array of vehicles |
[in] | total_vehicles | size of the vehicles_arr |
[in] | matrix_cells_arr | A C Array of the (time) matrix cells |
[in] | total_cells | size of the matrix_cells_arr |
[in] | multipliers_arr | A C Array of the multipliers |
[in] | total_multipliers | size of the multipliers_arr |
[in] | optimize | flag to control optimization |
[in] | factor | A global multiplier for the (time) matrix cells |
[in] | max_cycles | number of cycles to perform during the optimization phase |
[in] | stop_on_all_served | Indicator to stop optimization when all shipments are served |
[in] | execution_date | Value used for not moving shipments that are before this date |
[out] | return_tuples | C array of contents to be returned to postgres |
[out] | return_count | number of tuples returned |
[out] | log_msg | special log message pointer |
[out] | notice_msg | special message pointer to be returned as NOTICE |
[out] | err_msg | special message pointer to be returned as ERROR |
Definition at line 350 of file optimize_driver.cpp.
References PickDeliveryOrders_t::deliver_node_id, Vehicle_t::end_close_t, Vehicle_t::end_node_id, vrprouting::base::Base_Matrix::fix_triangle_inequality(), Identifiers< T >::has(), vrprouting::base::Base_Matrix::has_no_infinity(), Vehicle_t::id, PickDeliveryOrders_t::id, vrprouting::base::Base_Matrix::obeys_triangle_inequality(), anonymous_namespace{optimize_driver.cpp}::one_processing(), pgassert, pgr_alloc(), pgr_msg(), PickDeliveryOrders_t::pick_node_id, Identifiers< T >::size(), Vehicle_t::start_node_id, Vehicle_t::stops, Vehicle_t::stops_size, anonymous_namespace{optimize_driver.cpp}::subdivide_processing(), and AssertFailedException::what().
Referenced by process().