pub fn run_solver<S, C>(
solution: S,
finalize_fn: fn(&mut S),
constraints_fn: fn() -> C,
get_variable: fn(&S, usize) -> Option<usize>,
set_variable: fn(&mut S, usize, Option<usize>),
value_count: fn(&S) -> usize,
entity_count_fn: fn(&S) -> usize,
_descriptor: fn() -> SolutionDescriptor,
_entity_count: fn(&S, usize) -> usize,
_variable_field: &'static str,
_descriptor_index: usize,
) -> SExpand description
Solves a basic variable problem using construction heuristic + late acceptance local search.
This function is called by macro-generated solve() methods for solutions
using #[basic_variable_config].
§Type Parameters
S- The solution type (must implementPlanningSolution)C- The constraint set type
§Arguments
solution- The initial solution to solvefinalize_fn- Function to prepare derived fields before solvingconstraints_fn- Function that creates the constraint setget_variable- Gets the planning variable value for an entityset_variable- Sets the planning variable value for an entityvalue_count- Returns the number of valid valuesentity_count_fn- Returns the number of entities_descriptor- Solution descriptor (unused, for future extensions)_entity_count- Entity count function (unused, for future extensions)_variable_field- Variable field name (unused, for future extensions)_descriptor_index- Descriptor index (unused, for future extensions)