Schematex

PERT / CPM Network

About PERT charts

A PERT chart (Program Evaluation and Review Technique) β€” and its near-twin CPM (Critical Path Method) β€” is the foundational project-scheduling diagram of modern project management. Born in 1959 (PERT from the US Navy Polaris program, CPM from DuPont), the two converged into the Activity-on-Node / Precedence Diagramming Method taught by PMI's PMBOK Guide. You write the tasks, their durations, and which task depends on which; the schedule β€” Early Start, Early Finish, Late Start, Late Finish, slack, and the critical path β€” is computed.

That last point is what makes Schematex's pert engine different from every drag-and-drop "PERT chart maker". Most tools ship a shape library and make you fill the six-field box and compute the critical path with a calculator. Schematex runs the forward pass and backward pass itself and highlights the critical path in red automatically. Distinct from flowchart (no scheduling), timeline (no critical-path math), and bpmn (an organisational process, not a one-off project schedule).

pertΒ·Β§ β€”
β†˜ preview
100%
PERT network β€” Q3 Product Launch 7 activities, project duration 37 days, critical path A β†’ C β†’ D β†’ E β†’ G. Q3 Product Launch ES 0 DUR 5 EF 5 0 LS 0 SLACK 5 LF Market research A ES 5 DUR 15 EF 20 5 LS 0 SLACK 20 LF Backend API C ES 5 DUR 8 EF 13 12 LS 7 SLACK 20 LF Design mockups B ES 20 DUR 10 EF 30 20 LS 0 SLACK 30 LF Frontend build D ES 13 DUR 7 EF 20 28 LS 15 SLACK 35 LF Marketing collateral F ES 30 DUR 5 EF 35 30 LS 0 SLACK 35 LF QA / testing E ES 35 DUR 2 EF 37 35 LS 0 SLACK 37 LF Launch event G Project duration 37 days Β· 7 tasks Β· 8 dependencies Β· 5 critical Critical path: A β†’ C β†’ D β†’ E β†’ G
UTF-8 Β· LF Β· 11 lines Β· 396 charsβœ“ parsedΒ·8.1 msΒ·18.0 KB SVG

1. Your first diagram

Every document starts with the pert keyword, an optional header, then one task line per activity:

pert
unit: days

task A "Market research" duration: 5
task B "Design mockups"  duration: 8 after: A
task C "Backend API"     duration: 15 after: A
task D "Frontend build"  duration: 10 after: B, C

Each task carries an <id>, a quoted <label>, a duration:, and an optional after: list of predecessors. The engine adds an invisible Start and Finish, runs the schedule, and draws the six-field activity box for every task. You never type ES/EF/LS/LF β€” they are computed.

The header accepts:

  • title: "…" β€” a heading drawn above the diagram.
  • unit: days | weeks | hours | abstract β€” the time unit (default days; purely a label, the engine is calendar-agnostic).
  • direction: LR | TB β€” left-to-right (default) or top-to-bottom.
  • layout: network | timescaled β€” the layered network (default) or a time-proportional view (Β§6).
  • critical-tolerance: <n> β€” slack ≀ this counts as critical (default 0; set 0.001 for three-point projects).
  • show-sentinels: true β€” draw the synthetic Start / Finish nodes (hidden by default).

2. The six-field activity box

Every task renders as the canonical 3Γ—2 PERT/CPM rectangle:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  ES      β”‚  Duration  β”‚   EF     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚         Task Name (ID)           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  LS      β”‚  Slack     β”‚   LF     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  • ES / EF β€” Early Start / Early Finish, from the forward pass.
  • LS / LF β€” Late Start / Late Finish, from the backward pass.
  • Slack (total float) = LS βˆ’ ES = LF βˆ’ EF. Zero slack means the activity is on the critical path.

Critical activities get a red border and a bold 0 slack; the project's critical chain reads as an unbroken red line. Every field is also mirrored onto data-* attributes (data-es, data-slack, data-critical, …) so you can query the SVG without re-running the math.

On the two-colour palette. A PERT chart is deliberately drawn in just two colours. Red for the critical path is a genuine industry convention β€” MS Project, Oracle Primavera P6, and PMBOK figures all use it, because "critical vs. not" is the one distinction the diagram exists to surface. Everything else stays a neutral house-blue. Adding more colours would imply categories that PERT's semantics don't have; if you need to group by team or phase, use swimlanes (lane:) instead of colour.


3. Dependencies (FS / SS / FF / SF + lag/lead)

after: takes a comma-separated list of predecessor references. The default relationship is Finish-to-Start (FS) β€” a task starts once its predecessor finishes:

task D "Frontend build" duration: 10 after: B, C

Modern scheduling needs the other three Precedence-Diagramming relationships and lag (delay) or lead (negative lag):

task B "Stakeholder interviews" duration: 6 after: A SS+1   # start 1d after A starts
task I "Documentation"          duration: 4 after: D+3      # FS with a 3-day lag
task J "Translation"            duration: 3 after: I SS-1   # start 1d before I starts (lead)
task K "Sign-off"               duration: 1 after: I FF     # finishes when I finishes
task L "Press release"          duration: 2 after: G SF+1   # start-to-finish (rare)
FormMeaning
after: AFinish-to-Start, no lag (the common case)
after: A+2 or after: A+2dFS with a 2-unit lag
after: A SS / A FF / A SFStart-to-Start / Finish-to-Finish / Start-to-Finish
after: A SS+2d / A FF-1dany type with lag (+) or lead (-)

A lag unit suffix (d / w / h) must match the diagram's unit: or be omitted; mixed units are rejected. FS with zero lag is unlabelled; SS/FF/SF always show their type on the edge.


4. Three-point (PERT) estimation

Write a duration as O/M/P (optimistic / most-likely / pessimistic) and the engine computes the beta-distribution expected duration te = (O + 4M + P) / 6 and the variance σ² = ((P βˆ’ O)/6)Β²:

pert
critical-tolerance: 0.01
task A "Spec"   duration: 2/3/5    # te = 3.17, σ² = 0.25
task B "Build"  duration: 5/8/14   after: A   # te = 8.50, σ² = 2.25
task C "Test"   duration: 3/4/6    after: B
task D "Deploy" duration: 1/2/3    after: C

The Duration field shows te; a small Οƒ=… annotation appears under the name; and the project-level standard deviation (√ of the summed critical-path variances) is reported in the footer. Use critical-tolerance: 0.01 so floating-point te values don't displace the visible critical path.


5. Milestones

A milestone is a zero-duration checkpoint, drawn as a diamond. Use the milestone flag or duration: 0:

task P "Cutover weekend" milestone after: O
task Q "Go-live"         duration: 0 after: P

6. Time-scaled layout

layout: timescaled switches from the layered network to a network-Gantt hybrid: each activity's x-position is proportional to its ES and its width is proportional to its duration, with a unit time axis along the bottom. Activities are packed into lanes so nothing overlaps.

pert
layout: timescaled
unit: days

task A "Inventory"     duration: 5
task B "Interviews"    duration: 6  after: A SS+1
task C "Design"        duration: 10 after: A, B
task D "Build"         duration: 15 after: C
task E "Pilot"         duration: 7  after: D

This is the network-flavoured time view; for a calendar Gantt chart with one row per task, use layout: gantt (next).

Gantt chart (gantt / layout: gantt)

Start a document with the gantt header (sugar for pert + layout: gantt) for a calendar Gantt. It is the same scheduler β€” so the bars are placed from the computed ES/EF, and the critical path is drawn in red, the thing a hand-placed Gantt (Mermaid) can't do: there you type the dates yourself, here you type dependencies and the engine schedules them.

gantt "Website Relaunch"
start: 2026-07-01
calendar: 5day
task A "Discovery"      duration: 5  lane: "Plan"
task B "Wireframes"     duration: 8  after: A   lane: "Design"
task C "Visual design"  duration: 6  after: B   lane: "Design"  progress: 40%
task D "Frontend build" duration: 12 after: C   lane: "Build"
task E "Backend API"    duration: 10 after: A   lane: "Build"
task F "Integration"    duration: 5  after: D, E lane: "Build"
task LAUNCH "Go live"   milestone    after: F   lane: "Build"
today: 2026-07-20
  • start: YYYY-MM-DD turns the axis into calendar dates (omit it for a numeric day-offset axis).
  • calendar: continuous (default) spans weekends; calendar: 5day excludes Sat/Sun from the timeline.
  • lane: "…" groups tasks into labelled sections; progress: 60% draws a completion overlay; milestone is a diamond; today: YYYY-MM-DD drops a marker line.
  • One row per task, in declaration order. Off-critical-path bars are drawn in the resting blue with their slack annotated; critical bars are red.

Activity-on-arrow (layout: aoa)

layout: aoa renders the older activity-on-arrow (ADM) notation you'll find in textbooks and on Investopedia: numbered event circles, activities as labelled arrows, and dotted dummy activities auto-inserted wherever an activity has two or more predecessors. You write the same activity-on-node DSL β€” Schematex builds the event graph and numbers the events for you.

pert
layout: aoa
unit: days

task A "create schedule" duration: 10
task B "buy hardware"    duration: 5
task C "programming"     duration: 20 after: A
task D "installation"    duration: 5  after: B
task E "conversion"      duration: 15 after: D
task F "test code"       duration: 20 after: C, E
task G "write manual"    duration: 15 after: E

AOA is a legacy notation (PMBOK 7 dropped it; AON is the modern standard) and it can only express finish-to-start logic β€” SS/FF/SF and lag/lead are flattened to FS with a warning. Use it for teaching, exam prep, or matching an existing textbook figure; use the default network (AON) layout for real scheduling.


7. Swimlanes, tags, classes, and comments

Add lane: "…" to any task and the network re-groups into horizontal swimlanes β€” by responsible team, phase, or owner β€” while still computing the schedule exactly as before:

task T1 "Support Account Deletion" duration: 3  lane: "Customer Account"
task T2 "Design a New Theme"        duration: 8  lane: "Shopping Site"
task T3 "Apply New Theme"           duration: 15 after: T2 lane: "Shopping Site"

Lanes appear in first-declared order, each as a banded row with a label gutter on the left. Swimlanes are a presentation of the same AON network, not a different layout mode β€” they activate automatically when any task declares a lane.

task X "External vendor work" duration: 10 after: A tags: vendor, external class: secondary
# this is a comment

tags: emit data-tag="…" on the node group and class: adds a CSS class for downstream theming. # and // start a comment to end of line.


8. Grammar (EBNF)

document    = "pert" NEWLINE header* task+
header      = "title:" quoted
            | "unit:" ("days" | "weeks" | "hours" | "abstract")
            | "direction:" ("LR" | "TB")
            | "layout:" ("network" | "timescaled" | "aoa")
            | "critical-tolerance:" number
            | "show-sentinels:" boolean

task        = "task" IDENT quoted "duration:" duration ("after:" reflist)? "milestone"? attrs?
            | "task" IDENT quoted "milestone" ("after:" reflist)? attrs?
duration    = number | number "/" number "/" number          ; deterministic or O/M/P
reflist     = ref ("," ref)*
ref         = IDENT (WS deptype)? laglead?
            | IDENT "+" number unit?                          ; attached FS lag sugar
deptype     = "FS" | "SS" | "FF" | "SF"
laglead     = ("+" | "-") number unit?
unit        = "d" | "w" | "h"
attrs       = ("tags:" idlist)? ("class:" IDENT)? ("lane:" quoted)?

9. Standard compliance

Schematex pert implements the Activity-on-Node / Precedence Diagramming Method per PMI PMBOK 7 and Moder, Phillips & Davis (1983), with the six-field box convention from Kerzner and Oracle Primavera P6. The forward/backward pass, total slack, critical path, all four PDM dependency types with lag/lead, and three-point estimation (te + variance) are computed exactly. The older Activity-on-Arrow notation is available as an opt-in legacy view (layout: aoa) for teaching and textbook parity. Out of scope for v0.1: resource leveling / RCPSP, Monte Carlo schedule-risk simulation, calendar-aware durations, and MS Project / Primavera import-export. See docs/reference/32-PERT-STANDARD.md for the full specification.


Ready-to-use scenarios from the examples gallery:

pertΒ·Β§ PMI PMBOK 7 + Moder 1983 (AON/PDM)
PERT network β€” Q3 Product Launch 7 activities, project duration 37 days, critical path A β†’ C β†’ D β†’ E β†’ G. Q3 Product Launch ES 0 DUR 5 EF 5 0 LS 0 SLACK 5 LF Market research A ES 5 DUR 15 EF 20 5 LS 0 SLACK 20 LF Backend API C ES 5 DUR 8 EF 13 12 LS 7 SLACK 20 LF Design mockups B ES 20 DUR 10 EF 30 20 LS 0 SLACK 30 LF Frontend build D ES 13 DUR 7 EF 20 28 LS 15 SLACK 35 LF Marketing collateral F ES 30 DUR 5 EF 35 30 LS 0 SLACK 35 LF QA / testing E ES 35 DUR 2 EF 37 35 LS 0 SLACK 37 LF Launch event G Project duration 37 days Β· 7 tasks Β· 8 dependencies Β· 5 critical Critical path: A β†’ C β†’ D β†’ E β†’ G
Q3 product launch PERT/CPM network
A seven-task product-launch schedule where the engine computes every Early/Late Start & Finish, total slack, and the critical path (A β†’ C β†’ D β†’ E β†’ G) automatically β€” the canonical activity-on-node network with the six-field box.
business & operations
pertΒ·Β§ PMI PMBOK 7 + Moder 1983 β€” Activity-on-Arrow (ADM, legacy)
PERT network β€” Software project (AOA) 10 activities, project duration 70 days, critical path A β†’ C β†’ F β†’ H β†’ J. Software project (AOA) create schedule 10 buy hardware 5 programming 20 installation 5 conversion 15 test code 20 write manual 15 test system 10 training 5 user test 10 1 2 3 4 5 6 7 8 9 10 11 12 13 Project duration 70 days Β· 10 tasks Β· 10 dependencies Β· 5 critical Critical path: A β†’ C β†’ F β†’ H β†’ J
Activity-on-arrow (AOA) network
The classic textbook PERT notation β€” numbered event circles, activities as labelled arrows, and dotted dummy activities auto-inserted at multi-predecessor merges. Written in the same activity-on-node DSL; Schematex builds and numbers the event graph.
education
pertΒ·Β§ PMI PMBOK 7 + Moder 1983 (AON/PDM)
PERT network β€” Online Shop Project 8 activities, project duration 40 days, critical path T2 β†’ T3 β†’ T4 β†’ T7 β†’ T8. Online Shop Project Customer Account Shopping Site Shopping Cart Testing ES 0 DUR 3 EF 3 27 LS 27 SLACK 30 LF Support Account Deletion T1 ES 0 DUR 8 EF 8 0 LS 0 SLACK 8 LF Design a New Theme T2 ES 8 DUR 15 EF 23 8 LS 0 SLACK 23 LF Apply New Theme to the Site T3 ES 23 DUR 7 EF 30 23 LS 0 SLACK 30 LF Improve Searching T4 ES 8 DUR 8 EF 16 16 LS 8 SLACK 24 LF Enhance Shopping Cart Functionality T5 ES 16 DUR 6 EF 22 24 LS 8 SLACK 30 LF Enhance Shopping Cart Checkout T6 ES 30 DUR 2 EF 32 30 LS 0 SLACK 32 LF Ready Testing Environment T7 ES 32 DUR 8 EF 40 32 LS 0 SLACK 40 LF Test Online Shop T8 Project duration 40 days Β· 8 tasks Β· 8 dependencies Β· 5 critical Critical path: T2 β†’ T3 β†’ T4 β†’ T7 β†’ T8
PERT swimlanes grouped by team
The same computed activity-on-node schedule, re-grouped into horizontal swimlanes by responsible team (Customer Account, Shopping Site, Shopping Cart, Testing) β€” the way Visual Paradigm and PMO templates present a project network.
business & operations
pertΒ·Β§ PMI PMBOK 7 β€” three-point (beta-PERT) estimation
PERT network β€” Three-point project 4 activities, project duration 17.83 days, critical path A β†’ B β†’ C β†’ D. Three-point project ES 0 DUR 3.17 EF 3.17 0 LS 0 SLACK 3.17 LF Spec A Οƒ=0.5 ES 3.17 DUR 8.5 EF 11.67 3.17 LS 0 SLACK 11.67 LF Build B Οƒ=1.5 ES 11.67 DUR 4.17 EF 15.83 11.67 LS 0 SLACK 15.83 LF Test C Οƒ=0.5 ES 15.83 DUR 2 EF 17.83 15.83 LS 0 SLACK 17.83 LF Deploy D Οƒ=0.33 Project duration 17.83 days Β· 4 tasks Β· 3 dependencies Β· 4 critical Β· Οƒ β‰ˆ 1.69 Critical path: A β†’ B β†’ C β†’ D
Three-point (PERT) estimation with variance
Durations written as optimistic/most-likely/pessimistic (O/M/P). The engine computes the beta-distribution expected duration te = (O+4M+P)/6 per activity, the per-task variance, and the project-level standard deviation along the critical path.
business & operations
pertΒ·Β§ PMI PMBOK 7 + Moder 1983 (AON/PDM)
PERT network β€” Data-centre migration 10 activities, project duration 52 days, critical path A β†’ C β†’ D β†’ F β†’ G β†’ H β†’ I β†’ J. Data-centre migration 0 5 10 15 20 25 30 35 40 45 50 Inventory systems A ES 0 EF 5 slack 0 Stakeholder review B ES 1 EF 7 slack 0 Vendor selection C ES 7 EF 15 slack 0 Architecture D ES 15 EF 25 slack 0 Procurement E ES 17 EF 29 slack 6 Code refactor F ES 25 EF 40 slack 0 Pilot env G ES 35 EF 40 slack 0 Pilot run H ES 40 EF 47 slack 0 Cutover @ 47 Hypercare J ES 47 EF 52 slack 0 SS+1d FS+2d FF Project duration 52 days Β· 10 tasks Β· 11 dependencies Β· 9 critical Critical path: A β†’ C β†’ D β†’ F β†’ G β†’ H β†’ I β†’ J
Time-scaled migration plan (network-Gantt)
A data-centre migration in the time-scaled layout β€” x-position proportional to Early Start, width proportional to duration, with a unit time axis. Exercises start-to-start and finish-to-finish dependencies, lag/lead, a milestone, and lane packing.
business & operations

Found this useful?

Schematex is free, fully open source, and zero-dependency. A star helps other developers discover it.