My WIP solution to play.elevatorsaga.com
Copy and paste the JavaScript code from index.js into the editor at play.elevatorsaga.com to get started using this code.
Update the variables near the top of the document to customise how the code will execute to overcome certain scenarios.
Requires a decimal value between 0 and 1. Weighs against the loadFactor for all elevators to determine if an elevator should ignore requests and offload passengers. A higher master load factor will result in all elevators accepting more passengers before ignoring new passenger calls to offload passengers. See loadFactor
in elevatorsaga documentation: https://play.elevatorsaga.com/documentation.html#docs
Requires semantic boolean. Set to true to initialise all the elevators with a command to go to floor 0 immediately upon scenario initialisation. Set to false to not do this. This can improve responsiveness of elevators for follow up orders in certain scenarios where initial passenger requests are rapid. Do not set to true while arrayElevators is set to true.
Requires semantic boolean. Set to true to spread out all elevators fairly eveningly across all floors in the scenario. Set to false to not do this. This can improve initial responsiveness in certain scenarios where initial passenger requests are spread out. Do not set to true while primeElevators is set to true.
WIP - Requires a decimal value between 0 and n. Takes into consideration the number of orders per floor for an elevator and multiplies the number of orders by the neglectModifier per event "visit" an elevator makes to a floor, allowing those floors with the highest demands and the longest ignored to effectively have the greatest "weight" via order numbers. A neglectModifier above 0 will result in floors with order requests greater than 0 becoming more indemand per elevator stop, effectively decreasing wait times for floors with low passenger requests.
- Build model for elevators
- Build model for elevator orders
- Create basic customisable variables for easy cusomisation
- Utilised the elevator direction signs for direction indication to passengers
- Factor in elevator direction with request direction before prioritising order