![]() |
vrpRouting
0.3
|
#include "order.h"
Public Member Functions | |
Order ()=delete | |
Order without data is not permitted. More... | |
Order (const Order &)=default | |
copy constructor More... | |
Order (Idx o_idx, Id o_id, const Vehicle_node &p_pickup, const Vehicle_node &p_delivery) | |
initializing an order with the pick & drop information More... | |
bool | is_valid (Speed speed=1.0) const |
is the order valid? More... | |
bool | isCompatibleIJ (const Order &I, Speed speed=1.0) const |
Can order I be placed before this order? More... | |
void | set_compatibles (const Order &, Speed speed=1.0) |
set compatability of this orther with the other order More... | |
Accessors | |
const Vehicle_node & | pickup () const |
The pickup node identifier. More... | |
const Vehicle_node & | delivery () const |
The delivery node identifier. More... | |
Identifiers< size_t > | subsetJ (const Identifiers< size_t > &J) const |
Get a subset of the orders that can be placed after this order. More... | |
Identifiers< size_t > | subsetI (const Identifiers< size_t > &I) const |
Get a subset of the orders that can be placed before this order. More... | |
Protected Attributes | |
Identifiers< size_t > | m_compatibleI |
Storage for the orders that can be placed before this order. More... | |
Identifiers< size_t > | m_compatibleJ |
Storage for the orders that can be placed after this order. More... | |
Vehicle_node | m_delivery |
The delivery node identifier. More... | |
Vehicle_node | m_pickup |
The pick up node identifier. More... | |
Private Attributes | |
int64_t | m_id |
size_t | m_idx |
Friends | |
std::ostream & | operator<< (std::ostream &, const Order &) |
Print the order. More... | |
|
delete |
Order without data is not permitted.
|
default |
copy constructor
|
inline |
initializing an order with the pick & drop information
|
inline |
The delivery node identifier.
Definition at line 68 of file order.h.
References m_delivery.
Referenced by vrprouting::problem::Vehicle_pickDeliver::erase(), vrprouting::problem::Vehicle_pickDeliver::hillClimb(), is_valid(), isCompatibleIJ(), vrprouting::problem::operator<<(), vrprouting::problem::Vehicle_pickDeliver::push_back(), vrprouting::problem::Vehicle_pickDeliver::push_front(), and vrprouting::problem::Vehicle_pickDeliver::semiLIFO().
|
inherited |
get the original id
Definition at line 42 of file identifier.cpp.
References vrprouting::Identifier::m_id.
Referenced by vrprouting::problem::Vehicle_node::get_postgres_result(), vrprouting::problem::Vehicle_pickDeliver::hillClimb(), vrprouting::problem::Vehicle::is_phony(), vrprouting::operator<<(), vrprouting::problem::operator<<(), vrprouting::problem::Tw_node::operator==(), vrprouting::problem::Vehicle_pickDeliver::set_initial_solution(), vrprouting::problem::Vehicle_pickDeliver::set_unmovable(), vrprouting::problem::Vehicle::tau(), and vrprouting::problem::Tw_node::travel_time_to().
|
inherited |
get the internal index
Definition at line 37 of file identifier.cpp.
References vrprouting::Identifier::m_idx.
Referenced by vrprouting::problem::Vehicle_pickDeliver::erase(), vrprouting::problem::Vehicle::erase(), vrprouting::problem::Vehicle_pickDeliver::has_order(), vrprouting::problem::Vehicle_pickDeliver::hillClimb(), vrprouting::operator<<(), vrprouting::problem::operator<<(), vrprouting::problem::Tw_node::operator==(), vrprouting::problem::Vehicle_pickDeliver::push_back(), vrprouting::problem::Vehicle_pickDeliver::push_front(), vrprouting::problem::Vehicle_pickDeliver::semiLIFO(), set_compatibles(), and vrprouting::problem::Vehicle::tau().
bool vrprouting::problem::Order::is_valid | ( | Speed | speed = 1.0 | ) | const |
is the order valid?
[in] | speed | value to do the calculation |
Validate a pickup/delivery order
Definition at line 109 of file order.cpp.
References delivery(), vrprouting::problem::Tw_node::is_compatible_IJ(), vrprouting::problem::Tw_node::is_delivery(), vrprouting::problem::Tw_node::is_pickup(), and pickup().
Referenced by vrprouting::problem::Fleet::is_order_ok().
Can order I be placed before this order?
[in] | I | order |
[in] | speed | value to do the calculation |
Definition at line 161 of file order.cpp.
References delivery(), vrprouting::problem::Tw_node::is_compatible_IJ(), and pickup().
Referenced by set_compatibles().
|
inline |
The pickup node identifier.
Definition at line 65 of file order.h.
References m_pickup.
Referenced by vrprouting::problem::Vehicle_pickDeliver::erase(), vrprouting::problem::Vehicle_pickDeliver::hillClimb(), is_valid(), isCompatibleIJ(), vrprouting::problem::operator<<(), vrprouting::problem::Vehicle_pickDeliver::push_back(), vrprouting::problem::Vehicle_pickDeliver::push_front(), and vrprouting::problem::Vehicle_pickDeliver::semiLIFO().
|
inherited |
change the original id
Definition at line 47 of file identifier.cpp.
References vrprouting::Identifier::m_id.
Referenced by vrprouting::problem::Tw_node::Tw_node().
set compatability of this orther with the other order
Initializing the set of nodes that can be placed immediately after this node.
(this) -> J
[in] | J | order after this node |
[in] | speed | value to do the calculation |
Definition at line 130 of file order.cpp.
References vrprouting::Identifier::idx(), isCompatibleIJ(), m_compatibleI, and m_compatibleJ.
Identifiers< size_t > vrprouting::problem::Order::subsetI | ( | const Identifiers< size_t > & | I | ) | const |
Get a subset of the orders that can be placed before this order.
[in] | I | Set of orders that possibly are I -> this ![]() |
Definition at line 45 of file order.cpp.
References m_compatibleI.
Identifiers< size_t > vrprouting::problem::Order::subsetJ | ( | const Identifiers< size_t > & | J | ) | const |
Get a subset of the orders that can be placed after this order.
[in] | J | Set of orders that possibly are this -> J ![]() |
Definition at line 62 of file order.cpp.
References m_compatibleJ.
|
friend |
|
protected |
Storage for the orders that can be placed before this order.
Definition at line 110 of file order.h.
Referenced by vrprouting::problem::operator<<(), set_compatibles(), and subsetI().
|
protected |
Storage for the orders that can be placed after this order.
Definition at line 98 of file order.h.
Referenced by vrprouting::problem::operator<<(), set_compatibles(), and subsetJ().
|
protected |
The delivery node identifier.
It hold's the idx of the node
Definition at line 122 of file order.h.
Referenced by delivery().
|
privateinherited |
Definition at line 87 of file identifier.h.
Referenced by vrprouting::Identifier::id(), and vrprouting::Identifier::reset_id().
|
privateinherited |
Definition at line 86 of file identifier.h.
Referenced by vrprouting::Identifier::idx().
|
protected |