Incident Response Planning

Problem Statement

A complex system of internal and customer-facing services with many interdependencies should be brought back online as efficiently as possible after an outage.

Full example scenario

As a DevOps engineer, you are responsible for planning the recovery of a set of interconnected systems after a major outage, in order to prioritize critical systems and allocate recovery resources efficiently. Each system has dependencies on other systems that must finish recovering first, and some — the customer-facing ones — carry a priority score. To induce urgency, the value retained from bringing a customer-facing system back online decays the longer it stays down, following \(V(t) = V_0 \cdot e^{-0.0398 \cdot t}\), where \(V_0\) is the system’s priority score and \(t\) is its completion (recovery finish) time in minutes from the start of the incident.

  • Recovery starts at \(t=0\), and a system cannot begin its own recovery until every system it depends on has finished.

  • The on-call crew can recover at most 2 systems at once — one recovery per engineer, and once a system’s recovery starts it runs to completion without pausing.

  • Internal infrastructure systems carry no priority score and contribute nothing to the objective directly, but still take time to recover and can block other systems as dependencies.

  • The goal is to choose the start time of every system’s recovery so as to maximize the total retained value across all customer-facing systems.

  • The systems, their dependencies, priority scores, and recovery times can be found in incident_response_systems.json, with the fields System, Name, Priority, Dependencies, Recovery Time (minutes).

What an optimal solution looks like

Dependency graph — who has to finish before whom.

Arrows point from a prerequisite to the system it unblocks. Node color is the system's priority score V0.

S1 · Core Network S2 · Auth Database S3 · Cache Cluster S4 · User Database S6 · Billing Database S5 · Auth Service S14 · Admin Portal S12 · Recommendations V0 = 15 S7 · API Gateway S13 · Notifications V0 = 10 S8 · Checkout Service V0 = 40 S9 · Search Service V0 = 25 S11 · Mobile API V0 = 30 S10 · Web Storefront V0 = 60
Internal (V0=0) Low priority (10–15) Medium priority (25–30) High priority (40–60)

Engineer timeline — who recovers what, and when.

Gray blocks are internal infrastructure (zero customer value, but can still block others). Colored blocks are customer-facing systems, colored the same way as the dependency graph above.

Engineer 1
S1
S2
S5
S7
S8
S10
S12
Engineer 2
S3
S6
S4
S9
S11
S13
t=0t=10t=20t=30t=38

Built with Modeler

The problem above is stated as a single shot: you hand over the whole problem and get a model back. Modeler takes the other route — you start with the business question you actually have, and it works with you until the problem is pinned down, the data is in, the code runs, and the answer holds up when the problem changes.

The tabs below walk the same incident-recovery problem through that route, one Modeler capability at a time.

Instead of writing the whole prompt up front, you start with the business question you actually have. Modeler searches the knowledge base, asks one clarifying question at a time — always the most important one first — and tells you which parts of the model are still missing. The options it offers come from examples in the knowledge base and from how similar problems are usually modeled in your industry, so you can answer with a number instead of prose.

I’m on the DevOps/SRE team. When we have a major outage, we have a bunch of interconnected systems that need to be brought back online — some systems depend on others being restored first before they can start recovering. Some of these systems are customer-facing and have a priority/importance score; the sooner we bring an important one back online, the more value we retain, and that value decays the longer the system stays down. I want to figure out the best order and schedule for bringing everything back online to maximize the total value we retain. Can you help me build this as an optimization model?

This is a precedence-constrained scheduling problem with a time-decaying reward — recovery order matters, and the DAG of dependencies will drive most of the structure. Before anything else I need to know how much recovery work can happen at once, because that’s what decides whether this is even a scheduling problem with real choices, or just a critical-path calculation with one forced answer. Let me check the knowledge base for how similar problems are modeled before asking.

Great start. Here is the first clarifying question:

Question 1 of ~7: How many systems can be recovered in parallel at the same time?

In other words, do you have a fixed number of recovery teams or engineers that can each work on one system at a time, or is there only one team working through systems sequentially?

  1. Only 1 recovery team — systems are restored one at a time, in a strict sequence.

  2. A fixed number of teams (e.g., 2, 3, N) — up to N systems can be in recovery simultaneously.

  3. Unlimited parallelism — any number of systems can recover at the same time (subject only to dependency constraints).

  4. Resource-constrained parallelism — recovery requires shared resources (e.g., DBAs, network engineers) with limited capacity, and different systems may need different resource types.

Learn More:
• Scheduling | Gurobi ★★★

Let’s start with option 3 — unlimited parallelism, just as a first pass, so I can see what the dependency graph alone implies before we layer in the real crew limits. One more thing: only some of the systems are customer-facing and carry a priority score — the rest are internal infrastructure with no direct customer value, so they don’t count toward the objective, but they still have recovery times and can block other systems as dependencies.

That’s a deliberately simplified starting point on parallelism — worth revisiting once I can see what it implies — and it volunteers the internal-vs-customer-facing distinction, which fixes the shape of the objective (a sum over a subset of systems, not all of them). What’s still open is exactly how “value decays over time” should be modeled mathematically — that determines whether this is a linear program or something with a nonlinear or piecewise term, so it’s the next thing to pin down before writing anything.

Good. Now a critical design question about how value decays over time.

Question 2 of ~6: How does the retained value of a customer-facing system decrease the longer it stays down?

  1. Linear decay — value = priority_score − decay_rate × completion_time.

  2. Weighted completion time — value = priority_score × (1 / completion_time), equivalently minimizing the sum of priority-weighted completion times.

  3. Step / deadline-based — full value before a deadline, zero (or reduced) value after.

  4. Custom / piecewise — each system follows its own decay curve (e.g., exponential), defined per system.

The most natural fit for “maximize value retained, sooner is better” is option 2, but if you already have a specific curve in mind, option 4 lets you plug it in directly.

Option 4, but with a specific known formula rather than a generic curve: retained value follows V(t) = V0 * e^(-0.0398 * t), where V0 is the system’s priority score and t is its completion (recovery finish) time in minutes. This applies uniformly to every customer-facing system — it’s not a per-system custom curve, just the one exponential decay formula applied to each one’s own V0 and finish time. Recovery times per system are known and fixed (no uncertainty). I have the full list of systems, their priority scores, dependencies, and recovery times ready to share as a data file.

Also, please go ahead and share your data file whenever you are ready — I will incorporate it directly into the specification and use it as the basis for the test scenarios.

Modeler updates the specification after every answer, even while it is still incomplete — so you can always see what it has understood and what it is still waiting on.