此内容没有您所选择的语言版本。

Part V. Creating a school timetable using Red Hat Business Optimizer with Spring Boot


This guide walks you through the process of creating a Spring Boot application with Red Hat Business Optimizer’s constraint solving artificial intelligence (AI). You will build a REST application that optimizes a school timetable for students and teachers.

timeTableAppScreenshot

Your service will assign Lesson instances to Timeslot and Room instances automatically by using AI to adhere to the following hard and soft scheduling constraints:

  • A room can have at most one lesson at the same time.
  • A teacher can teach at most one lesson at the same time.
  • A student can attend at most one lesson at the same time.
  • A teacher prefers to teach in a single room.
  • A teacher prefers to teach sequential lessons and dislikes gaps between lessons.

Mathematically speaking, school timetabling is an NP-hard problem. That means it is difficult to scale. Simply iterating through all possible combinations with brute force would take millions of years for a non-trivial dataset, even on a supercomputer. Fortunately, AI constraint solvers such as Red Hat Business Optimizer have advanced algorithms that deliver a near-optimal solution in a reasonable amount of time. What is considered to be a reasonable amount of time is subjective and depends on the goals of your problem.

Prerequisites

  • OpenJDK 8 or later is installed. Red Hat build of Open JDK is available from the Software Downloads page in the Red Hat Customer Portal (login required).
  • Apache Maven 3.2 or higher is installed. Maven is available from the Apache Maven Project website.
  • An IDE, such as IntelliJ IDEA, VSCode, Eclipse, or NetBeans is available.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat