Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Hitachi Hokudai Lab. & Hokkaido University Cont...

Hitachi Hokudai Lab. & Hokkaido University Contest 2022 B問題解説

Hitachi Hokudai Lab. & Hokkaido University Contest 2022 「農機シェアリング計画動的最適化問題」の解説スライド

Shuichi Tamayose

March 03, 2023
Tweet

More Decks by Shuichi Tamayose

Other Decks in Programming

Transcript

  1. 2022/03/03 (Fri) ۄد मҰ Hitachi Hokudai Lab. & Hokkaido University

    Contest 2022 ೶ػγΣΞϦϯάܭըಈత࠷దԽ໰୊ Dynamic Scheduling of Agricultural Machinery Sharing
  2. εέδϡʔϧͷ࡞੒ (Create a schedule) ID: 1 ID: 2 ID: 3

    ID: 4 ҰਓͣͭεέδϡʔϧΛ࡞੒͍ͯ͘͠ Create a schedule one by one 1 2 3 4
  3. εέδϡʔϧͷ࡞੒ (Create a schedule) ID: 1 ID: 2 ID: 3

    ID: 4 move 1 execute 1 move 20 execute 33 1 2 3 4 ҰਓͣͭεέδϡʔϧΛ࡞੒͍ͯ͘͠ Create a schedule one by one
  4. εέδϡʔϧͷ࡞੒ (Create a schedule) ID: 1 ID: 2 ID: 3

    ID: 4 move 1 execute 1 move 20 execute 33 move 14 execute 5 move 24 execute 51 1 2 3 4 ҰਓͣͭεέδϡʔϧΛ࡞੒͍ͯ͘͠ Create a schedule one by one
  5. εέδϡʔϧͷ࡞੒ (Create a schedule) ID: 1 ID: 2 ID: 3

    ID: 4 move 1 execute 1 move 20 execute 33 move 14 execute 5 move 24 execute 51 move 22 execute 9 execute 33 execute 753 1 2 3 4 ҰਓͣͭεέδϡʔϧΛ࡞੒͍ͯ͘͠ Create a schedule one by one
  6. εέδϡʔϧͷ࡞੒ (Create a schedule) ID: 1 ID: 2 ID: 3

    ID: 4 move 1 execute 1 move 20 execute 33 move 14 execute 5 move 24 execute 51 move 22 execute 9 execute 33 execute 753 move 141 execute 139 move 5 execute 56 1 2 3 4 Completed! ҰਓͣͭεέδϡʔϧΛ࡞੒͍ͯ͘͠ Create a schedule one by one
  7. εέδϡʔϧͷ࡞੒ (Create a schedule) 1 2 3 4 pattern: 1

    2 1 4 3 pattern: 2 4 3 2 1 pattern: 3 ϥϯμϜʹॱংΛೖΕସ͑είΞ͕Ұ൪ྑ͘ͳͬͨ΋ͷΛ࢖༻͢Δ Randomly switch the order and use the one with the best score
  8. ୳ࡧͷ֓ཁ (Search Overview) ϫʔΧʔຖʹεέδϡʔϧͷ୳ࡧΛߦ͏ ɾ୳ࡧʹ͸ϏʔϜαʔνΛ࢖༻ Search a best schedule each

    worker ɾusing by beam search ɾ࣌ؒ͝ͱʹ༏ઌ౓෇͖ΩϡʔΛ༻ҙͯ͠ϊʔυΛ؅ཧ ɾΩϡʔͷ্Ґ N݅ͷϊʔυΛ࠾༻͢Δ ɾprepare priority queues array to manage nodes ɾuse the top N nodes in the queue
  9. શମͷྲྀΕ (All steps) 2 T - 2 ɾɾɾɾɾ T T

    - 1 0 1 ֤࣌ؒ͝ͱʹҎԼͷ࡞ۀΛ܁Γฦ͢ 1. ্Ґ N ݅ͷϊʔυΛऔΓग़͢ 2. ֤ϊʔυຖʹ࣮ߦՄೳͳδϣϒΛ࣮ߦ 3. ݁ՌΛΩϡʔʹอଘ Repeat the following for each time 1. Select the top N nodes 2. Run all executable jobs for each node 3. Save the results in the queue
  10. શମͷྲྀΕ (All steps) 2 T - 2 ɾɾɾɾɾ T T

    - 1 0 1 ֤࣌ؒ͝ͱʹҎԼͷ࡞ۀΛ܁Γฦ͢ 1. ্Ґ N ݅ͷϊʔυΛऔΓग़͢ 2. ֤ϊʔυຖʹ࣮ߦՄೳͳδϣϒΛ࣮ߦ 3. ݁ՌΛΩϡʔʹอଘ Repeat the following for each time 1. Select the top N nodes 2. Run all executable jobs for each node 3. Save the results in the queue pos: 1 time: 0 score: 0 pos: 1 time: 0 score: 0
  11. શମͷྲྀΕ (All steps) 2 T - 2 ɾɾɾɾɾ T T

    - 1 0 1 ֤࣌ؒ͝ͱʹҎԼͷ࡞ۀΛ܁Γฦ͢ 1. ্Ґ N ݅ͷϊʔυΛऔΓग़͢ 2. ֤ϊʔυຖʹ࣮ߦՄೳͳδϣϒΛ࣮ߦ 3. ݁ՌΛΩϡʔʹอଘ Repeat the following for each time 1. Select the top N nodes 2. Run all executable jobs for each node 3. Save the results in the queue pos: 1 time: 0 score: 0 pos: 2 time: 2 score: 10 pos: 4 time: 20 score: 50 pos: 8 time: 60 score: T job 1 job 2 job 3
  12. શମͷྲྀΕ (All steps) 2 T - 2 ɾɾɾɾɾ T T

    - 1 0 1 ֤࣌ؒ͝ͱʹҎԼͷ࡞ۀΛ܁Γฦ͢ 1. ্Ґ N ݅ͷϊʔυΛऔΓग़͢ 2. ֤ϊʔυຖʹ࣮ߦՄೳͳδϣϒΛ࣮ߦ 3. ݁ՌΛΩϡʔʹอଘ Repeat the following for each time 1. Select the top N nodes 2. Run all executable jobs for each node 3. Save the results in the queue pos: 1 time: 0 score: 0 pos: 2 time: 2 score: 10 pos: 4 time: 20 score: 50 pos: 8 time: 60 score: T job 1 job 2 job 3
  13. ࡞ۀ࣌ؒͷݟੵ΋Γ (Estimate work time) B໰୊Ͱ͸A໰୊ͱ͸ҟͳΓఱؾʹΑͬͯ࡞ۀޮ཰͕มԽ͢Δ 100% 90% 85% 80% 45%

    33% 20% Work e ffi ciency varies depending on the weather շ੖ (Sunny) ੖Ε (Mostly sunny) ബӢ (Lightly cloudy) ಶΓ (Cloudy) ऑ͍Ӎ (Light rain) ී௨ͷӍ (Medium rain) ڧ͍Ӎ (Heavy rain)
  14. ࡞ۀ࣌ؒͷݟੵ΋Γ (Estimate work time) ੖ΕΛج४ʹ͢ΔͱεέδϡʔϧͷείΞ͸ߴ͘ͳΔ͕มߋͷϦεΫ͕େ͖͘ͳΔ ӍΛج४ʹ͢ΔͱεέδϡʔϧͷείΞ͸௿͘ͳΔ͕มߋͷϦεΫ͕খ͘͞ͳΔ Score & Risk High

    Low Scheduling scores are higher when based on Sunny, but the risk of change is greater Scheduling scores are lower based on rain, but the risk of change is smaller
  15. ඞਢδϣϒͷ༏ઌ౓Λ্͛Δ (Increase the priority of mandatory jobs) B໰୊Ͱ͸ඞਢδϣϒ͕ઃఆ͞Ε͓ͯΓɺ͜ͷδϣϒΛ׬͍ྃͯ͠ͳ͍৔߹ ϖφϧςΟ͕ൃੜ͢Δ ඞਢδϣϒͷείΞΛ্͛Δ͜ͱͰ୳ࡧ࣌ʹબ୒͞Ε΍͘͢ͳΔ

    ɾඞਢδϣϒʹґଘ͍ͯ͠ΔδϣϒͷείΞ΋্͛Δ B problem has a mandatory job, and if this job is not completed penalty will be incurred Increase the score of mandatory jobs to select them easier to be prioritized during the search ɾAlso increase scores for jobs that depend on mandatory jobs
  16. ඞਢδϣϒ (Mandatory job) JOB_ID: 1 JOB_ID: 2 ඞਢδϣϒ (Mandatory job)

    JOB_ID: 3 JOB_ID: 4 JOB_ID: 5 JOB_ID: 6 JOB_ID: 7 JOB_ID: 8 ඞਢδϣϒʹґଘ͍ͯ͠Δδϣϒ΋ඞਢδϣϒͱͯ͠ѻ͏ Jobs that depend on mandatory jobs are also treated as mandatory jobs
  17. ඞਢδϣϒ (Mandatory job) JOB_ID: 1 JOB_ID: 2 ඞਢδϣϒ (Mandatory job)

    JOB_ID: 3 JOB_ID: 4 JOB_ID: 5 JOB_ID: 6 JOB_ID: 7 JOB_ID: 8 ඞਢδϣϒʹґଘ͍ͯ͠Δδϣϒ΋ඞਢδϣϒͱͯ͠ѻ͏ Jobs that depend on mandatory jobs are also treated as mandatory jobs
  18. εέδϡʔϧͷࣄલมߋ (Advance schedule changes) B໰୊Ͱ͸ࣄલʹεέδϡʔϧͷఏग़Λߦ͍εέδϡʔϧͱҟͳΔδϣϒ Λ࣮ߦͨ͠৔߹ϖφϧςΟ͕ൃੜ͢Δ B problem, the schedule

    is submitted in advance and incurs a penalty for executing a job that di ff ers from the schedule schedule ID 1 ID 20 ID 4 actual ID 1 ID 20 ID 4 penalty
  19. εέδϡʔϧͷࣄલมߋ (Advance schedule changes) εέδϡʔϧ্Ͱ͸δϣϒͷID͔͠දࣔ͞Ε͍ͯͳ͍͕࣮ࡍʹ͸ෳ਺ͷ ΞΫγϣϯͰߏ੒͞Ε͍ͯΔʢҠಈɾ଴ػɾ࣮ߦʣ ID 1 ID 2

    move wait execute 1 move execute 2 The schedule only shows the job ID, but actually consists of multiple actions ʢMoveɾWaitɾExecuteʣ
  20. εέδϡʔϧͷࣄલมߋ (Advance schedule changes) ϖφϧςΟ͕ൃੜ͢Δͷ͸ҟͳΔδϣϒͷ࣮ߦͷΈͰͦΕҎ֎Ͱ͸ൃੜ͠ͳ͍ ID 1 ID 2 move

    wait execute 1 move execute 2 penalty ID 1 ID 2 move wait execute 1 no penalty Penalties are incurred only for the execution of di ff erent jobs and not otherwise execute 2 move
  21. εέδϡʔϧͷࣄલมߋ (Advance schedule changes) δϣϒͷ࣮ߦҎ֎ͷେ෦෼ΛલͷδϣϒIDʹ͢Δ͜ͱͰεέδϡʔϧͷมߋͷ ϖφϧςΟΛݮΒ͢Α͏ʹ͢Δ ID 1 ID 2

    move wait execute 1 move execute 2 Make the non-execution most part of the job the previous Job ID to reduce the penalty about changing the schedule ID 1 ID 2 move wait execute 1 move execute 2
  22. εέδϡʔϧͷࣄલมߋ (Advance schedule changes) ID 1 ID 2 move wait

    execute 1 move execute 2 ID 1 ID 2 move wait execute 1 move no penalty ID 1 ID 2 move wait execute 1 move execute 2 no penalty job 1 time is longer job 1 time is shorter
  23. εέδϡʔϧͷ࣮ߦ (Running a schedule) εέδϡʔϧͷ࣮ߦʹ͍ͭͯ͸ϧʔϧϕʔεͰܾఆ͢Δ ࡞ۀ৔ॴʹ౸ண͍ͯ͠Δ ࡞ۀ৔ॴʹҠಈ͢Δ ࡞ۀ͕։࢝ग़དྷΔ ଴ػ͢Δ ࡞ۀΛߦ͏

    Arriving at the workplace Move to the workplace Can start working Wait Execute Rule-based decisions on schedule execution ͍͍͑ ͍͍͑ ͸͍ ͸͍ No No Yes Yes
  24. εέδϡʔϧͷมߋ (Changing a schedule) δϣϒͷ࣮ߦ͕εέδϡʔϧʹؒʹ߹Θͳͦ͞͏ͳ৔߹͸มߋΛߦ͏ Make changes if the job

    is not likely to run on schedule schedule ID 1 ID 20 ID 4 actual ID 1 ID 20 overtime? current schedule ID 1 ID 20 ID 4
  25. εέδϡʔϧͷมߋ (Changing a schedule) εέδϡʔϧมߋͷ൑அ͸༧ఆऴྃ࣌ࠁͷ 20λʔϯҎ಺ͷ৔߹ʹߦ͏ Schedule change decision will

    be made within 20 turns of the scheduled end time schedule ID 1 ID 20 ID 4 actual ID 1 ID 20 overtime? current schedule ID 1 ID 20 ID 4