Decision Intelligence Platform

Rule Solver – Rule Scheduler

Rule Scheduler is a component of RuleSolver for modeling and solving Scheduling and Resource Allocation problems. Such problems are traditionally considered very complex decision-making problems and are usually out of reach for most rule engines and require constraint programming tools and the involvement of technical gurus.

Rule Scheduler offers a business interface for representing and solving these problems without programming. Rule Scheduler revives major ideas of “ILOG Scheduler”, a product built specifically for scheduling problems with a very intuitive programming interface. Over the years this product was replaced by more powerful but low-level APIs available in different constraint solvers. Rule Scheduler makes the main concepts of ILOG Scheduler available to business users without programming background and in the context of modern Decision Intelligence Platforms like OpenRules.

Rule Scheduler allows business users to define and solve a scheduling and resource allocation problem in terms of Activities and Resources – see the above schema. The major business concepts are:

  • Schedule is defined in time and has an origin (start) and horizon (end).  The Schedule usually consists of activities, resources, and different relationships between them.
  • Activities are specified by their starts (usually unknown) and durations. There can be precedence relationships between activities such as “Activity A starts after the end of Activity B”. These relationships are usually called “temporal constraints”.
  • Resources usually have limited capacities that may vary over time. For example, people may be available only at certain hours during the day or there could be limited amounts of money in a bank account during different periods. Resources may have different types:  RECOVERABLE (like workers) or CONSUMABLE (like money or gasoline).  Activities may require or produce different resources, and the proper constraints are usually called “Resource Requirement Constraints”. 

RuleScheduler offers special conditions and actions inside regular single-hit and multi-hit decision tables that allow a business user to do the following:

  • Define Activities and Resources
  • Post Temporal Constraints between activities, e.g. “Carpentry starts after Masonry”
  • Posts Requirement Constraints between activities and resources, e.g. “Each Activity requires a Worker”
  • Find feasible or optimal solutions using predefined methods.

A decision modeler usually needs to define two main tables “Define” and “Solve”.

Table “Define” requires the major decision modeling efforts to define all problem’s unknowns and their relationships. Table “Solve” defines the optimization objective and relies on the predefine solving methods such as “SchedulerMinimize” to solve the problem.

The best way to learn how to build scheduling decision models is to follow multiple examples included into RuleScheduler.

Simple Scheduling Problem. Here is a simple scheduling decision model that is supposed to help us to construct a house. The construction requires the following activities with fixed durations and precedence constraints. Arrows represent temporal constraints like “Carpentry starts after the end of Masonry”. The numbers near each activity represent its durations (in days).

To model this, pure scheduling, problem in RuleScheduler, we may create one Excel file “ScheduleActivities.xls” with different tables of the predefined formats. As with any OpenRules-based decision model, we start with the creation of the Glossary:

Here we use two business concepts:

  • Job that represents two input variables (name and duration) and one output variable (scheduled start).
  • HouseConstruction that contains the schedule horizon (max number of days for the entire construction) and all Jobs needed to be executed.

Let’s also specify all jobs in the table of the type “DecisionData”:

 And here is our test case:

The table “Define” contains 3 steps:

The first step defines the schedule:

The second step defines all activities in the decision table that iterates over all Jobs:

The third step posts all temporal constraints:

Here we used the predefined column “SchedulerPost” and the method “Activity Operator Activity” that tells the Scheduler that columns “Par1” and “Par3” represent activities and “Par2” is an operator, e.g. Carpentry > Masonry.

Here is table “Solve”:

Our optimization objective is “Move in ASAP”. It means we may set the objective using the predefined column “SchedulerSetObjective”:

Then the table “Solve” will invoke the standard method “ScheduleMinimize”.  When we run the decision model we will receive an optimal solution:

We used the table “AssignSolution” to save the scheduling results (start times for all jobs) inside the variables “Scheduled Start”:

We may place the scheduling results using the following diagram:

More Samples and Presentations. RuleScheduler was introduced on Sep 19, 2024 at DecisionCAMP-2024:

Here is a list of scheduling decision models included in RuleScheduler:

  • Oven
  • ScheduleActivities
  • ScheduleActivitiesWithWorkers
  • ScheduleActivitiesWithBudget
  • ScheduleActivitiesWithWorkersAndBudget
  • ScheduleAlternativeResources
  • ScheduleAlternativeResourcesMinCost