Skip to content

Commit

Permalink
BXMSDOC-8220 removed splitter elements so this can be merged
Browse files Browse the repository at this point in the history
  • Loading branch information
emmurphy1 committed Jan 21, 2022
1 parent b386447 commit fcd7d37
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 53 deletions.
6 changes: 5 additions & 1 deletion optaplanner-docs/src/modules/ROOT/pages/_attributes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
:quickstarts-archive-url: https://www.optaplanner.org/download/download.html
:hello-world-java-quickstart-url: https://github.com/kiegroup/optaplanner-quickstarts/tree/stable/hello-world
:spring-boot-quickstart-url: https://github.com/kiegroup/optaplanner-quickstarts/tree/stable/technology/java-spring-boot
:quarkus-quickstart-url: https://github.com/kiegroup/optaplanner-quickstarts/tree/stable/use-cases/school-timetabling
:quarkus-quickstart-url: https://github.com/kiegroup/optaplanner-quickstarts/tree/stable/use-cases/school-timetabling
:optaplanner: OptaPlanner
:quarkus: Quarkus
:optaplanner-jdk-version: 11
:optaplanner-maven-version: 3.6
Original file line number Diff line number Diff line change
@@ -1,47 +1,21 @@
[id="chap-optaplanner-vaccination_{context}"]
[[vaccinationScheduler]]
= OptaPlanner Vaccination Scheduler


//:PRODUCTIZED:
//Variable for the enterprise version conditional statements.

ifndef::PRODUCTIZED[]
:optaplanner: OptaPlanner
:quarkus: Quarkus
:optaplanner-jdk-version: 11
:optaplanner-maven-version: 3.6
endif::PRODUCTIZED[]

:context: optaplanner-vaccination-scheduler

You can use the {optaplanner} vaccination appointment scheduler quick start to develop a vaccination schedule that is both efficient and fair. The vaccination appointment scheduler uses artificial intelligence (AI) to prioritize people and allocate time slots based on multiple constraints and priorities.

.Prerequisites

* OpenJDK {optaplanner-jdk-version}or later is installed.


ifdef::PRODUCTIZED[]
Red Hat build of Open JDK is available from the https://access.redhat.com/jbossnetwork/restricted/listSoftware.html[Software Downloads] page in the Red Hat Customer Portal (login required).
endif::PRODUCTIZED[]


* Apache Maven {optaplanner-maven-version}or higher is installed. Maven is available from the https://maven.apache.org/[Apache Maven Project] website.

* An IDE, such as IntelliJ IDEA, VSCode, Eclipse, or NetBeans is available.


ifdef::PRODUCTIZED[]
* You have created a Quakus OptaPlanner project as described in xref:optaplanner-quarkus-con_getting-started-optaplanner[].
endif::PRODUCTIZED[]

ifndef::PRODUCTIZED[]
* You have created a Quakus OptaPlanner project as described in https://www.optaplanner.org/docs/optaplanner/latest/quickstart/quickstart.html#quarkusJavaQuickStart[Quarkus Java quick start].
endif::PRODUCTIZED[]



[id="vaccination-scheduler-con_{context}"]
[[vaccinationSchedulerApproach]]
== How the {optaplanner} vaccination appointment scheduler works

There are two main approaches to scheduling appointments. The system can either let a person choose an appointment slot (user-selects) or the system assigns a slot and tells the person when and where to attend (system-automatically-assigns). The OptaPlanner vaccination appointment scheduler uses the system-automatically-assigns approach. With the OptaPlanner vaccination appointment scheduler, you can create an application where people provide their information to the system and the system assigns an appointment.
Expand All @@ -55,7 +29,7 @@ Characteristics of this approach:
This approach solves the problem of vaccinating as many people as possible by using planning constraints to create a score for each person. The person’s score determines when they get an appointment. The higher the person’s score, the better chance they have of receiving an earlier appointment.


[id="vaccination-contraints-con_{context}"]
[[vaccinationContraints]]
== {optaplanner} vaccination appointment scheduler constraints

OptaPlanner vaccination appointment scheduler constraints are either hard, medium, or soft:
Expand Down Expand Up @@ -105,7 +79,7 @@ Because there are often more people than available appointment slots, you must p
|===


[id="optaplanner-solver-con_{context}"]
[[optaplannerSolver]]
== The {optaplanner} solver

At the core of {optaplanner} is the solver, the engine that takes the problem data set and overlays the planning constraints and configurations. The problem data set includes all of the information about the people, the vaccines, and the vaccination centers. The solver works through the various combinations of data and eventually determines an optimized appointment schedule with people assigned to vaccination appointments at a specific center. The following illustration shows a schedule that the solver created:
Expand All @@ -116,7 +90,7 @@ image::use-cases-and-examples/vaccination-scheduling/vaccinationSchedulingValueP



[id="continuous-planning-con_{context}"]
[[vaccinationContinuousPlanning]]
== Continuous planning

Continuous planning is the technique of managing one or more upcoming planning periods at the same time and repeating that process monthly, weekly, daily, hourly, or even more frequently. The planning window advances incrementally by a specified interval. The following illustration shows a two week planning window that is updated daily:
Expand All @@ -128,7 +102,7 @@ The two week planning window is divided in half. The first week is in the publis
You can determine the size of the planning window but just be aware of the size of the problem space. The problem space is all of the various elements that go into creating the schedule. The more days you plan ahead, the larger the problem space.


[id="pinned-planning-entities-con_{context}"]
[[vaccinationPinnedPlanningEntities]]
== Pinned planning entities

If you are continuously planning on a daily basis, there will be appointments within the two week period that are already allocated to people. To ensure that appointments are not double-booked, {optaplanner} marks existing appointments as allocated by pinning them. Pinning is used to anchor one or more specific assignments and force OptaPlanner to schedule around those fixed assignments. A pinned planning entity, such as an appointment, does not change during solving.
Expand All @@ -144,36 +118,20 @@ In this example, when the solver runs it searches across the entire two week pla
Notice that the appointments on the new day have been assigned and Amy and Edna who were previously scheduled in the draft part of the planning window are now scheduled in the published part of the window. This was possible because Gus and Hugo requested a reschedule. This will not cause any confusion because Amy and Edna were never notified about their draft dates. Now, because they have appointments in the published section of the planning window, they will be notified and asked to accept or reject their appointments, and their appointments are now pinned.


[id="vaccination-scheduler-download-proc_{context}"]
[[vaccinationSchedulerDownload]]
== Downloading and running the {optaplanner} vaccination appointment scheduler

Download the OptaPlanner vaccination appointment scheduler quick start archive, start it in Quarkus development mode, and view the application in a browser. Quarkus development mode enables you to make changes and update your application while it is running.

.Procedure


ifndef::PRODUCTIZED[]
. Clone the `https://github.com/kiegroup/optaplanner-quickstarts` GitHub repository:
+
[source]
----
git clone https://github.com/kiegroup/optaplanner-quickstarts.git
----
. Navigate to the `optaplanner-quickstarts/quarkus-vaccination-scheduling` directory.
endif::PRODUCTIZED[]


ifdef::PRODUCTIZED[]
. Navigate to the https://access.redhat.com/jbossnetwork/restricted/listSoftware.html[Software Downloads] page in the Red Hat Customer Portal (login required), and select the product and version from the drop-down options:

** Product: {PRODUCT_SHORT}
** Version: {PRODUCT_VERSION}
. Download *{PRODUCT} {PRODUCT_VERSION_LONG} Kogito and OptaPlanner 8 Decision Services Quickstarts* (`{PRODUCT_INIT}-{PRODUCT_VERSION_LONG}-decision-services-quickstarts.zip`).
. Extract the `{PRODUCT_INIT}-{PRODUCT_VERSION_LONG}-decision-services-quickstarts.zip` file.
. Navigate to the `optaplanner-quickstarts-{OPTAPLANNER_BOM_VERSION}` directory.
. Navigate to the `optaplanner-quickstarts-{OPTAPLANNER_BOM_VERSION}/quarkus-vaccination-scheduling` directory.
endif::PRODUCTIZED[]


. Enter the following command to start the OptaPlanner vaccination appointment scheduler in development mode:
+
Expand All @@ -192,14 +150,14 @@ http://localhost:8080/
. To run the OptaPlanner vaccination appointment scheduler, click *Solve*.
. Make changes to the source code then press the F5 key to refresh your browser. Notice that the changes that you made are now available.

[id="vaccination-scheduler-package-proc_{context}"]
[[vaccinationSchedulerPackage]]
== Package and run the {optaplanner} vaccination appointment scheduler

When you have completed development work on the OptaPlanner vaccination appointment scheduler in `quarkus:dev` mode, run the application as a conventional JAR file.

.Prerequisites

* You have downloaded the OptaPlanner vaccination appointment scheduler quick start. For more information, see xref:vaccination-scheduler-download-proc_{context}[].
* You have downloaded the OptaPlanner vaccination appointment scheduler quick start.

.Procedure
. Navigate to the `quarkus-vaccination-scheduling` directory.
Expand Down Expand Up @@ -229,7 +187,7 @@ To run the application on port 8081, add `-Dquarkus.http.port=8081` to the prece
http://localhost:8080/
----

[id="vaccination-native-proc_{context}"]
[[vaccinationNativeExecutable]]
== Run the {optaplanner} vaccination appointment scheduler as a native executable

To take advantage of the small memory footprint and access speeds that Quarkus offers, compile the OptaPlanner vaccination appointment scheduler in Quarkus native mode.
Expand Down

0 comments on commit fcd7d37

Please sign in to comment.