Interactive Graph Theory Learning
Interactive Graph Theory Learning
Guest User
Using app without sign in
Graph theory study guides
Instant download · Lifetime access
Prefer one-on-one help?
Private sessions on RCPSP (Resource-Constrained Project Scheduling) for your course, an interview or an optimization project.
Resource-constrained scheduling solver
Schedules project tasks while respecting both precedence constraints and global resource limits.
Select an algorithm and generate steps to begin visualization
The Resource-Constrained Project Scheduling Problem (RCPSP) schedules project activities subject to both precedence constraints and limited renewable resources such as workers, machines, or budget per period. Unlike CPM, which assumes unlimited resources, RCPSP is strongly NP-hard.
Priority-rule heuristics build schedules with the serial or parallel schedule generation scheme: activities are inserted at the earliest time where precedence and resource availability both hold, ordered by rules like most total successors or minimum slack. Exact approaches use branch and bound with resource-based lower bounds, and metaheuristics, notably genetic algorithms with activity-list encodings, dominate on the standard PSPLIB benchmarks.
RCPSP drives construction crew and equipment scheduling, software team sprint planning under staffing limits, maintenance shutdown scheduling in refineries, and production planning in make-to-order manufacturing. It is the canonical bridge between graph algorithms and industrial operations research.
Once resources are finite the problem stops being a network sweep and becomes a search. The standard practical method is a serial schedule generation scheme driven by a priority rule.
SerialSGS(activities, priority):
scheduled = {}
for k = 1 to number of activities:
eligible = unscheduled activities whose
predecessors are all scheduled
a = the eligible activity ranked highest
by the priority rule
t = earliest time >= max finish of a's predecessors
such that for every period in [t, t+dur[a]):
usage + need[a] <= capacity, for each resource
schedule a at t; update resource usage
// Priority rules: latest start time, minimum slack,
// most total successors, greatest resource demandThe serial scheme always produces a feasible schedule, never an optimal one. Different priority rules give different makespans, so practical solvers run many rules, or randomise the priority and sample thousands of schedules, keeping the best. Exact methods exist via branch and bound or constraint programming but only for small instances, since RCPSP is NP-hard.
Take the same four-activity project used for CPM and add a single resource that only one activity can use at a time.
Example graph: Activities A (3 days), B (2 days), C (4 days), D (2 days), with A and B preceding C, and C preceding D. Every activity needs 1 unit of a resource whose total capacity is 1.
The resource constraint pushes the project from 9 days to 11. Two things are worth taking from this. B had one day of slack under CPM and now has none, because slack computed without resource constraints is not real slack. And the critical path concept itself weakens: the binding constraint here is resource contention between A and B, which is not a path through the network at all.
Time: NP-hard; O(V^2) per schedule generation · Space: O(V + R·T)
RCPSP is NP-hard, and strongly so: it generalises job-shop scheduling and contains bin packing as a special case, so no polynomial algorithm is expected. A single pass of the serial schedule generation scheme is cheap, at O(V squared) in the worst case, since for each of V activities it may scan forward through time looking for a feasible start. Memory is the resource profile over the planning horizon, O(R times T) for R resources and T time periods, plus O(V) for the schedule. Practical solvers exploit the cheapness of one pass by generating thousands of schedules under randomised priority rules, or by embedding the scheme inside a genetic algorithm or tabu search. Exact branch-and-bound handles roughly 30 to 60 activities depending on how tight the resources are.
Which method fits depends on whether resources actually bind and how large the instance is.
| Alternative | Prefer it when | Cost |
|---|---|---|
| CPM | Resources are effectively unlimited. Linear time and gives exact float. | O(V + E) |
| PERT | Durations are uncertain but resources are not the constraint. | O(V + E) |
| Serial SGS with priority rules | The practical default. Fast, always feasible, and good with a well-chosen rule. | O(V^2) per pass |
| Branch and bound / constraint programming | Small instances, roughly under 60 activities, where a provable optimum is required. | exponential |
| Genetic algorithm or tabu search | Large instances where a good schedule matters more than a proven one. | tunable |
Related algorithms: Critical Path Method (CPM), PERT (Program Evaluation and Review Technique), Topological Sort