Result
Benchmark result data class for a single model run.
BenchmarkResult(n_nodes, n_hubs, alpha, method, total_time, solving_time, lagrange_time, optimal, gap, node_count, n_clients, n_clients_route, random_n_clients_route, min_budget_factor, max_budget_factor, run_number, seed, sanctioned=False)
dataclass
¶
Stores the result of a single benchmark solve.
Captures the configuration parameters (nodes, hubs, clients, seed) together with the solution metrics returned by a specific model/solver run (solving time, optimality gap, node count, etc.).
from_solution(solution, config, n_nodes, n_clients, run, method)
classmethod
¶
Construct from a
[BaseModelSolution][bilevelpy.solution.core.BaseModelSolution]
and benchmark configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
solution
|
BaseModelSolution
|
The solution returned by the solver. |
required |
config
|
BenchmarkConfig
|
The benchmark configuration. |
required |
n_nodes
|
int
|
Number of nodes in the instance. |
required |
n_clients
|
int
|
Number of clients per route. |
required |
run
|
int
|
Run number (1-indexed, for seed lookup). |
required |
method
|
str
|
Method string key (e.g. |
required |
Source code in src/oracle_paper/benchmark/result.py
sanctioned_method(config, method, n_nodes, n_clients, run)
classmethod
¶
Create a placeholder result for a sanctioned (skipped) method.