{"id":15288272,"url":"https://github.com/rpifisherman/aps-app","last_synced_at":"2025-10-07T03:30:21.579Z","repository":{"id":247359704,"uuid":"823960266","full_name":"RPIFisherman/APS-app","owner":"RPIFisherman","description":"A self-made demo for Advance Scheduling using branch and bound method","archived":true,"fork":false,"pushed_at":"2024-08-02T09:29:41.000Z","size":1522,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T12:32:55.239Z","etag":null,"topics":["aps","apscheduler","branch-and-bound","heuristic-algorithm","heuristic-search-algorithms","internship-task","javafx"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RPIFisherman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-04T05:09:31.000Z","updated_at":"2025-01-04T23:28:05.000Z","dependencies_parsed_at":"2025-01-25T12:31:27.391Z","dependency_job_id":"470e3262-673c-4f2d-a0d7-3629ac7ffa81","html_url":"https://github.com/RPIFisherman/APS-app","commit_stats":null,"previous_names":["rpifisherman/aps-app"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/RPIFisherman/APS-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPIFisherman%2FAPS-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPIFisherman%2FAPS-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPIFisherman%2FAPS-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPIFisherman%2FAPS-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RPIFisherman","download_url":"https://codeload.github.com/RPIFisherman/APS-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPIFisherman%2FAPS-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278715508,"owners_count":26033296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aps","apscheduler","branch-and-bound","heuristic-algorithm","heuristic-search-algorithms","internship-task","javafx"],"created_at":"2024-09-30T15:45:05.900Z","updated_at":"2025-10-07T03:30:20.947Z","avatar_url":"https://github.com/RPIFisherman.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advanced Planning and Scheduling(APS) Application\r\n\r\n[![JavaDocs](https://img.shields.io/badge/javadoc-1.0.0-brightgreen.svg)](https://rpifisherman.github.io/APS-app/javadocs/index.html)\r\n[![APS-JavaDocs](https://img.shields.io/badge/APS_Package-JavaDocs-blue)](https://rpifisherman.github.io/APS-app/javadocs/ygong/APS/package-summary.html)\r\n[![README-Chinese](https://img.shields.io/badge/README-Chinese-red)](README_CN.md)\r\n\r\n```text\r\n         _                   _          _                 _                   _          _\r\n        / /\\                /\\ \\       / /\\              / /\\                /\\ \\       /\\ \\\r\n       / /  \\              /  \\ \\     / /  \\            / /  \\              /  \\ \\     /  \\ \\\r\n      / / /\\ \\            / /\\ \\ \\   / / /\\ \\__        / / /\\ \\            / /\\ \\ \\   / /\\ \\ \\\r\n     / / /\\ \\ \\          / / /\\ \\_\\ / / /\\ \\___\\      / / /\\ \\ \\          / / /\\ \\_\\ / / /\\ \\_\\\r\n    / / /  \\ \\ \\        / / /_/ / / \\ \\ \\ \\/___/     / / /  \\ \\ \\        / / /_/ / // / /_/ / /\r\n   / / /___/ /\\ \\      / / /__\\/ /   \\ \\ \\          / / /___/ /\\ \\      / / /__\\/ // / /__\\/ /\r\n  / / /_____/ /\\ \\    / / /_____/_    \\ \\ \\        / / /_____/ /\\ \\    / / /_____// / /_____/\r\n / /_________/\\ \\ \\  / / /      /_/\\__/ / /       / /_________/\\ \\ \\  / / /      / / /\r\n/ / /_       __\\ \\_\\/ / /       \\ \\/___/ /       / / /_       __\\ \\_\\/ / /      / / /\r\n\\_\\___\\     /____/_/\\/_/         \\_____\\/        \\_\\___\\     /____/_/\\/_/       \\/_/\r\n                                                                 \r\n```\r\n\r\n## Introduction\r\n\r\nExtend from the [APS-MES](https://github.com/RPIFisherman/APS-MES). This project\r\nadd a graphical user interface (GUI) to the APS application. The GUI is\r\nimplemented using the [javafx](https://openjfx.io/) library.\r\n\r\n[![Qodana](https://github.com/RPIFisherman/APS-app/actions/workflows/qodana_code_quality.yml/badge.svg)](https://github.com/RPIFisherman/APS-app/actions/workflows/qodana_code_quality.yml)\r\n[![Mirror GitHub Auto Queried Repos to Gitee](https://github.com/RPIFisherman/APS-app/actions/workflows/auto_sync.yml/badge.svg?branch=master)](https://github.com/RPIFisherman/APS-app/actions/workflows/auto_sync.yml)\r\n[![codecov](https://codecov.io/gh/RPIFisherman/APS-app/graph/badge.svg?token=AZXVMKN3W2)](https://codecov.io/gh/RPIFisherman/APS-app)\r\n\r\nThanks\r\nto [Roland's Gantt Plot code](https://stackoverflow.com/questions/27975898/gantt-chart-from-scratch),\r\nwhich helps me a lot on JavaFX.\r\n\r\n## Requirements\r\n\r\n- Java 21 is recommended, other version may not work.\r\n    - Java 8 can compile and run [APSDemo.java](src/main/java/APSDemo.java) but\r\n      may not pass the test.\r\n- Maven 3.9.6 is recommended, other version may not work.\r\n\r\n## APSDemo:\r\n\r\n![APSDemo Structure](docs/APSDemo_structure.png)\r\n\r\n## APSDemo Output:\r\n\r\n![APSDemo Output](docs/demo.png)\r\n\r\n## Project Structure:\r\n\r\n![Scheduler Structure](docs/Scheduler_structure.png)\r\n\r\n### Concise Diagram:\r\n\r\n```mermaid\r\nclassDiagram\r\n    class Schedule {\r\n        -ArrayList~MachineWithOrders~ _machines\r\n        -Grade _grade\r\n        +void calcStat(double min_makespan, int num_orders)\r\n        +Grade calcGradeByWeights(int on_time_weight, int makespan_weight, int est_weight, int ldt_weight)\r\n        +void scheduleAllOrders(Scheduler scheduler)\r\n    }\r\n\r\n    class Schedule_MachineWithOrders {\r\n        -Machine machine\r\n        -ArrayList~OrderWithTime~ orders\r\n        -double _approx_run_time\r\n        +boolean addOrder(Order o)\r\n        +boolean removeOrder(Order o)\r\n        +void scheduleAllOrders(Scheduler scheduler)\r\n        +void scheduleAllOrders()\r\n    }\r\n\r\n    class Schedule_OrderWithTime {\r\n        -Order order\r\n        -int _start_time\r\n        -int _end_time\r\n        -int status\r\n        +void setStartEndTime(int start_time, int end_time)\r\n    }\r\n\r\n    class Schedule_Grade {\r\n        -double on_time_percentage\r\n        -double makespan_percentage\r\n        -double est_percentage\r\n        -double ldt_percentage\r\n        -double grade\r\n        +void calcGradeByWeights(int on_time_weight, int makespan_weight, int est_weight, int ldt_weight)\r\n    }\r\n\r\n    class Machine {\r\n        +String name\r\n        +int machine_ID\r\n        -HashMap~Integer, Integer~ products_pace_per_hour\r\n        +boolean checkViableOrder(int production_type_ID)\r\n        +int getProductionPace(int production_type_id)\r\n    }\r\n\r\n    class Order {\r\n        +String name\r\n        +int order_ID\r\n        +int earliest_start_time\r\n        +int delivery_time\r\n        +int latest_due_time\r\n        +int quantity\r\n        +int production_type_ID\r\n    }\r\n\r\n    class Rules {\r\n        +static boolean belowCapacity(MachineWithOrders machine, double threshold)\r\n        +static boolean aboveCapacity(MachineWithOrders machine, double threshold)\r\n        +static boolean orderFitsMachine(MachineWithOrders machine, OrderWithTime order)\r\n    }\r\n\r\n    class Scheduler {\r\n        -List~Schedule~ _schedules\r\n        -ExecutorService _executor\r\n        -int _num_production_types\r\n        -int _num_machines\r\n        -int _num_orders\r\n        -int _max_hours_allowed\r\n        -double _max_capacity_per_machine\r\n        -double _min_capacity_per_machine\r\n        -double _min_makespan\r\n        -ArrayList~ArrayList~Double~~ _order_type_switch_times\r\n        -ArrayList~Order~ _orders\r\n        -ArrayList~Machine~ _machines\r\n        +void generateAllPossible()\r\n        +void calcAllSchedulesGrade(Integer... weights)\r\n    }\r\n\r\n    Schedule \"1\" *-- \"many\" Schedule_MachineWithOrders: Contains many machines\r\n    Schedule_MachineWithOrders \"1\" *-- \"many\" Schedule_OrderWithTime: Contains many orders\r\n    Schedule_OrderWithTime \"1\" *-- \"1\" Order: refers to one order\r\n    Schedule_MachineWithOrders \"1\" *-- \"1\" Machine: refers to one machine\r\n    Schedule \"1\" *-- \"1\" Schedule_Grade: has one grade\r\n    Scheduler \"1\" *-- \"1\" Rules: can apply many rules\r\n    Scheduler \"1\" *-- \"many\" Schedule: has many schedules\r\n```\r\n\r\n## Project Workflow:\r\n\r\n```mermaid\r\ngraph TD\r\n    A[Start] --\u003e init[\"\u003cstrong\u003einit()\u003c/strong\u003e\u003cbr\u003e All the Machines with production pace per hour\u003cbr\u003e All the Orders with earliest start time, delivery time, \u003cbr\u003elatest due time, quantity, production type\u003cbr\u003e Rules (belowCapacity, aboveCapacity, orderFitsMachine)\u003cbr\u003e Switch Matrix\"]\r\n    subgraph \"Input\"\r\n        init\r\n        rules[\"Hard Requirements\"]\r\n        F[weights for grade]\r\n    end\r\n    subgraph \"generateAllSchedules()\"\r\n        init --\u003e depthFirstSearch{\"Recursion with Constrains\u003cbr\u003edepthFirstSearch()\"}\r\n        rules --\u003e depthFirstSearch{\"Recursion with Constrains\u003cbr\u003edepthFirstSearch()\"}\r\n        depthFirstSearch --\u003e|Satisfied| C[\"Add to schedules\"]\r\n    %%depthFirstSearch --\u003e|Unsatisfied|depthFirstSearch\r\n        C --\u003e D[\"Call scheduleAllOrders()\"]\r\n    end\r\n    D --\u003e E[Output Schedules]\r\n    F --\u003e calcStat[\"Call calcStat()\"]\r\n    E --\u003e calcStat\r\n    subgraph \"Call calcAllSchedulesGrade()\"\r\n        subgraph \"forEach schedules\"\r\n            calcStat --\u003e calcGradeByWeights[\"Call calcGradeByWeights()\"]\r\n            calcGradeByWeights --\u003e Grade[Grade]\r\n        end\r\n        Grade --\u003e sort[Sort by Grade]\r\n    end\r\n    sort --\u003e G[Output Schedule with Grade is descending order]\r\n    G --\u003e H[Generate Plot etc.]\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpifisherman%2Faps-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frpifisherman%2Faps-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpifisherman%2Faps-app/lists"}