Coder Social home page Coder Social logo

timefoldai / timefold-quickstarts Goto Github PK

View Code? Open in Web Editor NEW
156.0 11.0 42.0 22.43 MB

Get started with Timefold quickstarts here. Timefold is the successor of OptaPlanner, by the OptaPlanner team. Optimize the vehicle routing problem, employee rostering, task assignment, maintenance scheduling and other planning problems

Home Page: https://timefold.ai

License: Apache License 2.0

Java 68.25% JavaScript 20.46% HTML 7.13% Kotlin 4.15% CSS 0.01%
artificial-intelligence employee-scheduling gradle java job-shop-scheduling kotlin maintenance-scheduling maven planning-algorithms quarkus

timefold-quickstarts's Introduction

Timefold Quickstarts

Planning optimization made easy.
timefold.ai

Overview of all Quickstarts

Use case quickstarts Technology quickstarts

Use cases

Vehicle Routing

Find the most efficient routes for vehicles to reach visits, taking into account vehicle capacity and time windows when visits are available. Sometimes also called "CVRPTW".

quarkus vehicle routing screenshot

Maintenance scheduling

Schedule maintenance jobs to crews over time to reduce both premature and overdue maintenance.

quarkus maintenance scheduling screenshot

Employee Scheduling

Schedule shifts to employees, accounting for employee availability and shift skill requirements.

quarkus employee scheduling screenshot

Food Packaging

Schedule food packaging orders to manufacturing lines, to minimize downtime and fulfill all orders in time.

quarkus food packaging screenshot

Order Picking

Generate an optimal picking plan for completing a set of orders.

quarkus order picking screenshot

School timetabling

Assign lessons to timeslots and rooms to produce a better schedule for teachers and students.

quarkus school timetabling screenshot

Without a UI:

Facility location problem

Pick the best geographical locations for new stores, distribution centers, covid test centers or telco masts.

quarkus facility location screenshot

Conference Scheduling

Assign conference talks to timeslots and rooms to produce a better schedule for speakers.

quarkus conference scheduling screenshot

Bed Allocation Scheduling

Assign beds to patient stays to produce a better schedule for hospitals.

quarkus bed scheduling screenshot

Flight Crew Scheduling

Assign crew to flights to produce a better schedule for flight assignments.

quarkus flight crew scheduling screenshot

Meeting Scheduling

Assign timeslots and rooms for meetings to produce a better schedule.

quarkus meeting scheduling screenshot

Timefold Quickstarts was forked on 20 April 2023 from OptaPlanner Quickstarts, which was entirely Apache-2.0 licensed (a permissive license).

Timefold Quickstarts is a derivative work of OptaPlanner Quickstarts, which includes copyrights of the original creator, Red Hat Inc., affiliates and contributors, that were all entirely licensed under the Apache-2.0 license. Every source file has been modified.

timefold-quickstarts's People

Contributors

bredentek avatar bsig-gh-bot avatar christopher-chianelli avatar cristianonicolai avatar cuijulian avatar dependabot[bot] avatar dupliaka avatar evacchi avatar ge0ffrey avatar ginxo avatar kie-ci avatar kie-ci5 avatar lampajr avatar mareknovotny avatar mbiarnes avatar radtriste avatar rsynek avatar taiuti avatar thimmwork avatar timefold-release avatar tomcools avatar triceo avatar wmedvede avatar yurloc 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  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  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  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

timefold-quickstarts's Issues

Create a pull-request template

Discussed in TimefoldAI/timefold-solver#502

Originally posted by zepfred December 18, 2023
The goal is to create a standardized process for updating quickstart modules and a pull request (PR) template that includes checkbox fields that must be marked before submitting or merging a PR. Here are some examples:

  1. Does the proposed change, if needed, incorporate tests to prevent any regressions?
  2. Are the UI and JS files fully tested?
    • Did you check all UI buttons (E.g., solve and analyze buttons)?
    • Did you check the network calls?
    • Did you check the console messages?
  3. Do you have a green build?

Upgrade Dockerfile.jvm to java 17

We're now minimal java 17, but some of the Dockerfile.jvm files still state:

ARG JAVA_PACKAGE=java-11-openjdk-headless

Let's fix that.

Apparently we can remove the boilerplate code entirely, by deleting the Dockerfile.jvm and Dockerfile.native files and using this instead:

    <profile>
      <id>container</id>
      <activation>
        <property>
          <name>container</name>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>io.quarkus</groupId>
          <artifactId>quarkus-container-image-jib</artifactId>
        </dependency>
      </dependencies>
      <properties>
        <quarkus.container-image.build>true</quarkus.container-image.build>
      </properties>
    </profile>
  </profiles>

Improve exception message in case the data set has not been solved yet

For the score analysis button, consider more friendly message in case the data set has not been solved yet. As of now, the message starts with "{"details":"Error id c9e674b0-daca-4829-8db8-326753a24402-2, org.jboss.resteasy.spi.UnhandledException ..." and only later, if one reads carefully, they learn what the root cause is.

For unexpected exceptions, it's ok. In this case, I would argues it's not, as halve the users will be tempted to click the score analysis button first.

Originally posted by @rsynek in #142 (comment)

VRPTW: vehicle.route is duplicate information

Maybe we can have javascript side calculate this? To avoid increasing the json payload size.

    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    /**
     * @return route of the vehicle
     */
    public List<Location> getRoute() {

Standarize all Quickstarts (and the docs guides) on String id instead of Long id

String can hold UUID, a Long cannot.
String can hold an unique employee number like 00005 or G-45454, a Long cannot.

All REST API users prefer a String over a Long.

  • all quickstarts
  • the 3 guides (plain, spring, quarkus) in the docs
  • Inscape images of school timeatbling diagrams? No, normally they don't show the id (and let's leave it like that)

VRP various improvements

  • timetable reference in showError("Getting timetable has failed.", xhr);
  • Show score next to solve button, so it's visible from any tab
  • One-off issue with red visit even though 0 hard

image

  • navbar: non selected is hard to read
  • spacing under tab pills

image

Unify @PlanningId usage across quickstarts

@PlanningId usage is a bit inconsistent across the quickstarts, use it on all problem fact & entity classes.

13.1. @PlanningId
For some functionality (such as multithreaded solving and real-time planning), Timefold needs to map problem facts and planning entities to an ID. Timefold uses that ID to rebase a move from one thread's solution state to another's.
To enable such functionality, specify the @PlanningId annotation on the identification field or getter method, for example on the database ID:

Current status:

timefold-quickstarts/use-cases/employee-scheduling - @PlanningId defined both on planning entity and problem facts
timefold-quickstarts/use-cases/food-packaging - @PlanningId defined on a single planning entity, not on problem facts
timefold-quickstarts/use-cases/facility-location - @PlanningId not used at all

Standardize school-timetabling quickstarts

The Quarkus school timetabling quickstart uses a simplified data model, which doesn't use database and doesn't allow to add/remove/edit any items. It also uses a slighty different UI because of that.

The same changes need to be made to the Spring Boot quickstart, and the Kotlin quickstart. The quickstarts should be identical to the Quarkus quickstart, other than the obvious replacing of Quarkus with Spring Boot and Java with Kotlin. (Same UI, same names of field, classes, same data sets etc.)

Bug: Flaky test `SolverServiceTest#prolongCall` in Call Center quickstart

Describe the bug
The test SolverServiceTest#prolongCall is flaky.

Expected behavior
The test must pass.

Actual behavior
It is failing with the following:

[INFO] Running org.acme.callcenter.solver.CallCenterConstraintProviderTest
2024-01-18 07:42:30,217 INFO  [ai.tim.sol.qua.bea.TimefoldSolverBannerBean] (main) Using Timefold Solver Community Edition v1.6.0.
2024-01-18 07:42:30,316 INFO  [io.quarkus] (main) timefold-solver-quarkus-call-center-quickstart 1.0-SNAPSHOT on JVM (powered by Quarkus 3.6.4) started in 2.227s. Listening on: http://localhost:8081
2024-01-18 07:42:30,317 INFO  [io.quarkus] (main) Profile test activated. 
2024-01-18 07:42:30,319 INFO  [io.quarkus] (main) Installed features: [cdi, resteasy, resteasy-jackson, smallrye-context-propagation, timefold-solver, timefold-solver-jackson, vertx, webjars-locator]
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.603 s -- in org.acme.callcenter.solver.CallCenterConstraintProviderTest
[INFO] Running org.acme.callcenter.solver.SolverServiceTest
2024-01-18 07:42:30,571 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-1) Solving started: time spent (5), best score (-2init/0hard/0soft), environment mode (REPRODUCIBLE), move thread count (NONE), random (JDK with seed 0).
2024-01-18 07:42:30,578 INFO  [ai.tim.sol.cor.imp.con.DefaultConstructionHeuristicPhase] (pool-8-thread-1) Construction Heuristic phase (0) ended: time spent (15), best score (-1init/-1hard/0soft), score calculation speed (166/sec), step total (1).
2024-01-18 07:42:30,580 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-1) Real-time problem fact changes done: step total (1), new best score (-1init/-1hard/0soft).
2024-01-18 07:42:30,580 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-1) Solving restarted: time spent (0), best score (-1init/-1hard/0soft), environment mode (REPRODUCIBLE), move thread count (NONE), random (JDK with seed 0).
2024-01-18 07:42:30,582 INFO  [ai.tim.sol.cor.imp.con.DefaultConstructionHeuristicPhase] (pool-8-thread-1) Construction Heuristic phase (0) ended: time spent (2), best score (-1hard/0soft), score calculation speed (4500/sec), step total (1).
2024-01-18 07:42:30,587 INFO  [ai.tim.sol.cor.imp.loc.DefaultLocalSearchPhase] (pool-8-thread-1) Local Search phase (1) ended: time spent (7), best score (0hard/0soft), score calculation speed (1500/sec), step total (5).
2024-01-18 07:42:30,588 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-1) Real-time problem fact changes done: step total (2), new best score (0hard/0soft).
2024-01-18 07:42:30,589 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-1) Solving restarted: time spent (0), best score (0hard/0soft), environment mode (REPRODUCIBLE), move thread count (NONE), random (JDK with seed 0).
2024-01-18 07:42:30,589 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-1) Skipped all phases (2): out of 2 planning entities, none are movable (non-pinned).
2024-01-18 07:42:30,889 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (main) Terminating solver early.
2024-01-18 07:42:30,889 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-1) Solving ended: time spent (0), best score (0hard/0soft), score calculation speed (1000/sec), phase total (2), environment mode (REPRODUCIBLE), move thread count (NONE).
2024-01-18 07:42:30,899 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-2) Solving started: time spent (0), best score (0hard/0soft), environment mode (REPRODUCIBLE), move thread count (NONE), random (JDK with seed 0).
2024-01-18 07:42:30,900 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-2) Skipped all phases (2): out of 0 planning entities, none are movable (non-pinned).
2024-01-18 07:42:30,903 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-2) Real-time problem fact changes done: step total (2), new best score (-2init/0hard/0soft).
2024-01-18 07:42:30,904 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-2) Solving restarted: time spent (1), best score (-2init/0hard/0soft), environment mode (REPRODUCIBLE), move thread count (NONE), random (JDK with seed 0).
2024-01-18 07:42:30,906 INFO  [ai.tim.sol.cor.imp.con.DefaultConstructionHeuristicPhase] (pool-8-thread-2) Construction Heuristic phase (0) ended: time spent (3), best score (0hard/0soft), score calculation speed (8500/sec), step total (2).
2024-01-18 07:42:30,907 INFO  [ai.tim.sol.cor.imp.loc.DefaultLocalSearchPhase] (pool-8-thread-2) Local Search phase (1) ended: time spent (4), best score (0hard/0soft), score calculation speed (1000/sec), step total (1).
2024-01-18 07:42:30,908 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-2) Real-time problem fact changes done: step total (1), new best score (0hard/0soft).
2024-01-18 07:42:30,908 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-2) Solving restarted: time spent (0), best score (0hard/0soft), environment mode (REPRODUCIBLE), move thread count (NONE), random (JDK with seed 0).
2024-01-18 07:42:30,908 INFO  [ai.tim.sol.cor.imp.con.DefaultConstructionHeuristicPhase] (pool-8-thread-2) Construction Heuristic phase (0) ended: time spent (0), best score (0hard/0soft), score calculation speed (0/sec), step total (0).
2024-01-18 07:42:31,104 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (main) Terminating solver early.
2024-01-18 07:42:31,104 INFO  [ai.tim.sol.cor.imp.loc.DefaultLocalSearchPhase] (pool-8-thread-2) Local Search phase (1) ended: time spent (196), best score (0hard/0soft), score calculation speed (78861/sec), step total (1).
2024-01-18 07:42:31,104 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-2) Solving ended: time spent (196), best score (0hard/0soft), score calculation speed (78464/sec), phase total (2), environment mode (REPRODUCIBLE), move thread count (NONE).
2024-01-18 07:42:31,120 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-11-thread-1) Solving started: time spent (6), best score (-1hard/-2soft), environment mode (REPRODUCIBLE), move thread count (NONE), random (JDK with seed 0).
2024-01-18 07:42:31,123 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-11-thread-1) Real-time problem fact changes done: step total (1), new best score (-1hard/-1soft).
2024-01-18 07:42:31,123 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-11-thread-1) Solving restarted: time spent (0), best score (-1hard/-1soft), environment mode (REPRODUCIBLE), move thread count (NONE), random (JDK with seed 0).
2024-01-18 07:42:31,125 INFO  [ai.tim.sol.cor.imp.loc.DefaultLocalSearchPhase] (pool-11-thread-1) Local Search phase (0) ended: time spent (2), best score (0hard/0soft), score calculation speed (9000/sec), step total (7).
2024-01-18 07:42:31,126 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-11-thread-1) Real-time problem fact changes done: step total (1), new best score (0hard/0soft).
2024-01-18 07:42:31,127 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-11-thread-1) Solving restarted: time spent (1), best score (0hard/0soft), environment mode (REPRODUCIBLE), move thread count (NONE), random (JDK with seed 0).
2024-01-18 07:42:31,127 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-11-thread-1) Skipped all phases (1): out of 1 planning entities, none are movable (non-pinned).
2024-01-18 07:42:31,127 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-11-thread-1) Solving ended: time spent (1), best score (0hard/0soft), score calculation speed (1000/sec), phase total (1), environment mode (REPRODUCIBLE), move thread count (NONE).
2024-01-18 07:42:31,247 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-1) Solving started: time spent (0), best score (-2init/0hard/0soft), environment mode (REPRODUCIBLE), move thread count (NONE), random (JDK with seed 0).
2024-01-18 07:42:31,247 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-1) Real-time problem fact changes done: step total (1), new best score (-1init/0hard/0soft).
2024-01-18 07:42:31,248 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-1) Solving restarted: time spent (0), best score (-1init/0hard/0soft), environment mode (REPRODUCIBLE), move thread count (NONE), random (JDK with seed 0).
2024-01-18 07:42:31,249 INFO  [ai.tim.sol.cor.imp.con.DefaultConstructionHeuristicPhase] (pool-8-thread-1) Construction Heuristic phase (0) ended: time spent (1), best score (0hard/0soft), score calculation speed (8000/sec), step total (1).
2024-01-18 07:42:31,250 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-1) Real-time problem fact changes done: step total (1), new best score (0hard/0soft).
2024-01-18 07:42:31,250 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-1) Solving restarted: time spent (0), best score (0hard/0soft), environment mode (REPRODUCIBLE), move thread count (NONE), random (JDK with seed 0).
2024-01-18 07:42:31,250 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-1) Skipped all phases (2): out of 1 planning entities, none are movable (non-pinned).
2024-01-18 07:42:31,368 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (main) Terminating solver early.
2024-01-18 07:42:31,368 INFO  [ai.tim.sol.cor.imp.sol.DefaultSolver] (pool-8-thread-1) Solving ended: time spent (0), best score (0hard/0soft), score calculation speed (1000/sec), phase total (2), environment mode (REPRODUCIBLE), move thread count (NONE).
Error:  Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.904 s <<< FAILURE! -- in org.acme.callcenter.solver.SolverServiceTest
Error:  org.acme.callcenter.solver.SolverServiceTest.prolongCall -- Time elapsed: 0.423 s <<< FAILURE!
org.opentest4j.AssertionFailedError: 

Expecting Duration:
  59.709322S
to have 1L minute but had 0L
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at org.acme.callcenter.solver.SolverServiceTest.prolongCall(SolverServiceTest.java:87)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at io.quarkus.test.junit.QuarkusTestExtension.runExtensionMethod(QuarkusTestExtension.java:1013)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestMethod(QuarkusTestExtension.java:827)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

Flaky SolverServiceTest test in Call Center quickstart

2023-06-19T13:32:32.5305270Z [ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.478 s <<< FAILURE! - in org.acme.callcenter.solver.SolverServiceTest
2023-06-19T13:32:32.5306210Z [ERROR] org.acme.callcenter.solver.SolverServiceTest.removeCall  Time elapsed: 0.021 s  <<< FAILURE!
2023-06-19T13:32:32.5306850Z java.lang.AssertionError: 
2023-06-19T13:32:32.5307200Z 
2023-06-19T13:32:32.5307490Z Expecting RegularEnumSet:
2023-06-19T13:32:32.5308000Z   [ENGLISH, LIFE_INSURANCE, PROPERTY_INSURANCE]
2023-06-19T13:32:32.5309170Z to contain:
2023-06-19T13:32:32.5309580Z   [ENGLISH, CAR_INSURANCE]
2023-06-19T13:32:32.5310050Z but could not find the following element(s):
2023-06-19T13:32:32.5310340Z   [CAR_INSURANCE]
2023-06-19T13:32:32.5310480Z 
2023-06-19T13:32:32.5310710Z 	at org.acme.callcenter.solver.SolverServiceTest.removeCall(SolverServiceTest.java:90)

Bug: Duplicate class build error

Describe the bug
I executed runQuickStartsFromSource.sh and it downloaded thing fine but when the build started it failed with a class duplication error and this message (this is the error message after re-running once so the downloads don't take up too much space):

[INFO] --- quarkus:3.2.0.Final:dev (default-cli) @ timefold-solver-quickstarts-showcase ---
[INFO] Invoking org.apache.maven.plugins:maven-enforcer-plugin:3.3.0:enforce (enforce-no-logback-test-in-main) @ timefold-solver-quickstarts-showcase
[INFO] Rule 0: org.apache.maven.enforcer.rules.files.RequireFilesDontExist passed
[INFO] Rule 1: org.commonjava.maven.enforcer.rule.EnforceManagedDepsRule(requireManagedDeps) passed
[INFO] Rule 2: org.apache.maven.enforcer.rules.dependency.BannedDependencies passed
[INFO] Adding ignore: module-info
[INFO] Adding ignore: META-INF/versions//module-info
[INFO] Adding ignore: module-info
[INFO] Adding ignore: META-INF/versions/

[INFO] Adding ignorable dependency: io.quarkus:quarkus-ide-launcher:null
[INFO] Adding ignore: *
[INFO] Rule 4: org.apache.maven.enforcer.rules.BanDuplicatePomDependencyVersions passed
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.321 s
[INFO] Finished at: 2023-07-06T23:07:33-07:00
[INFO] ------------------------------------------------------------------------
[WARNING]
[WARNING] Plugin validation issues were detected in 1 plugin(s)
[WARNING]
[WARNING] * org.apache.maven.plugins:maven-site-plugin:3.12.1
[WARNING]
[WARNING] For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [BRIEF, DEFAULT, VERBOSE]
[WARNING]
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:3.2.0.Final:dev (default-cli) on project timefold-solver-quickstarts-showcase:
[ERROR] Rule 3: org.codehaus.mojo.extraenforcer.dependencies.BanDuplicateClasses failed with message:
[ERROR] Duplicate classes found:
[ERROR]
[ERROR] Found in:
[ERROR] org.codehaus.plexus:plexus-xml:jar:4.0.0:test
[ERROR] org.codehaus.plexus:plexus-utils:jar:3.5.1:test
[ERROR] Duplicate classes:
[ERROR] org/codehaus/plexus/util/xml/pull/EntityReplacementMap.class
[ERROR] org/codehaus/plexus/util/xml/XmlReaderException.class
[ERROR] org/codehaus/plexus/util/xml/XmlStreamReaderException.class
[ERROR] org/codehaus/plexus/util/xml/XmlStreamReader.class
[ERROR] org/codehaus/plexus/util/xml/pull/MXParser.class
[ERROR] org/codehaus/plexus/util/xml/CompactXMLWriter.class
[ERROR] org/codehaus/plexus/util/xml/Xpp3DomUtils.class
[ERROR] org/codehaus/plexus/util/xml/pull/MXSerializer.class
[ERROR] org/codehaus/plexus/util/xml/pull/XmlSerializer.class
[ERROR] org/codehaus/plexus/util/xml/PrettyPrintXMLWriter.class
[ERROR] org/codehaus/plexus/util/xml/pull/XmlPullParser.class
[ERROR] org/codehaus/plexus/util/xml/SerializerXMLWriter.class
[ERROR] org/codehaus/plexus/util/xml/XmlWriterUtil.class
[ERROR] org/codehaus/plexus/util/xml/pull/XmlPullParserException.class
[ERROR] org/codehaus/plexus/util/xml/XMLWriter.class
[ERROR] org/codehaus/plexus/util/xml/XmlReader.class
[ERROR] org/codehaus/plexus/util/xml/XmlStreamWriter.class
[ERROR] org/codehaus/plexus/util/xml/Xpp3DomWriter.class
[ERROR] org/codehaus/plexus/util/xml/XmlUtil.class
[ERROR]
[ERROR] Found in:
[ERROR] org.codehaus.plexus:plexus-xml:jar:4.0.0:test
[ERROR] org.apache.maven:maven-xml-impl:jar:4.0.0-alpha-5:test
[ERROR] org.codehaus.plexus:plexus-utils:jar:3.5.1:test
[ERROR] Duplicate classes:
[ERROR] org/codehaus/plexus/util/xml/Xpp3DomBuilder.class
[ERROR] org/codehaus/plexus/util/xml/Xpp3Dom.class
[ERROR] org/codehaus/plexus/util/xml/Xpp3DomBuilder$InputLocationBuilder.class
[ERROR]
[ERROR] Found in:
[ERROR] org.codehaus.plexus:plexus-xml:jar:4.0.0:test
[ERROR] org.apache.maven:maven-xml-impl:jar:4.0.0-alpha-5:test
[ERROR] Duplicate classes:
[ERROR] org/codehaus/plexus/util/xml/Xpp3Dom$ChildrenTracking.class
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Expected behavior
Proper build

Actual behavior
Build failed

To Reproduce
clone repo and execute runQuickStartsFromSource.sh

Environment

git repo cloned on 05/07/23 at 23:45 (MST)

openjdk version "20.0.1" 2023-04-18
OpenJDK Runtime Environment (build 20.0.1+9)
OpenJDK 64-Bit Server VM (build 20.0.1+9, mixed mode, sharing)

Linux profile-name 6.4.1-artix1-1 #1 SMP PREEMPT_DYNAMIC Sat, 01 Jul 2023 18:50:59 +0000 x86_64 GNU/Linux

Score Analysis before Solve must not seem to hang

  1. Open any of the score analysis enabled quickstarts.
  2. Click on the ? button before solving

You get this:

image

That seems like broken, because the "Analyzing score..." seems as if something is running in the background.

Proposal A) Disable the button if not yet solved.

Proposal B) Analyse the score of the completely uninitialized solution. This should be possible.

Proposal C) Show a dialog that says "First click the solve button"

VRP variants: calculate southWestCorner and northEastCorner on the fly in the UI

From a solving point of view, these fields in the solution are obsolete in the VRP variants and the facility location problem:

    private Location southWestCorner;
    private Location northEastCorner;

The demo-data already contains the depot and all customer locations. From that the southWestCorner and northEastCorner can be calculated as the min(x), min(y), max(x), , max(y) and then adding 5% on every side.

image

Bug: arrival time does not take into account previous delayed arrival

Describe the bug
I am playing with the VRPTW example and run against a problem with the startServiceTime and Arrivaltime.
It is a bit hard to explain, but lets give it a go.

i have 3 orders that get assigned to a specific vehicle like this:
orders

Every bar is 10 minutes
Gray is travel time between the orders as estimated by TF
Blue is the orders duration. Times on the orders are the duetime and duetime+serviceduration (so expected start and end time)
Every order has a 30 minute window between ready and due time.

Actual behavior

  • The first order is obviously perfect.
  • The second order is delayed about 16 minutes with travel time.
    (i get back a departure time that is the start service time + the serviceDuration so that seems correct)
  • The 3rd order is the problem. Obviously the second was delayed, so i would expect that to reflect on the 3rd as well, even more so since the traveltime even overlaps.

But here the example gives me back a delay of only ~5 minutes which curresponds with what i see on the timeline i made out of it.

Expected behavior
I suspect this should be 21 minutes, so 16 minutes of previous delay + 5 minutes traveltime on top of that.

To Reproduce
Will need to gather that info together

Environment

Timefold Solver Version or Git ref:
release version 1.3.0 i think

Output of java -version:
openjdk version "17.0.8.1" 2023-08-24

Output of uname -a or ver:
Linux ubuntu 5.15.0-72-generic #79-Ubuntu SMP Wed Apr 19 08:22:18 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Additional information

I might have this wrong and its expected bahaviour, i am quite new to this. But it does not seem right :)

Provide any and all other information which might be relevant to the issue.

Simplification: Remove s2i

From all quickstarts:

  • Remove .s2i directories
  • Remove OpenShift instructions from README.adoc

Motivation: less files per use case is better. It makes it easier to grok. Every file (and every section in the readme) must be worth its weight (= be useful to at least 25% of the users).

Nearby selection for VRP quickstart

All of the quickstarts should have a maven profile that adds the enterprise jars, so it's easy to test how they behave with multitheaded solving.
Furthermore, the VRP variants should be easy to switch to enable nearby selection, so users can easily benchmark the benefits of upgrading from community to enterprise to benchmark Timefold against competitors on very large datasets correctly.

https://github.com/TimefoldAI/timefold-quickstarts/tree/stable/use-cases/vehicle-routing-capacity

Vehicle routing quickstart: rename Customer to Visit, remote Depot

"Customer" in a VRP can be ambiguous. Sometimes is an order, a store location, a client, a supplier or one of the company's locations that needs maintenance. "Visit" is a better name.

The concept of depot is verbosity. Less is more.

  • rename Customer to Visit
  • remove Depot. Just give every Vehicle a homeLocation.

Standardize school-timetabling without UI quickstart

Discussed in TimefoldAI/timefold-solver#487

Originally posted by zepfred December 13, 2023
The school timetabling without UI quickstart uses a simplified data model, which doesn't use database and doesn't allow to add/remove/edit any items. It also uses a slightly different UI because of that.

The same changes need to be made to the school timetabling without UI quickstart. The quickstarts should be identical to the Quarkus quickstart, except for the unnecessary dependencies. (Same names of field, classes, same data sets etc.)

JS cleanup: DRY error handling in UI

  • 3 quickstarts define a handleClientError(). Just resue showError() there like in the other quickstarts. Keep it simple.
  • Upstream notificationPanel to the timefold-solver-webui webjar

This code can probably be deleted in 3 quickstarts:

const formatErrorResponseBody = (body) => {
  // JSON must not contain \t (Quarkus bug)
  const json = JSON.parse(body.replace(/\t/g, '  '));
  return `${json.details}\n${json.stack}`;
};

const handleErrorResponse = (title, response) => {
  return response.text()
    .then((body) => {
      const message = `${title} (${response.status}: ${response.statusText}).`;
      const stackTrace = body ? formatErrorResponseBody(body) : '';
      showError(message, stackTrace);
    });
};

const handleClientError = (title, error) => {
  console.error(title + "\n" + error);
  showError(`${title}.`,
    // Stack looks differently in Chrome and Firefox.
    error.stack.startsWith(error.name)
      ? error.stack
      : `${error.name}: ${error.message}\n    ${error.stack.replace(/\n/g, '\n    ')}`);
};

If not, then the other quickstarts probalby need it too and push it into the webui webjar

Bug: dependabot is not updating the Gradle depencies

Describe the bug
The Gradle file becomes inconsistent with Maven due to Dependabot upgrading only Maven dependencies.

Expected behavior
The modules listed below have dependencies that are expected to be upgraded:

  • Technology/java-spring-boot
  • hello-world

Actual behavior
Only Maven files are updated.

CI build PR validation: support multi-repo PR

A multi-repo PR adds APIs on timefold-solver that are used by the timefold-quickstarts PR
As a result, the quickstarts PR needs to be tested against the adjusted timefold-solver build.

See .github/workflwos/pull_request.yml

Proposal A) "Git modules" approach

Proposal B) Checkout the correct fork/branch for timefold-solver before building it:

    steps:
      - name: Checkout timefold-solver
        uses: actions/checkout@v3
        with:
          path: 'timefold-solver'
          repository: 'TimefoldAI/timefold-solver'

      - name: Checkout timefold-quickstarts
        uses: actions/checkout@v3
        with:
          path: 'timefold-quickstarts'

Introduce/extend manufacturing line quickstart with job dependencies

Discussed in TimefoldAI/timefold-solver#385

Originally posted by mcimbora October 31, 2023
Let's say we've got a model similar to this:

ManufacturingLine
List<Job> jobs
Job
List<Job> predecessorJobs
List<Job> successorJobs

The jobs have dependencies between each other (Job can start only after the predecessors are finished). At the same time, the manufacturing line can process a single item at time only. This is a fairly common problem, that causes confusion (should I go for food packaging vs project job scheduling). Ideally the docs explain the differences.

Volunteer to implement this (not critical atm).

README use-case ordering

Motivation:

Vehicle routing is our number one use case and one of our best quickstarts, yet we mention it last. Let's fix that. Let's start with the most important quickstarts first.

Reqs:

On https://github.com/TimefoldAI/timefold-quickstarts#overview-of-all-quickstarts
change the order of the use cases column to something like this:

  • Vehicle Routing
  • Maintenance Scheduling
  • Employee Scheduling
  • Food packaging
  • Order Picking
  • School timetabling
  • Vaccination scheduling
  • Facility location problem
  • Call center

In the technology column we should also add something like a "Java (hello world)" entry to the to, which links to https://github.com/TimefoldAI/timefold-quickstarts/blob/stable/hello-world/README.adoc.

Install fails on macOS 14.0 because of Byte Buddy

Describe the bug
I tried to install the Quickstart examples on macOS 14.0
I got an error about Byte Buddy
Expected behavior
Launch the Quickstart correctly

Actual behavior
./runQuickstartsFromSource.sh

[WARNING]
[WARNING] Plugin validation issues were detected in 1 plugin(s)
[WARNING]
[WARNING] * org.apache.maven.plugins:maven-resources-plugin:3.3.0
[WARNING]
[WARNING] For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [BRIEF, DEFAULT, VERBOSE]
[WARNING]
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:3.3.2:build (default) on project timefold-solver-kotlin-quarkus-school-timetabling-quickstart: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor#enhancerDomainObjects threw an exception: org.hibernate.bytecode.enhance.spi.EnhancementException: Failed to enhance class io.quarkus.hibernate.orm.panache.kotlin.PanacheEntity
[ERROR] at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.enhance(EnhancerImpl.java:157)
[ERROR] at io.quarkus.hibernate.orm.deployment.HibernateEntityEnhancer.enhance(HibernateEntityEnhancer.java:101)
[ERROR] at io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor.enhanceEntities(HibernateOrmProcessor.java:1266)
[ERROR] at io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor.enhancerDomainObjects(HibernateOrmProcessor.java:627)
[ERROR] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[ERROR] at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:858)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
[ERROR] at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:1583)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[ERROR] Caused by: java.lang.IllegalArgumentException: Java 21 (65) is not supported by the current version of Byte Buddy which officially supports Java 20 (64) - update Byte Buddy or set net.bytebuddy.experimental as a VM property
[ERROR] at net.bytebuddy.utility.OpenedClassReader.of(OpenedClassReader.java:96)
[ERROR] at net.bytebuddy.pool.TypePool$Default.parse(TypePool.java:855)
[ERROR] at net.bytebuddy.pool.TypePool$Default.doDescribe(TypePool.java:841)
[ERROR] at net.bytebuddy.pool.TypePool$Default$WithLazyResolution.access$001(TypePool.java:921)
[ERROR] at net.bytebuddy.pool.TypePool$Default$WithLazyResolution.doResolve(TypePool.java:1019)
[ERROR] at net.bytebuddy.pool.TypePool$Default$WithLazyResolution$LazyTypeDescription.delegate(TypePool.java:1088)
[ERROR] at net.bytebuddy.description.type.TypeDescription$AbstractBase$OfSimpleType$WithDelegation.getTypeVariables(TypeDescription.java:8448)
[ERROR] at net.bytebuddy.description.type.TypeDescription$AbstractBase.isGenerified(TypeDescription.java:8059)
[ERROR] at net.bytebuddy.description.type.TypeDescription$Generic$Visitor$Reifying.onNonGenericType(TypeDescription.java:1707)
[ERROR] at net.bytebuddy.description.type.TypeDescription$Generic$Visitor$Reifying$1.onNonGenericType(TypeDescription.java:1663)
[ERROR] at net.bytebuddy.description.type.TypeDescription$Generic$OfNonGenericType.accept(TypeDescription.java:3672)
[ERROR] at net.bytebuddy.dynamic.scaffold.MethodGraph$Compiler$Default.analyzeNullable(MethodGraph.java:698)
[ERROR] at net.bytebuddy.dynamic.scaffold.MethodGraph$Compiler$Default.doAnalyze(MethodGraph.java:712)
[ERROR] at net.bytebuddy.dynamic.scaffold.MethodGraph$Compiler$Default.compile(MethodGraph.java:637)
[ERROR] at net.bytebuddy.dynamic.scaffold.MethodGraph$Compiler$AbstractBase.compile(MethodGraph.java:527)
[ERROR] at org.hibernate.bytecode.enhance.internal.bytebuddy.ByteBuddyEnhancementContext.lambda$resolveGetter$0(ByteBuddyEnhancementContext.java:94)
[ERROR] at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
[ERROR] at org.hibernate.bytecode.enhance.internal.bytebuddy.ByteBuddyEnhancementContext.resolveGetter(ByteBuddyEnhancementContext.java:93)
[ERROR] at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl$AnnotatedFieldDescription.getGetter(EnhancerImpl.java:545)
[ERROR] at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl$AnnotatedFieldDescription.doGetAnnotations(EnhancerImpl.java:574)
[ERROR] at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl$AnnotatedFieldDescription.getAnnotations(EnhancerImpl.java:553)
[ERROR] at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl$AnnotatedFieldDescription.hasAnnotation(EnhancerImpl.java:503)
[ERROR] at org.hibernate.bytecode.enhance.spi.DefaultEnhancementContext.isPersistentField(DefaultEnhancementContext.java:103)
[ERROR] at org.hibernate.bytecode.enhance.internal.bytebuddy.ByteBuddyEnhancementContext.isPersistentField(ByteBuddyEnhancementContext.java:68)
[ERROR] at org.hibernate.bytecode.enhance.internal.bytebuddy.PersistentAttributeTransformer.collectPersistentFields(PersistentAttributeTransformer.java:123)
[ERROR] at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.createTransformer(EnhancerImpl.java:384)
[ERROR] at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.doEnhance(EnhancerImpl.java:371)
[ERROR] at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.lambda$enhance$0(EnhancerImpl.java:151)
[ERROR] at org.hibernate.bytecode.internal.bytebuddy.ByteBuddyState.rewrite(ByteBuddyState.java:163)
[ERROR] at org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.enhance(EnhancerImpl.java:151)
[ERROR] ... 12 more
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :timefold-solver-kotlin-quarkus-school-timetabling-quickstart

To Reproduce
git clone https://github.com/TimefoldAI/timefold-quickstarts.git
cd timefold-quickstarts
./runQuickstartsFromSource.sh

Environment

Timefold Solver Version or Git ref:

Not sure, last github version :

git clone https://github.com/TimefoldAI/timefold-quickstarts.git

git rev-parse HEAD
a2c43d9

Output of java -version:

openjdk version "17.0.8.1" 2023-08-24
OpenJDK Runtime Environment Homebrew (build 17.0.8.1+0)
OpenJDK 64-Bit Server VM Homebrew (build 17.0.8.1+0, mixed mode, sharing)

Output of uname -a or ver:

Darwin 23.0.0 Darwin Kernel Version 23.0.0

Additional information

Initially i installed Java 21.
I downgraded to Java 17 given the error message about Java 21.
But i still got the same error.

So I provided:

export JAVA_TOOL_OPTIONS="-Dnet.bytebuddy.experimental=true"

then it ran successfully.

./runQuickstartsFromSource.sh
Picked up JAVA_TOOL_OPTIONS: -Dnet.bytebuddy.experimental=true
[INFO] Scanning for projects...

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.