Giter VIP home page Giter VIP logo

easydispatch's Introduction

easydispatch

This is a real time field service dispatching planner. It automatically dispatch jobs to different workers under business restrictions like working hour, skills, etc.

Some of the key feature highlights:

  • Real Time Dispatching based on three types of Dispatching Algorithms: Heuristic, Optimization, Reinforcement Learning
  • Vehicle Routing Problem capability embedded
  • Flexible Business Rule Plugins, specifies what solution is allowed but not how to reach a solution
  • Explainable AI to do drag and drop what-if analysis.
  • Full set of REST API and API Documents

Quick Start

Register a free account at the hosted demo site, or check out the website for more information.

planner_ui

Local Installation

EasyDispatch relies on Postgres DB, Redis and Kafka. Those three components can be started by docker and compose or provisioned seperately. You also should have npm and node for frontend development.

  1. To run easydispatch locally, first install it by:
git clone https://github.com/alibaba/easydispatch.git && cd easydispatch
pip install -e .
  1. Then copy and modify env file from $easydisaptch/etc/dev_env_sample to $easydisaptch/dev.env . Start the database, redis and kafka by docker composer.
docker-compose -f kafka-redis-postgres-compose.yml -p easy up
  1. Open another terminal, populate some sample data and run the frontend:
python -m dispatch.cli database init
python -m dispatch.cli server start --port 8000 dispatch.main:app 
  1. Visit the page at : http://localhost:8000/login

Other Information

Those scripts can be used for testing purpose:

  • clear off all existing workers and jobs
  • generate sample data for a period
  • use batch optimizer to dispatch all jobs in the planning window
cd $EASHDISPATCH_HOME
python  tests/kandbox_clear_data.py 
python -m dispatch.cli util generate --dataset veo --team_code london_t1 --start_day 20210503 --end_day 20210505 --username demo --password demo
python -m dispatch.cli job dispatch  --team_code london_t1  --start_day 20210503 --dispatch_days 2

OS and Environements

We have tested it on Ubuntu 20.04 and MacOS, Python 3.7 / 3.8 / 3.9

Reference

The frontend and server technology stack (vue + python) were adapted from Netflix Dispatch. Data structures are not compatible.

easydispatch's People

Contributors

alibaba-oss avatar mmchengzi avatar qiyangduan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

easydispatch's Issues

Error when trying to initialize database

when using the command "python -m dispatch.cli database init" with the latest commit I get the error:-

Failed to load tables ... Ignore this if you are creating database ...
_get_workers failure,msg=(psycopg2.errors.UndefinedTable) relation "dispatch_core.organization" does not exist
LINE 2: FROM dispatch_core.organization
^

[SQL: SELECT dispatch_core.organization.id AS dispatch_core_organization_id, dispatch_core.organization.code AS dispatch_core_organization_code, dispatch_core.organization.callback_url AS dispatch_core_organization_callback_url, dispatch_core.organization.max_nbr_jobs AS dispatch_core_organization_max_nbr_jobs, dispatch_core.organization.max_nbr_teams AS dispatch_core_organization_max_nbr_teams, dispatch_core.organization.max_nbr_workers AS dispatch_core_organization_max_nbr_workers, dispatch_core.organization.team_flex_form_schema AS dispatch_core_organization_team_flex_form_schema, dispatch_core.organization.worker_flex_form_schema AS dispatch_core_organization_worker_flex_form_schema, dispatch_core.organization.job_flex_form_schema AS dispatch_core_organization_job_flex_form_schema, dispatch_core.organization.zulip_is_active AS dispatch_core_organization_zulip_is_active, dispatch_core.organization.zulip_site AS dispatch_core_organization_zulip_site, dispatch_core.organization.zulip_user_name AS dispatch_core_organization_zulip_user_name, dispatch_core.organization.zulip_password AS dispatch_core_organization_zulip_password, dispatch_core.organization.public_registration AS dispatch_core_organization_public_registration, dispatch_core.organization.created_at AS dispatch_core_organization_created_at, dispatch_core.organization.updated_at AS dispatch_core_organization_updated_at, dispatch_core.organization.updated_by AS dispatch_core_organization_updated_by
FROM dispatch_core.organization]
(Background on this error at: http://sqlalche.me/e/13/f405)
Usage: cli.py database [OPTIONS] COMMAND [ARGS]...
Try 'cli.py database --help' for help.

Error: No such command 'init'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.