0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ShiftCrafter Part 4 — 時短(9:00–16:00)を組み入れた月次シフト自動割当【CSV/ICS/検証CSV】

Posted at

ShiftCrafter Part 4 — 時短(9:00–16:00)を組み入れた月次シフト自動割当【CSV/ICS/検証CSV】

3行まとめ

  • 二交代(日勤 8:30–17:00/夜勤 17:00–翌9:00)+ 時短日勤(例:9:00–16:00) を同時運用
  • 1か月のシフトをブラウザだけで自動割当、CSV/ICS/検証CSVで配布・検証
  • 時短は 重み(既定0.8) で日勤必要数に対する充足率を評価

English Summary

ShiftCrafter Part 4 — Monthly auto-scheduling with short day shifts

  • Supports a 2-shift system (Day 08:30–17:00 / Night 17:00–09:00) plus short day shifts (e.g., 09:00–16:00).
  • Runs entirely in the browser; outputs CSV / ICS / validation CSV. No data leaves your device.
  • Coverage uses weights (full day = 1.0, short day = 0.8 by default).
  • Roadmap: staff attributes such as weekend-off and no-night.

背景

現場には、日勤フルと時短が混在する運用が珍しくありません。MVPでは、通常日勤で枠を埋め、不足分を時短で重み付き補完し、配布はICS、検証はCSVで定量化します。

機能ハイライト

  • 自動割当:夜勤→日勤(通常)→時短の順。Night→翌Day禁止、同日重複なし
  • 制約尊重:週/月の夜勤上限、希望休考慮
  • 出力
    • CSV(schedule_monthly_part4.csv): day_full_* / day_short_* / night_*
    • ICS(shift_monthly_part4.ics): 日勤(通常/時短)と夜勤を各時刻でイベント化
    • 検証CSV(validation_summary_part4.csv): 重み付き充足率、希望休、上限違反、連続夜勤など

使い方(最短3ステップ)

  1. index.html をブラウザで開く
  2. 対象月/必要人数(日勤換算・夜勤)/夜勤上限(週・月)/通常/時短スタッフ/休み希望/時短重み・時短時刻を入力
  3. 「シフト自動作成」→「CSV/ICS/検証CSV」をダウンロード

出力ファイル(要点)

  • CSVdate, dow, need_day, need_night, day_full_*, day_short_*, night_*
  • ICS
    • 日勤(通常):08:30–17:00
    • 日勤(時短):入力に従う(既定 09:00–16:00
    • 夜勤:17:00–翌09:00
    • SUMMARY: 日勤(通常)/日勤(時短)/夜勤
  • 検証CSV(主な列)
    weighted_day_coverage_pct, off_fulfillment_pct, weekly_night_cap_violations, monthly_night_cap_violation, consec_night_2plus, day_after_night_violation

仕様(MVP)

  • 必要人数:月内は全日同一(将来:日別プロファイル化)
  • 時短の重み:既定0.8(現場基準に合わせて調整)
  • 夜勤:時短スタッフは割当対象外(前提)
  • 公平性:総割当/Night回数の少なさを優先(最適化は次版で)

よくある質問

Q. 時短の重み0.8の根拠は?
A. 例として 7h / 8.5h ≈ 0.82 を丸めています。施設ルールで調整してください。

Q. 勤務時刻が施設と違う
A. HTML内 buildICS() の時刻や、UIの「時短の時刻」を変更してください。

Q. 氏名を公開したくない
A. ICS SUMMARY 生成部分を匿名IDに置換可能です。

今後(ロードマップ)

  • 土日出勤なし夜勤なしスタッフの属性対応(候補抽出段階で除外)
  • 平日/土日/祝日での必要人数プロファイル
  • 職員別ICS分割・匿名化オプション
  • 偏り抑制(線形/整数最適化)と複数解の比較

免責

本ツールは教育・業務補助を目的としたクライアントサイドWebアプリです。
データはブラウザ内のみで処理されます。
運用は所属施設の規程・労務基準・個人情報保護方針に従ってください。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?