Skip to content

Commit

Permalink
Derive parameters from exploration level in Input::solve.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoupey committed Dec 2, 2024
1 parent 0569fb3 commit 2e0bbe8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/structures/vroom/input/input.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ All rights reserved (see LICENSE).
#include <unordered_map>

#include "routing/wrapper.h"
#include "structures/cl_args.h"
#include "structures/generic/matrix.h"
#include "structures/typedefs.h"
#include "structures/vroom/matrices.h"
Expand Down Expand Up @@ -193,6 +194,21 @@ class Input {
// Returns true iff both vehicles have common job candidates.
bool vehicle_ok_with_vehicle(Index v1_index, Index v2_index) const;

Solution solve(unsigned exploration_level,
unsigned nb_thread,
const Timeout& timeout = Timeout(),
const std::vector<HeuristicParameters>& h_param =
std::vector<HeuristicParameters>()) {
// Overload designed to expose the same interface as the `-x`
// command-line flag for out-of-the-box setup of exploration
// level.
return solve(io::CLArgs::get_nb_searches(exploration_level),
io::CLArgs::get_depth(exploration_level),
nb_thread,
timeout,
h_param);
}

Solution solve(unsigned nb_searches,
unsigned depth,
unsigned nb_thread,
Expand Down

0 comments on commit 2e0bbe8

Please sign in to comment.