https://github.com/holgerbrandl/callcenter-with-setup-avoidance
https://github.com/holgerbrandl/callcenter-with-setup-avoidance
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/holgerbrandl/callcenter-with-setup-avoidance
- Owner: holgerbrandl
- Created: 2021-12-04T16:43:53.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-05T18:50:23.000Z (almost 4 years ago)
- Last Synced: 2025-01-21T13:08:40.290Z (9 months ago)
- Language: Java
- Size: 143 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
= Call center real-time scheduling with setup avoidance
Schedule incoming calls to employees matching skills and availability.
Created by adopting the great example from https://github.com/kiegroup/optaplanner-quickstarts/tree/stable/use-cases/call-center
Discussed in https://groups.google.com/g/optaplanner-dev/c/wnalNxLT3Jw
Changes compared to the original are
* Simplified `Call`s to have just one required skill
* If 2 subsequent calls have a different required skill, a setup cost occurs (expressed via a constraint).The current implementation imposes a setup cost only. This is sufficient to avoid setup via constraint. It would be also very easy to change `getDurationTillPickUp` to model a setup-time instead.
TIP: In addition to the quarkus mode, here we also include `org.acme.callcenter.CallCenterApp` to run the solver without any interface.
.Example schedule of the call center. Clearly setup is avoided where possible
image::schedule-example.png[]== Run the application with live coding
. Git clone the optaplanner-quickstarts repo:
+
[source, shell]
----
$ git clone https://github.com/kiegroup/optaplanner-quickstarts.git
...
$ cd optaplanner-quickstarts/use-cases/call-center
----. Start the application:
+
[source, shell]
----
$ mvn quarkus:dev
----. Visit http://localhost:8080 in your browser.
. Click on the *Solve* button.
Then try _live coding_:
. Make some changes in the source code.
. Refresh your browser (F5).Notice that those changes are immediately in effect.
== Package and run the application
When you're done iterating in `quarkus:dev` mode, run the application as a conventional jar file.
. Compile it:
+
[source, shell]
----
$ mvn package
----. Run it:
+
[source, shell]
----
$ java -jar ./target/quarkus-app/quarkus-run.jar
----
+
[NOTE]
====
To run it on port 8081 instead, add `-Dquarkus.http.port=8081`.
====. Visit http://localhost:8080 in your browser.
== Run a native executable
. https://quarkus.io/guides/building-native-image#configuring-graalvm[Install GraalVM and gu install the native-image tool]
. Compile it natively:
+
[source, shell]
----
$ mvn package -Dnative -DskipTests
----. Run the native executable:
+
[source, shell]
----
$ ./target/*-runner
----. Visit http://localhost:8080 in your browser.
== More information
Visit https://www.optaplanner.org/[www.optaplanner.org].