GIVPConfig¶
givp.GIVPConfig
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. |
path_relink_strategy |
PathRelinkStrategy
|
Explicit path-relinking direction control. |
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
|
Number of worker processes (or threads) used to evaluate
candidates in parallel during the GRASP construction phase.
Default is Parallelism strategy (applied when
|
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 self.
GIVPConfig structurally satisfies the internal _CoreConfigProto
used by givp.core functions, so it can be passed directly without
copying field values into a separate dataclass. The minimize and
direction fields are ignored by core code.