RideDistributor  0.0.1
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
Public Member Functions | List of all members
Generator Class Reference

#include <Generator.hpp>

Public Member Functions

 Generator (InputData &inputData)
 
std::shared_ptr< SearchGraphNodegenerate (std::vector< int > &unassigned, Types::CarData &cars, std::shared_ptr< SearchGraphNode > &prevNode)
 

Detailed Description

Finds the best possible way to distribute one ride to each car given a list of unassigned rides and a list of cars with their positions gained points and points in time.

Constructor & Destructor Documentation

Generator::Generator ( InputData inputData)
inline

Creates a generator of choices on given input data.

Parameters
[in]inputDataused internally to get specific information about rides

Member Function Documentation

std::shared_ptr< SearchGraphNode > Generator::generate ( std::vector< int > &  unassigned,
Types::CarData cars,
std::shared_ptr< SearchGraphNode > &  prevNode 
)

Given the current state of the search process this generates the next optimal choice to take.

Note
This method should be called repeatedly using its result until the searchpath is complete
Parameters
[in,out]unassigneda list of indices of all unassigned rides
[in,out]carsrepresents the current state of all cars
[in]prevNodeis referenced by the new SearchGraphNode of the returned Choice
Returns
std::unique_ptr<Types::Choice> optimal way to assign one ride to each car

The documentation for this class was generated from the following files: