m1m02530125 Claude Sonnet 4.6 commited on
Commit
d3f4cd1
·
1 Parent(s): 5400274

fix: remove remaining double_penalty_scale references in solver

Browse files

Two references were missed: docstring and log format string.
Both now removed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. optimizer/solver.py +3 -3
optimizer/solver.py CHANGED
@@ -78,8 +78,8 @@ def solve(
78
 
79
  優先順位(ソフト制約のペナルティ重み):
80
  1. 人件費最小化(総時間削減) weight=1000 × cost_scale
81
- 2. 正社員両掛け持ち回避 weight=500 × double_penalty_scale
82
- 2b. 深夜勤務分散 weight=500 × late_night_scale
83
  3a. 正社員希望を必ず通す weight=200000(固定)
84
  3b. アルバイト希望を通す weight=100 × pt_pref_scale
85
  4. 人員バランス均等化 weight=10 × balance_scale
@@ -118,7 +118,7 @@ def solve(
118
  logger.info(f"[SOLVE START] period_id={period.id} {period.start_date} 〜 {period.end_date}")
119
  logger.info(f" 日数={len(date_strs)} 有効従業員={len(active_employees)} 希望レコード={len(requests)}")
120
  logger.info(f" config: cost={config.cost_scale} pt_pref={config.pt_pref_scale} "
121
- f"double={config.double_penalty_scale} balance={config.balance_scale} "
122
  f"late_night={config.late_night_scale}")
123
  ft_count = sum(1 for e in active_employees if e.employment_type == EmploymentType.FULL_TIME)
124
  pt_count = len(active_employees) - ft_count
 
78
 
79
  優先順位(ソフト制約のペナルティ重み):
80
  1. 人件費最小化(総時間削減) weight=1000 × cost_scale
81
+ 2. 正社員両掛け持ち(朝食+ディナー)はハード制約で禁止
82
+ 2b. 深夜勤務分散(アルバイトのみ) weight=500 × late_night_scale
83
  3a. 正社員希望を必ず通す weight=200000(固定)
84
  3b. アルバイト希望を通す weight=100 × pt_pref_scale
85
  4. 人員バランス均等化 weight=10 × balance_scale
 
118
  logger.info(f"[SOLVE START] period_id={period.id} {period.start_date} 〜 {period.end_date}")
119
  logger.info(f" 日数={len(date_strs)} 有効従業員={len(active_employees)} 希望レコード={len(requests)}")
120
  logger.info(f" config: cost={config.cost_scale} pt_pref={config.pt_pref_scale} "
121
+ f"balance={config.balance_scale} "
122
  f"late_night={config.late_night_scale}")
123
  ft_count = sum(1 for e in active_employees if e.employment_type == EmploymentType.FULL_TIME)
124
  pt_count = len(active_employees) - ft_count