Tarefa12/main.cpp
Travel work_hard(vector<Flight>& flights, Parameters& parameters, vector<vector<string> >& alliances){
  vector<Travel> travels;
  //First, we need to create as much travels as it as the number of flights that take off from the
  //first city
  fill_travel(travels, flights, parameters.from, parameters.dep_time_min, parameters.dep_time_max);
  double start = omp_get_wtime();
  compute_path(flights, parameters.to, travels, parameters.dep_time_min, parameters.dep_time_max, parameters);
  double end = omp_get_wtime();
  printf("\nFirst Compute Path Time = %f", end - start); 
  
  vector<Travel> travels_back;
  //Then we need to travel back
  fill_travel(travels_back, flights, parameters.to, parameters.ar_time_min, parameters.ar_time_max);
  start = omp_get_wtime();
  compute_path(flights, parameters.from, travels_back, parameters.ar_time_min, parameters.ar_time_max, parameters);
  end = omp_get_wtime();
  printf("\nSecond Compute Path Time = %f", end - start); 
  
  merge_path(travels, travels_back);
  Travel go =  find_cheapest(travels, alliances);
  return go;
}
/**
 * \fn Travel work_hard(vector<Flight>& flights, Parameters& parameters, vector<vector<string> >& alliances)
 * \brief Solve the "Work Hard" problem.
 * This problem can be considered as the easy one. The goal is to find the cheapest way to join a point B from a point A regarding some parameters.
 * \param flights The list of available flights.
 * \param parameters The parameters.
 * \param alliances The alliances between companies.
 * \return The cheapest trip found.
 */
\fn Travel work_hard(vector& flights, Parameters& parameters, vector >& alliances)
\brief Solve the "Work Hard" problem.
This problem can be considered as the easy one. The goal is to find the cheapest way to join a point B from a point A regarding some parameters.
\param flights The list of available flights.
\param parameters The parameters.
\param alliances The alliances between companies.
\return The cheapest trip found.
\ fn Travel work_hard ( vector& flights Parameters& parameters vector > & alliances ) \ brief Solve the " Work Hard " problem . This problem can be considered as the easy one . The goal is to find the cheapest way to join a point B from a point A regarding some parameters . \ param flights The list of available flights . \ param parameters The parameters . \ param alliances The alliances between companies . \ return The cheapest trip found .
Travel work_hard(vector<Flight>& flights, Parameters& parameters, vector<vector<string> >& alliances){
  vector<Travel> travels;
  fill_travel(travels, flights, parameters.from, parameters.dep_time_min, parameters.dep_time_max);
  double start = omp_get_wtime();
  compute_path(flights, parameters.to, travels, parameters.dep_time_min, parameters.dep_time_max, parameters);
  double end = omp_get_wtime();
  printf("\nFirst Compute Path Time = %f", end - start); 
  vector<Travel> travels_back;
  fill_travel(travels_back, flights, parameters.to, parameters.ar_time_min, parameters.ar_time_max);
  start = omp_get_wtime();
  compute_path(flights, parameters.from, travels_back, parameters.ar_time_min, parameters.ar_time_max, parameters);
  end = omp_get_wtime();
  printf("\nSecond Compute Path Time = %f", end - start); 
  merge_path(travels, travels_back);
  Travel go =  find_cheapest(travels, alliances);
  return go;
}
Travel work_hard ( vector < Flight > & flights , Parameters & parameters , vector < vector < string > > & alliances ) { vector < Travel > travels ; fill_travel ( travels , flights , parameters . from , parameters . dep_time_min , parameters . dep_time_max ) ; double start = omp_get_wtime ( ) ; compute_path ( flights , parameters . to , travels , parameters . dep_time_min , parameters . dep_time_max , parameters ) ; double end = omp_get_wtime ( ) ; printf ( " \n " , end - start ) ; vector < Travel > travels_back ; fill_travel ( travels_back , flights , parameters . to , parameters . ar_time_min , parameters . ar_time_max ) ; start = omp_get_wtime ( ) ; compute_path ( flights , parameters . from , travels_back , parameters . ar_time_min , parameters . ar_time_max , parameters ) ; end = omp_get_wtime ( ) ; printf ( " \n " , end - start ) ; merge_path ( travels , travels_back ) ; Travel go = find_cheapest ( travels , alliances ) ; return go ; }
\fn Travel work_hard(vector<Flight>& flights, Parameters& parameters, vector<vector<string> >& alliances)
 \brief Solve the "Work Hard" problem.
\ fn Travel work_hard ( vector<Flight > & flights Parameters& parameters vector<vector<string > > & alliances ) \ brief Solve the " Work Hard " problem .
//First, we need to create as much travels as it as the number of flights that take off from the //first city //Then we need to travel back