/*Header file of the Label class

Implementation can be found in Label.cpp

This class represents a label for the pricing problem of the CVRP.

*/

#ifndef _LABEL_H
#define _LABEL_H

#include <iostream>

//Class used to represent a label for the pricing problem of the CVRP.
class Label{
public:

	//Resources:
	//------------------------------------------------------------------------------------

	//Cost
	double Cost;

	//Cummulative load
	double Load;

	//Reachability
	//Reachable[i] is true if the i-th location can still be reached,
	//i=0 represents the first customer.
	bool *Reachable;

	//Other statistics
	//------------------------------------------------------------------------------------

	//Number of customers excluding the depot.
	short int NumberOfCustomers;

	//Last location visited on the partial path represented by this label.
	//Location 0 is the depot.
	short int LastLocation;

	//Pointer to a label representing the partial path up to the semi-last location of
	//the partial path represented by this label.
	Label *PreviousLabel;

	//Constructor functions:
	//------------------------------------------------------------------------------------

	//Default Constructor
	Label()
		:Cost(0), Load(0), Reachable(0), NumberOfCustomers(0), LastLocation(0), PreviousLabel(0)
	{};

	//Copy Constructor
	Label(const Label &OriginalLabel);

	//Operator functions:
	//------------------------------------------------------------------------------------

	//Assignment operator
	Label& operator=(const Label& OriginalLabel);

	//Destructor functions
	//------------------------------------------------------------------------------------

	//Default destructor
	~Label();

	//Print functions
	//------------------------------------------------------------------------------------

	//Print resources
	void PrintResources();

};

#endif