-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalysis.py
More file actions
26 lines (19 loc) · 797 Bytes
/
analysis.py
File metadata and controls
26 lines (19 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from utility.result_stats import generate_shift_plans, print_shift_plan, calculate_kpis, print_kpis
import json
# Configuration
INSTANCE_PATH = "instances/BW_S_001.json"
SOLUTION_PATH = "results/BW_S_001_result.json"
# Generate shift plans from instance and solution
shift_plans = generate_shift_plans(INSTANCE_PATH, SOLUTION_PATH)
# Print shift plan table (simple format)
print_shift_plan(shift_plans, format_style='table')
# Print detailed shift information with routes
print_shift_plan(shift_plans, format_style='detailed')
# Print LaTeX table format
print_shift_plan(shift_plans, format_style='latex')
# Load solution for KPI calculation
with open(SOLUTION_PATH) as f:
solution = json.load(f)
# Calculate and print KPIs
kpis = calculate_kpis(shift_plans, solution)
print_kpis(kpis)