GraspIlsVndConfig¶
givp.GraspIlsVndConfig
dataclass
¶
Hyper-parameters for the GRASP-ILS-VND-PR algorithm.
The optimization sense is controlled by minimize (boolean, preferred)
or direction (string, SciPy/Optuna-style). Pass one of the two; if
both are given, minimize wins and direction is rewritten to match.
Internally the library always minimizes: when the user wants maximization
the objective is wrapped with a sign flip and the returned value is
restored to the original sign.
Attributes:
| Name | Type | Description |
|---|---|---|
max_iterations |
int
|
Maximum number of GRASP outer iterations. |
alpha |
float
|
Initial randomization parameter for greedy construction (RCL). |
vnd_iterations |
int
|
Maximum iterations of the VND local search. |
ils_iterations |
int
|
Maximum iterations of the ILS loop. |
perturbation_strength |
int
|
Magnitude of the ILS perturbation. |
use_elite_pool |
bool
|
Whether to maintain an elite pool for path relinking. |
elite_size |
int
|
Maximum size of the elite pool. |
path_relink_frequency |
int
|
GRASP iteration period at which to run PR. |
adaptive_alpha |
bool
|
If True, alpha varies between alpha_min and alpha_max. |
alpha_min |
float
|
Lower bound used by adaptive alpha. |
alpha_max |
float
|
Upper bound used by adaptive alpha. |
num_candidates_per_step |
int
|
Candidates evaluated per construction step. |
use_cache |
bool
|
If True, evaluations are memoized via an LRU cache. |
cache_size |
int
|
Maximum entries kept by the LRU cache. |
early_stop_threshold |
int
|
Iterations without improvement to early-stop. |
use_convergence_monitor |
bool
|
Enable diversification/restart heuristics. |
n_workers |
int
|
Threads used to evaluate candidates in parallel. |
time_limit |
float
|
Wall-clock budget in seconds (0 = unlimited). |
minimize |
bool | None
|
Boolean convenience flag. |
direction |
Direction
|
|
integer_split |
int | None
|
Index where integer variables begin in the decision
vector. |
as_core_config ¶
Return an internal config object compatible with _core.
_core defines its own GraspIlsVndConfig (without direction),
so we copy field values across to keep the two layers decoupled.