rox-hack-md
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 協和商会 ロジックメモ ###### tags: `ROX` `協和商会` - 2021 01 20 ## テーブル, データ - https://docs.google.com/spreadsheets/d/1IK-rorzaxdEYtn7gMT-egvqauFroQ4VyrnCoxYNQnFg/edit?usp=sharing ### SQLServer 運送計画履歴テーブル delivery_plan_logs ### SQLServer 運送履歴テーブル delivery_logs ### 連携データ 対象日以降業務一覧 - 積んでいない運送依頼 + ヤードにある荷物の運送依頼 - トラックに積んで下さずに終わった荷物は連携する? - delivery_logs ## ロジック ### 頻度ベース 1. 対象日の前日に積んだままの荷物で、納品日が対象日の業務について、計画に埋め込む - delivery_logsについて、`積み込み日==対象日より前 & 納品日==対象日 & is_yard==0`の業務を抽出し、荷下ろし業務を計画に埋め込む 3. 対象日以前に荷積をして、ヤードに保管しており、納品日が対象日の業務について、計画に埋め込む - delivery_logsについて、`積み込み日==対象日より前 & 納品日==対象日 & is_yard==1`の業務を抽出し、荷下ろし業務を計画に埋め込む 5. 対象日以降業務一覧(連携データ)から、積み日&納品日が対象日の業務について、計画に埋め込む - 対象日以降業務一覧について、`積み込み日==対象日 & 納品日==対象日 & is_yard==0`の業務を抽出し、荷積&荷下ろしの業務を計画に埋め込む 7. 対象日以降業務一覧(連携データ)から、積み日が対象日、納品日が対象日よりも未来、ヤードを使用しない業務(==トラックに積んでおいて翌日以降に納品する業務)について、計画に埋め込む(ヤードの使用について、正しいか確認する必要あり) - 対象日以降業務一覧について、`積み込み日==対象日 & 納品日==対象日より未来 & is_yard==0`の業務を抽出し、荷積の業務を計画に埋め込む 9. 対象日以降業務一覧(連携データ)から、積み日が対象日、納品日が対象日よりも未来、ヤードを使用する業務について、計画に埋め込む - 対象日以降業務一覧について、`積み込み日==対象日 & 納品日==対象日より未来 & is_yard==1`の業務を抽出し、荷積の業務を計画に埋め込む - 荷下ろしは計画上発生しないが、ヤードへの荷下ろしが行われる 11. 作成された計画を元に、計画上では対象日に行われる業務について、delivery_plan_logs, delivery_logsと同様の形式のデータを作成し、delivery_plan_logs_tmp, delivery_logs_tmpに保存 12. 対象日以降業務一覧に現在の対象日よりも未来日付の積み日or納品日があれば、対象日を+1する 13. delivery_plan_logsとdelivery_plan_logs_tmp, delivery_logsとdelivery_logs_tmpをそれぞれ結合し、作成した計画通りに業務が遂行されたと仮定して新たな配送履歴テーブルを作成する 14. 1に戻る - トラックに積みっぱなし、ヤードに置く荷物の違いを確認 ### 位置情報ベース - 各トラックor従業員ごとにゴールの情報を持たせる - 特定のトラックにしか運べない荷物について、フラグを立てて別の処理を行う? - ヤードは一箇所? 1. 頻度ベースの1について計画に埋め込む - トラックに積んでそのままの荷物については、事前に積んだトラックがそのまま使われるから組み合わせを考える必要ない - 一部従業員の最初の業務確定 2. 全従業員の最後の業務を確定させる - 各従業員のゴールと業務のゴールの距離が小さくなるように業務を割り振る ### 頻度+位置情報 #### memo 20220123 - 最初と最後の業務を位置情報で決定 - 中間の業務を頻度(最初+中間, 中間+最後)で判定を行う - yyyymmdd - a ⇨ b (1) - c ⇨ d (2) - e ⇨ f (3) - b-c, d-e - yyyymmdd - a ⇨ b - c ⇨ d - e ⇨ f - b-c, d-e - yyyymmdd - [a ⇨ b] ⇨ [c ⇨ d] ⇨ [e ⇨ f] #### memo 202120203 - 要確認 - 各トラックの初期位置と最終位置の情報 - 配送先の位置情報 - それぞれの拠点について、拠点においてあるトラックの台数 < 拠点のヤードにおいてある荷物で1日に配送なければならない業務の数となるか - 下記のlogic2について、ヤードの荷物はorder1に割り当てるようにするので、上記のような状態になると破綻する - ヤードの荷物を他の業務と同様に考える?そうすれば破綻しない - 積み地が拠点になるようにして、ほかの業務と同一のものと考えて処理する(logic2,3を一緒に処理する) - 従業員=トラックの休みは入力として受け取るか? - ヤード使う/使わない, トラックに積みっぱなしにする/しない の判断が明確なルールか - 特定のトラックでのみ遂行できる業務はどうするか?(再) - inputで協和から受け取るか - 積み込み日_積み込み地_納品日_納品地をdelivery_idにして問題ないか - IDが重複するような業務が発生することはあるか? - オーダー確認書の車番について、どのタイミングで確定しているのか #### logic ##### order1を埋める 1. すべてのトラックについて操作:**対象日の前日にトラックに積んだまま&納品日が対象日の業務**について、同一トラックの対象日の最初の業務(order=1)とする - 前日の業務logから探す or inputで協和から受け取る 3. ヤードにおかれている荷物で納品日が対象日の業務について、**order1が埋まっていない&トラックの初期位置とヤードの距離が近い**トラックに業務(order=1)を割り振る - 距離が同一でトラックの候補が複数出た場合は頻度で順位をつける - 前日の業務logから探す or inputで協和から受け取る 4. order1が埋まっていないトラックがなくなるまで操作する:各トラックの初期拠点と各業務(積み込み日=対象日&納品日=対象日)の積み地が近くなるようにトラックに業務(order1)を割り振る - 距離が同一でトラックの候補が複数出た場合は頻度で順位をつける - inputで協和から受け取る ##### order3を埋める 5. **積み日が対象日&納品日が未来日&ヤードを使う業務**について、積み地とトラックの最終拠点が近くなるようにトラックに業務を割り振る(order3) - 距離が同一でトラックの候補が複数出た場合は頻度で順位をつける - inputで協和から受け取る 6. **積み日が対象日&納品日が未来日&ヤードを使わない業務**について、積み地とトラックの最終拠点が近くなるように(order3に業務が入っていない)トラックに業務を割り振る(order3) - 距離が同一でトラックの候補が複数出た場合は頻度で順位をつける - inputで協和から受け取る 7. order3が埋まっていないトラックがなくなるまで操作する:各トラックの最終拠点と各業務(積み込み日=対象日&納品日=対象日)の納品地が近くなるようにトラックに業務(order3)を割り振る - 距離が同一でトラックの候補が複数出た場合は頻度で順位をつける - inputで協和から受け取る ##### order2を埋める 8. 残りの積み日=対象日 AND 納品日=対象日の業務がなくなるまで,もしくはすべてのトラックの予定が埋まるまで操作する: - 対象業務と同一の[積み地-納品地]の業務を過去にこなしている回数 - [対象業の積み地-各トラックのorder1の業務の納品地]の移動をこなしている回数 - [対象業の納品地-各トラックのorder3の業務の積み地]の移動をこなしている回数 - これらの優先順位は? - 埋めていく業務の優先順位は? - inputで協和から受け取る - ヤードについて、別の拠点のトラックが別のヤードに取りに行く可能性の検討 - 回避する方法は? - delivery_idの取り扱い変更 - 積み込み日_積み込み地_納品日_納品地だと重複する可能性がある #### memo 20220207 - delivery_idの取り扱い変更 - 積み込み日_積み込み地_納品日_納品地_トラックID - 一台のトラックが積み込み日_積み込み地_納品日_納品地が同じ業務を複数回行うケースがないか確認 - あった:10/7, 28番 - 積み込み日_積み込み地_納品日_納品地_トラックID_シーケンス - 多分大丈夫 - 着手中の業務について(トラックに積みっぱなしの業務、ヤードにおいてある業務) - logから特定する場合、協和から受け取る「こなした業務のデータ」に問題(フォーマットが異なるなど)がありインプットを受け取れない状態になるとlogから拾えなくなる - 毎度受け取る場合、未来日以降の業務の受け取りと同様に扱う - ヤードについて、別の拠点のトラックが別のヤードに取りに行く可能性の検討 - 上記コピー - ヤードにおかれている荷物で納品日が対象日の業務について、**order1が埋まっていない&トラックの初期位置とヤードの距離が近い**トラックに業務(order=1)を割り振る - 距離が同一でトラックの候補が複数出た場合は頻度で順位をつける - 前日の業務logから探す or inputで協和から受け取る - 変更案 - ヤードから荷物を下ろし運送する業務はその拠点(=ヤード)に所属するトラックが担当する - 拠点ごとに処理する - その拠点のヤードからの業務がなくなる or その拠点所属のトラックの業務が埋まるまで - 余った業務は余りとして出力して人間にまかせる - memo - オーダー確認書 - 「ヤード出し25」は何を意味する?, ヤードに置く荷物であること+置く場所? - 25が積んでヤードに下ろす、オーダーの車番のトラックが後日に納品 - JFE千葉=川鉄 - 下ろした地点から近いヤードの荷物をとりにいくとき、別の拠点所属のトラックが取りに行くことは可能か? - 1案件2レコード, 1行動(1オーダー)あたり2レコードor1レコード - solverはきびしそう - トラックに積んで、後日運送するような業務の場合、solverで業務の順序を移動距離以外で制御する必要があるため厳しそう - yardから運送する荷物について、前日にヤードからトラックに積む作業は必ず発生するか? - 配車表とオーダー確認書に差分がある場合、どっちが正? - 配車表、未はなに? - オーダー表に乗らない業務のto, from, 積み日, 納品日, ヤードの有無がわからない - 地点設定.csv - NK T.D 川鉄はどこ? - 新頭陽 = 東京豆陽金属工業? - inputのデータに、システム稼働時点でトラックに乗せたままで未来日納品の荷物については、何番のトラックに載せているのか連携が必要 - 2021/10/01積み、2021/10/03納品、ヤード使わない場合、2021/10/02が休みのトラックに積ませる? - 実装できる?

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully