From e16bfbf6b4fae65aebe1c50c3d90128d49db929d Mon Sep 17 00:00:00 2001
From: Julien Calixte
Date: Mon, 4 Aug 2025 20:29:33 +0200
Subject: [PATCH] feat: adding min and max lead time in pull system article
---
src/modules/pull-system/PullSystemArticle.vue | 6 +++---
.../pull-system/feature/feature-board.ts | 10 ++++++----
.../simulation/SimulationDashboard.vue | 20 +++++++++++++++++++
.../simulation/simulation-store.ts | 18 ++++++++++++++++-
4 files changed, 46 insertions(+), 8 deletions(-)
diff --git a/src/modules/pull-system/PullSystemArticle.vue b/src/modules/pull-system/PullSystemArticle.vue
index 1cf8519..ddb3ee8 100644
--- a/src/modules/pull-system/PullSystemArticle.vue
+++ b/src/modules/pull-system/PullSystemArticle.vue
@@ -274,8 +274,8 @@ const createdAt = new Date('2025-01-08').toLocaleDateString(undefined, {
teams to overproduce. Product teams prepare extra features, designers
create unnecessary screens, and developers rush through coding. This
"just in case" mindset results in wasted effort and latent defects that
- require rework, slowing productivity. Worse, as there are always work to
- do in stock, we can just throw bad parts and move on a new piece,
+ require rework, slowing productivity. Worse, as there is always work to
+ do, we can just throw bad parts and move on a new piece from stock,
increasing bad quality.
@@ -285,7 +285,7 @@ const createdAt = new Date('2025-01-08').toLocaleDateString(undefined, {
rel="noopener noreferrer"
href="https://journals.aps.org/pre/abstract/10.1103/PhysRevE.96.052303#:~:text=The%20%E2%80%9Cfaster%2Dis%2Dslower,evacuation%20time%20can%20be%20achieved"
>slower is often faster. Excessive pushing slows down the system, while a
+ >. Excessive pushing slows down the system, while a
pull system enforces constraints that prioritize
thoughtful delivery.
diff --git a/src/modules/pull-system/feature/feature-board.ts b/src/modules/pull-system/feature/feature-board.ts
index c736323..7d3e238 100644
--- a/src/modules/pull-system/feature/feature-board.ts
+++ b/src/modules/pull-system/feature/feature-board.ts
@@ -84,14 +84,16 @@ export const newBacklog = (type: 'bird' | 'mobile-app', limit?: number) => {
export const initBoard = (
steps: FeatureStep[],
- features: Feature[]
+ features: Feature[],
+ fromStart = false
): Feature[] => {
const initialFeatures = popNElement(features, 10)
initialFeatures.forEach((feature) => {
- const step = pickRandomElement(steps)
- feature.status = pickRandomElement(['doing', 'done'])
- feature.step = step.stepIndex
+ feature.status = fromStart ? 'doing' : pickRandomElement(['doing', 'done'])
+ feature.step = fromStart
+ ? steps.length - 1
+ : pickRandomElement(steps).stepIndex
feature.qualityIssue = 0
feature.leadTime = 0
})
diff --git a/src/modules/pull-system/simulation/SimulationDashboard.vue b/src/modules/pull-system/simulation/SimulationDashboard.vue
index 1808ae6..6a08f59 100644
--- a/src/modules/pull-system/simulation/SimulationDashboard.vue
+++ b/src/modules/pull-system/simulation/SimulationDashboard.vue
@@ -51,6 +51,26 @@ const strategies: Strategy[] = ['push', 'pull']
{{ simulationStore.meanLeadTime(strategy) }}
+
+ | Min lead time |
+
+ {{
+ simulationStore.minLeadTime(strategy) === Infinity
+ ? '-'
+ : simulationStore.minLeadTime(strategy)
+ }}
+ |
+
+
+ | Max lead time |
+
+ {{
+ simulationStore.maxLeadTime(strategy) === 0
+ ? '-'
+ : simulationStore.maxLeadTime(strategy)
+ }}
+ |
+