Skip to content

Commit 115113b

Browse files
committed
fix tutorial
1 parent 9e4737b commit 115113b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/src/benchmarks/maintenance.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ The Maintenance problem with resource constraint is a sequential decision-making
77

88
### Overview
99

10-
In this benchmark, a system consists of $N$ identical components, each of which can degrade over $n$ discrete states. State $1$ means that the component is new, state $n$ means that the component is failed. At each time step, the agent can maintain up to $K$ components.
10+
In this benchmark, a system consists of ``N`` identical components, each of which can degrade over ``n`` discrete states. State ``1`` means that the component is new, state $n$ means that the component is failed. At each time step, the agent can maintain up to $K$ components.
1111

1212
This forms an endogenous multistage stochastic optimization problem, where the agent must plan maintenance actions over the horizon.
1313

1414
### Mathematical Formulation
1515

1616
The maintenance problem can be formulated as a finite-horizon Markov Decision Process (MDP) with the following components:
1717

18-
**State Space** $\mathcal{S}$: At time step $t$, the state $s_t \in [1:n]^N$ is the degradation state for each component.
18+
**State Space** ``\mathcal{S}``: At time step ``t``, the state ``s_t \in [1:n]^N`` is the degradation state for each component.
1919

20-
**Action Space** $\mathcal{A}$: The action at time $t$ is the set of components that are maintained at time $t$:
20+
**Action Space** ``\mathcal{A}``: The action at time ``t`` is the set of components that are maintained at time ``t``:
2121
```math
2222
a_t \subseteq \{1, 2, \ldots, N\} \text{ such that } |a_t| \leq K
2323
```
@@ -51,9 +51,9 @@ Here, \(p\) is the degradation probability, \(s_t^i\) is the current state of co
5151

5252
The immediate cost at time \(t\) is:
5353

54-
$$
54+
```math
5555
c(s_t, a_t) = \Big( c_m \cdot |a_t| + c_f \cdot \#\{ i : s_t^i = n \} \Big)
56-
$$
56+
```
5757

5858
Where:
5959

docs/src/tutorials/warcraft_tutorial.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The map is represented as a 2D image representing a 12x12 grid, each cell having
88

99
# First, let's load the package and create a benchmark object as follows:
1010
using DecisionFocusedLearningBenchmarks
11+
using Plots
1112
b = WarcraftBenchmark()
1213

1314
# ## Dataset generation
@@ -59,7 +60,6 @@ starting_gap = compute_gap(b, test_dataset, model, maximizer)
5960
# We can now train the model using the InferOpt.jl package:
6061
using InferOpt
6162
using Flux
62-
using Plots
6363

6464
perturbed_maximizer = PerturbedMultiplicative(maximizer; ε=0.2, nb_samples=100)
6565
loss = FenchelYoungLoss(perturbed_maximizer)

0 commit comments

Comments
 (0)