dlvt 2.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dlvt-2.0.1/.gitignore ADDED
@@ -0,0 +1,88 @@
1
+ # Python .gitignore
2
+ # Byte-compiled / optimized / DLL files
3
+ __pycache__/
4
+ *.py[cod]
5
+ *$py.class
6
+
7
+ # Distribution / packaging
8
+ .Python
9
+ build/
10
+ develop-eggs/
11
+ dist/
12
+ downloads/
13
+ eggs/
14
+ .eggs/
15
+ lib/
16
+ lib64/
17
+ parts/
18
+ sdist/
19
+ var/
20
+ wheels/
21
+ pip-wheel-metadata/
22
+ share/python-wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+ MANIFEST
27
+
28
+ # PyInstaller
29
+ *.manifest
30
+ *.spec
31
+
32
+ # Installer logs
33
+ pip-log.txt
34
+ pip-delete-this-directory.txt
35
+
36
+ # Unit test / coverage reports
37
+ htmlcov/
38
+ .tox/
39
+ .nox/
40
+ .coverage
41
+ .coverage.*
42
+ .cache
43
+ nosetests.xml
44
+ coverage.xml
45
+ *.cover
46
+ *.py,cover
47
+ .hypothesis/
48
+ .pytest_cache/
49
+
50
+ # Jupyter Notebook
51
+ .ipynb_checkpoints
52
+
53
+ # IPython
54
+ profile_default/
55
+ ipython_config.py
56
+
57
+ # Environments
58
+ .env
59
+ .venv
60
+ env/
61
+ venv/
62
+ ENV/
63
+ env.bak/
64
+ venv.bak/
65
+
66
+ # IDE
67
+ .idea/
68
+ .vscode/
69
+ *.swp
70
+ *.swo
71
+ *~
72
+
73
+ # OS
74
+ .DS_Store
75
+ .DS_Store?
76
+ ._*
77
+ .Spotlight-V100
78
+ .Trashes
79
+ ehthumbs.db
80
+ Thumbs.db
81
+
82
+ # Generated figures and outputs
83
+ figures/*.pdf
84
+ figures/*.png
85
+
86
+ # Distribution artifacts
87
+ dist/
88
+ *.whl
@@ -0,0 +1,125 @@
1
+ # Contributing to DLVT
2
+
3
+ Thank you for your interest in contributing to the Dynamic Leadership Vitality Theory project!
4
+
5
+ ## Code of Conduct
6
+
7
+ Be respectful and collaborative. We're building a scientific tool for everyone.
8
+
9
+ ## Getting Started
10
+
11
+ ### 1. Clone and Install
12
+
13
+ ```bash
14
+ git clone https://github.com/wbendinelli/dlvt.git
15
+ cd dlvt
16
+ pip install -e ".[dev]"
17
+ ```
18
+
19
+ ### 2. Create a Branch
20
+
21
+ ```bash
22
+ git checkout -b feature/your-feature-name
23
+ ```
24
+
25
+ ## Development Guidelines
26
+
27
+ ### Code Style
28
+
29
+ - Follow [PEP 8](https://www.python.org/dev/peps/pep-0008/)
30
+ - Use [Black](https://black.readthedocs.io/) for formatting:
31
+ ```bash
32
+ black dlvt/ scripts/
33
+ ```
34
+
35
+ ### Documentation
36
+
37
+ - All functions must have docstrings (NumPy style)
38
+ - Include parameter descriptions, return types, and examples
39
+ - Link to relevant paper equations/theorems
40
+
41
+ ### Testing
42
+
43
+ - Write unit tests for new functions
44
+ - Run tests before submitting:
45
+ ```bash
46
+ pytest
47
+ ```
48
+
49
+ ## Pull Request Process
50
+
51
+ 1. **Create a feature branch** with a descriptive name
52
+ 2. **Make your changes** with clear, atomic commits
53
+ 3. **Update documentation** if API changes
54
+ 4. **Test thoroughly** — especially on edge cases
55
+ 5. **Submit a pull request** with a clear description
56
+
57
+ ## Reporting Bugs
58
+
59
+ Create a GitHub issue with:
60
+ - **Title**: Clear, concise summary
61
+ - **Description**: What you observed vs. expected behavior
62
+ - **Steps to reproduce**: Minimal code example
63
+ - **Environment**: Python version, OS, installed versions
64
+
65
+ ## Suggesting Features
66
+
67
+ Open an issue with:
68
+ - **Title**: Feature request — [your idea]
69
+ - **Description**: What problem does it solve?
70
+ - **Example usage**: How would users interact with it?
71
+ - **Related work**: Any similar tools or papers
72
+
73
+ ## Paper References
74
+
75
+ When modifying model equations, always cite the relevant theorem/proposition:
76
+
77
+ ```python
78
+ def my_function():
79
+ """
80
+ Description.
81
+
82
+ References
83
+ ----------
84
+ Theorem 1 — [brief summary]
85
+ Proposition 2 — [brief summary]
86
+ """
87
+ ```
88
+
89
+ ## File Structure Guidelines
90
+
91
+ ```
92
+ dlvt/
93
+ ├── __init__.py # Public API exports
94
+ ├── model.py # Core ODE system (NEVER modify parameter defaults without discussion)
95
+ ├── analysis.py # Equilibrium, bifurcation analysis
96
+ └── figures.py # Publication figure generation
97
+
98
+ scripts/
99
+ ├── run_all_figures.py # Master script
100
+ ├── fig8_bifurcation_hysteresis.py # Extended analysis
101
+ ├── fig9_robustness.py
102
+ └── fig10_intervention_comparison.py
103
+ ```
104
+
105
+ ## Default Parameters
106
+
107
+ The parameter set in `dlvt.model.DEFAULT_PARAMS` is tied to the published paper results. **Do not modify without:**
108
+ 1. Updating the paper citation
109
+ 2. Regenerating all figures
110
+ 3. Notifying the author
111
+
112
+ ## Adding New Figures
113
+
114
+ 1. Create a function `figN(output_dir='figures/')` in `dlvt/figures.py` (for Figures 1–7)
115
+ 2. Or create a standalone script in `scripts/figN_*.py` (for Figures 8+)
116
+ 3. Add entry to `FIGURES` dict in `scripts/run_all_figures.py`
117
+ 4. Ensure output saved as `{output_dir}/figN_{name}.png` and `.pdf`
118
+
119
+ ## Questions?
120
+
121
+ Open a discussion on GitHub or contact the author.
122
+
123
+ ## License
124
+
125
+ All contributions are licensed under the MIT License (see LICENSE file).
dlvt-2.0.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 William Bendinelli
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
dlvt-2.0.1/PKG-INFO ADDED
@@ -0,0 +1,286 @@
1
+ Metadata-Version: 2.4
2
+ Name: dlvt
3
+ Version: 2.0.1
4
+ Summary: Dynamic Leadership Vitality Theory: A dynamical systems model of executive sustainability
5
+ Home-page: https://github.com/wbendinelli/dlvt
6
+ Author: William Bendinelli
7
+ Author-email: William Bendinelli <wbendinelli@gmail.com>
8
+ License-Expression: MIT
9
+ Project-URL: Homepage, https://github.com/wbendinelli/dlvt
10
+ Project-URL: Documentation, https://github.com/wbendinelli/dlvt#readme
11
+ Project-URL: Repository, https://github.com/wbendinelli/dlvt
12
+ Project-URL: Bug Tracker, https://github.com/wbendinelli/dlvt/issues
13
+ Project-URL: Paper, https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6455001
14
+ Project-URL: Changelog, https://github.com/wbendinelli/dlvt/blob/main/CHANGELOG.md
15
+ Keywords: dynamical-systems,leadership,executive,burnout,complexity,ode,bifurcation,computational-social-science,zombie-leader,vitality
16
+ Classifier: Development Status :: 4 - Beta
17
+ Classifier: Intended Audience :: Science/Research
18
+ Classifier: Intended Audience :: Education
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.8
22
+ Classifier: Programming Language :: Python :: 3.9
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Topic :: Scientific/Engineering
27
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
28
+ Classifier: Topic :: Scientific/Engineering :: Physics
29
+ Classifier: Topic :: Sociology
30
+ Requires-Python: >=3.8
31
+ Description-Content-Type: text/markdown
32
+ License-File: LICENSE
33
+ Requires-Dist: numpy>=1.24
34
+ Requires-Dist: scipy>=1.10
35
+ Requires-Dist: matplotlib>=3.7
36
+ Provides-Extra: dev
37
+ Requires-Dist: jupyter>=1.0; extra == "dev"
38
+ Requires-Dist: ipykernel>=6.0; extra == "dev"
39
+ Requires-Dist: pytest>=7.0; extra == "dev"
40
+ Requires-Dist: black>=22.0; extra == "dev"
41
+ Requires-Dist: build>=0.10; extra == "dev"
42
+ Requires-Dist: twine>=4.0; extra == "dev"
43
+ Dynamic: author
44
+ Dynamic: home-page
45
+ Dynamic: license-file
46
+ Dynamic: requires-python
47
+
48
+ # Dynamic Leadership Vitality Theory (DLVT) — Python Package
49
+
50
+ [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
51
+ [![Tests](https://img.shields.io/badge/tests-38%20passed-brightgreen.svg)](#running-the-tests)
52
+ [![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
53
+
54
+ **Author:** William Bendinelli
55
+ **Paper:** *Dynamic Leadership Vitality Theory: A Formal Model of the Zombie-Leader Equilibrium*
56
+ **Target Journal:** *The Leadership Quarterly* (2026)
57
+
58
+ ---
59
+
60
+ ## Overview
61
+
62
+ This package implements the **Dynamic Leadership Vitality Theory (DLVT)** model — a two-dimensional autonomous dynamical system that formalizes how leaders who accumulate career capital simultaneously generate the organizational complexity that drains the vitality they need to deploy it.
63
+
64
+ The model predicts a single robust attractor: a **zombie-leader equilibrium** at $(V^{*} \approx 4.7,\; C^{*} \approx 32)$ in which the leader retains authority and reputation but permanently lacks the energetic bandwidth for strategic work. The zombie equilibrium is globally asymptotically stable (proved via Bendixson–Dulac + Poincaré–Bendixson on a trapping rectangle).
65
+
66
+ **Three outcome regimes** emerge from the parameter space:
67
+
68
+ - **Sustainable** — the leader reaches equilibrium with $V^{*} > V_{\mathrm{strategic}}$
69
+ - **Zombie** — the leader converges to $V^{*} < V_{\mathrm{strategic}}$ (the default attractor)
70
+ - **Collapse-Prone** — unsustainable trajectory where burnout is inevitable
71
+
72
+ ## Quick Start
73
+
74
+ ### Installation
75
+
76
+ ```bash
77
+ git clone https://github.com/wbendinelli/dlvt.git
78
+ cd dlvt
79
+ pip install -e .
80
+ ```
81
+
82
+ **Requirements:** Python ≥ 3.8, NumPy ≥ 1.24, SciPy ≥ 1.10, Matplotlib ≥ 3.7
83
+
84
+ ### Basic Usage
85
+
86
+ ```python
87
+ from dlvt import make_params, simulate
88
+ from dlvt.analysis import find_interior_equilibria, carrying_capacity
89
+
90
+ # Create parameter set (defaults match Table 1 of the paper)
91
+ p = make_params()
92
+
93
+ # Simulate from initial state (V₀=8.0, C₀=5.0) over T=120 time units
94
+ t, V, C, O, I, G = simulate(p, V0=8.0, C0=5.0, T=120)
95
+ # V — vitality, C — career capital, O — complexity, I — impact, G — depletion ratio
96
+
97
+ # Find equilibria and classify stability
98
+ equilibria = find_interior_equilibria(p)
99
+ for eq in equilibria:
100
+ status = "stable" if eq['stable'] else "unstable"
101
+ print(f"V*={eq['V']:.2f}, C*={eq['C']:.2f} ({status})")
102
+
103
+ # Maximum sustainable career capital (Proposition 3)
104
+ C_max = carrying_capacity(p)
105
+ print(f"Carrying capacity: C*_max = {C_max:.2f}")
106
+ ```
107
+
108
+ ### Scenario Analysis
109
+
110
+ ```python
111
+ from dlvt import make_params, simulate
112
+ from dlvt.analysis import classify_regime
113
+
114
+ # What happens if we increase recovery support?
115
+ p_high_R = make_params(R=5.0)
116
+ regime = classify_regime(p_high_R)
117
+ print(f"Regime with R=5.0: {regime}")
118
+
119
+ # What if complexity coupling is halved?
120
+ p_low_beta = make_params(beta=0.125)
121
+ t, V, C, O, I, G = simulate(p_low_beta, V0=8.0, C0=5.0, T=200)
122
+ print(f"Final V={V[-1]:.2f}, C={C[-1]:.2f}")
123
+ ```
124
+
125
+ ## The Dynamical System
126
+
127
+ The DLVT model is governed by two coupled ODEs:
128
+
129
+ $$\frac{dV}{dt} = R \left(1 - \frac{V}{V_{\max}}\right) - \delta \cdot O^{\gamma} \cdot \frac{V}{V + \varepsilon}$$
130
+
131
+ $$\frac{dC}{dt} = \alpha \cdot I - \mu \cdot C$$
132
+
133
+ with derived quantities:
134
+
135
+ - **Organisational Complexity:** $O(t) = O_0 + \beta \cdot C(t)^{\eta}$
136
+ - **Leadership Impact:** $I(t) = C \cdot V \,/\, (1 + \phi \cdot O)$ — energy-gated effectiveness
137
+ - **Depletion Ratio:** $\Gamma(t) = \delta \cdot O^{\gamma} \,/\, R$ — net drain when $\Gamma > 1$
138
+
139
+ The first equation balances bounded vitality recovery against complexity-driven drain. The second models career capital accumulation through impact feedback minus depreciation. The smooth barrier $V/(V+\varepsilon)$ ensures positive invariance of the state space.
140
+
141
+ ## Parameter Table
142
+
143
+ All parameters from **Table 1** of the paper (baseline calibration, $C_0 = 5.0$):
144
+
145
+ | Symbol | Key | Default | Description |
146
+ |:------:|:---:|:-------:|:------------|
147
+ | $R$ | `R` | 3.0 | Vitality recovery rate |
148
+ | $V_{\max}$ | `Vmax` | 10.0 | Maximum vitality capacity |
149
+ | $\delta$ | `delta` | 0.02 | Energetic cost coefficient |
150
+ | $\gamma$ | `gamma` | 2.0 | Complexity exponent in drain |
151
+ | $O_0$ | `O0` | 1.0 | Baseline organisational complexity |
152
+ | $\beta$ | `beta` | 0.25 | Capital–complexity coupling |
153
+ | $\eta$ | `eta` | 1.0 | Capital scaling exponent |
154
+ | $\alpha$ | `alpha` | 0.1 | Capital accumulation rate |
155
+ | $\phi$ | `phi` | 0.15 | Complexity–impact suppression |
156
+ | $\mu$ | `mu` | 0.2 | Capital depreciation rate |
157
+ | $\varepsilon$ | `eps` | 0.1 | Smooth barrier regularisation |
158
+
159
+ ## Key Theoretical Results
160
+
161
+ **Theorem 1 (Finite-Time Depletion):** Under exogenous complexity growth that creates a persistent deficit ($\Gamma > 1$), vitality reaches the $\varepsilon$-neighborhood of zero in finite time.
162
+
163
+ **Theorem 2 (Global Asymptotic Stability):** The zombie equilibrium $(V^{*}, C^{*})$ is the unique interior attractor. Proved via Bendixson–Dulac (no closed orbits), trapping rectangle $[0, V_{\max}] \times [0, C_{\max}]$, and Poincaré–Bendixson.
164
+
165
+ **Lemma 2 (Scope Absorption):** $V^{*}(\beta) \equiv V^{*}_0$ for all $\beta$ in the structurally interior region; the invariant $\beta C^{*} \approx 8.008$ is preserved. Scope reduction alone does not raise equilibrium vitality.
166
+
167
+ **Proposition 3 (Carrying Capacity):** $C^{*}_{\max} = \left[\left(R/\delta\right)^{1/\gamma} - O_0\right]^{1/\eta} / \beta$
168
+
169
+ ## API Reference
170
+
171
+ ### `dlvt.model` — Core ODE System
172
+
173
+ ```python
174
+ from dlvt import make_params, simulate, complexity, impact
175
+ ```
176
+
177
+ | Function | Description |
178
+ |:---------|:------------|
179
+ | `make_params(**overrides)` | Create parameter dict with keyword overrides |
180
+ | `complexity(C, p)` | $O = O_0 + \beta C^{\eta}$ |
181
+ | `impact(V, C, O, p)` | $I = CV/(1 + \phi O)$ |
182
+ | `dlvt_system(t, y, p)` | ODE right-hand side for `scipy.integrate.solve_ivp` |
183
+ | `dlvt_exogenous(t, y, p, C_func)` | Variant with exogenous career capital path |
184
+ | `simulate(p, V0, C0, T, max_step)` | Integrate ODE; returns `(t, V, C, O, I, G)` |
185
+
186
+ ### `dlvt.analysis` — Equilibrium Theory & Stability
187
+
188
+ ```python
189
+ from dlvt.analysis import (
190
+ find_interior_equilibria, carrying_capacity,
191
+ jacobian_eigenvalues, is_zombie, classify_regime, regime_map
192
+ )
193
+ ```
194
+
195
+ | Function | Description |
196
+ |:---------|:------------|
197
+ | `find_interior_equilibria(p)` | Find all $(V^{*}, C^{*}) > 0$ fixed points |
198
+ | `carrying_capacity(p)` | Maximum sustainable capital $C^{*}_{\max}$ |
199
+ | `jacobian_eigenvalues(V, C, p)` | Eigenvalue structure and stability class |
200
+ | `is_zombie(V, p)` | Check $V^{*} < V_{\mathrm{strategic}}$ |
201
+ | `classify_regime(p)` | Returns `'sustainable'`, `'zombie'`, or `'collapse-prone'` |
202
+ | `regime_map(betas, deltas)` | $(\beta, \delta)$ regime classification grid |
203
+
204
+ ### `dlvt.figures` — Publication Figure Generation
205
+
206
+ ```python
207
+ from dlvt.figures import fig1, fig2, fig3, fig4, fig5, fig6, fig7
208
+
209
+ fig3(output_dir='figures/') # Phase portrait
210
+ ```
211
+
212
+ | Figure | Content |
213
+ |:-------|:--------|
214
+ | Fig 1 | Temporal evolution of $V(t)$, $C(t)$, $O(t)$, $\Gamma(t)$ |
215
+ | Fig 2 | Three outcome scenarios (sustainable, zombie, collapse) |
216
+ | Fig 3 | Phase portrait with nullclines and equilibria |
217
+ | Fig 4 | Bifurcation diagrams: $C^{*}$ and $V^{*}$ vs $\beta$, $R$ |
218
+ | Fig 5 | Impact comparison: DLVT vs Human Capital Theory (Becker) |
219
+ | Fig 6 | Carrying capacity heatmap $C^{*}_{\max}(\beta, R)$ |
220
+ | Fig 7 | Regime map in $(\beta, \delta)$ space |
221
+
222
+ ## Reproducing All Paper Figures
223
+
224
+ ```bash
225
+ python3 scripts/run_all_figures.py # All 10 figures (PDF + PNG)
226
+ python3 scripts/run_all_figures.py --fig 1-7 # Core only
227
+ python3 scripts/run_all_figures.py --fig 8-10 # Extended analysis only
228
+ ```
229
+
230
+ Extended figures (standalone scripts):
231
+
232
+ ```bash
233
+ python3 scripts/fig8_bifurcation_hysteresis.py # Hysteresis detection
234
+ python3 scripts/fig9_robustness.py # Structural robustness
235
+ python3 scripts/fig10_intervention_comparison.py # Recovery vs redesign
236
+ ```
237
+
238
+ ## Running the Tests
239
+
240
+ ```bash
241
+ pytest tests/ -q # 38 tests, all must pass
242
+ pytest tests/ -v --tb=short # verbose with tracebacks
243
+ ```
244
+
245
+ The test suite pins every numerical claim in the paper (equilibrium values, carrying capacity, scope-absorption invariant, eigenvalue signs, basin-of-attraction convergence) so that any code change that breaks paper–code consistency is caught immediately.
246
+
247
+ ## Project Structure
248
+
249
+ ```
250
+ dlvt/
251
+ ├── dlvt/ # Core package
252
+ │ ├── __init__.py # Public API exports
253
+ │ ├── model.py # ODE system, parameters, integration
254
+ │ ├── analysis.py # Equilibria, stability, bifurcation, regimes
255
+ │ └── figures.py # Publication figures 1–7
256
+ ├── tests/ # 38 pinning tests
257
+ │ ├── test_model.py # Model numerics, simulation, positive invariance
258
+ │ └── test_analysis.py # Equilibria, carrying capacity, regimes
259
+ ├── scripts/ # Figure generation (8–10) and robustness grid
260
+ ├── figures/ # Generated output (PDF + PNG)
261
+ ├── pyproject.toml # Package metadata and dependencies
262
+ ├── setup.py # Legacy installer
263
+ └── LICENSE # MIT
264
+ ```
265
+
266
+ ## Citation
267
+
268
+ ```bibtex
269
+ @article{bendinelli2026dlvt,
270
+ title = {Dynamic Leadership Vitality Theory:
271
+ A Formal Model of the Zombie-Leader Equilibrium},
272
+ author = {Bendinelli, William},
273
+ year = {2026},
274
+ note = {Manuscript submitted to The Leadership Quarterly}
275
+ }
276
+ ```
277
+
278
+ ## License
279
+
280
+ MIT License — see [LICENSE](LICENSE) for details.
281
+
282
+ Copyright 2026 William Bendinelli
283
+
284
+ ## Contributing
285
+
286
+ See [CONTRIBUTING.md](CONTRIBUTING.md). Issues, feature requests, and pull requests are welcome.
@@ -0,0 +1,178 @@
1
+ # Quick Start Guide — DLVT
2
+
3
+ Get started with the Dynamic Leadership Vitality Theory model in 5 minutes.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install -e .
9
+ ```
10
+
11
+ Or just install dependencies:
12
+
13
+ ```bash
14
+ pip install numpy scipy matplotlib
15
+ ```
16
+
17
+ ## 1. Run a Simulation
18
+
19
+ ```python
20
+ from dlvt import make_params, simulate
21
+ import matplotlib.pyplot as plt
22
+
23
+ # Create parameters (defaults from Table 1 of paper)
24
+ p = make_params()
25
+
26
+ # Simulate a leader's trajectory over 120 time units
27
+ t, V, C, O, I, G = simulate(p, V0=8.0, C0=0.5, T=120)
28
+
29
+ # Plot vitality and capital
30
+ fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(10, 6))
31
+ ax1.plot(t, V, 'b-', label='Vitality V(t)')
32
+ ax1.axhline(p['Vmax']/2, color='r', linestyle='--', alpha=0.5, label='Strategic threshold')
33
+ ax1.set_ylabel('V(t)')
34
+ ax1.legend()
35
+
36
+ ax2.plot(t, C, 'g-', label='Career Capital C(t)')
37
+ ax2.set_xlabel('Time')
38
+ ax2.set_ylabel('C(t)')
39
+ ax2.legend()
40
+
41
+ plt.tight_layout()
42
+ plt.show()
43
+ ```
44
+
45
+ ## 2. Find Equilibrium Points
46
+
47
+ ```python
48
+ from dlvt import make_params
49
+ from dlvt.analysis import find_interior_equilibria, carrying_capacity
50
+
51
+ p = make_params()
52
+
53
+ # Find all equilibria
54
+ equilibria = find_interior_equilibria(p)
55
+ print(f"Found {len(equilibria)} equilibrium point(s):")
56
+ for i, eq in enumerate(equilibria):
57
+ print(f" Eq {i+1}: V* = {eq['V']:.3f}, C* = {eq['C']:.3f}, stable = {eq['stable']}")
58
+
59
+ # Maximum sustainable capital
60
+ C_max = carrying_capacity(p)
61
+ print(f"\nCarrying capacity: C*_max = {C_max:.2f}")
62
+ ```
63
+
64
+ ## 3. Compare Parameters
65
+
66
+ ```python
67
+ from dlvt import make_params, simulate
68
+
69
+ # Default parameters
70
+ p_default = make_params()
71
+
72
+ # Higher capital-complexity coupling (more burden per unit capital)
73
+ p_high_beta = make_params(beta=0.5)
74
+
75
+ # Simulate both
76
+ t1, V1, C1, *_ = simulate(p_default, T=120)
77
+ t2, V2, C2, *_ = simulate(p_high_beta, T=120)
78
+
79
+ # Compare final vitality
80
+ print(f"Beta=0.25: V(120) = {V1[-1]:.2f}")
81
+ print(f"Beta=0.50: V(120) = {V2[-1]:.2f}")
82
+ ```
83
+
84
+ ## 4. Generate All Figures
85
+
86
+ ```bash
87
+ python3 scripts/run_all_figures.py
88
+ ```
89
+
90
+ Figures 1–10 are saved to `figures/` in both PNG and PDF formats.
91
+
92
+ Selective figures:
93
+
94
+ ```bash
95
+ # Core results only (Figures 1–7)
96
+ python3 scripts/run_all_figures.py --fig 1-7
97
+
98
+ # Extended analysis (Figures 8–10)
99
+ python3 scripts/run_all_figures.py --fig 8-10
100
+
101
+ # Specific figures
102
+ python3 scripts/run_all_figures.py --fig 1,3,5
103
+ ```
104
+
105
+ ## 5. Classify Leadership Regime
106
+
107
+ ```python
108
+ from dlvt import make_params
109
+ from dlvt.analysis import classify_regime, is_zombie
110
+
111
+ p = make_params()
112
+ regime = classify_regime(p)
113
+ print(f"Regime: {regime}") # 'sustainable', 'zombie', or 'collapse'
114
+
115
+ # Check if equilibrium is "zombie" (exhausted)
116
+ p_zombie = make_params(beta=0.8)
117
+ regime2 = classify_regime(p_zombie)
118
+ print(f"High-complexity regime: {regime2}")
119
+ ```
120
+
121
+ ## Key Concepts
122
+
123
+ | Symbol | Meaning |
124
+ |--------|---------|
125
+ | **V(t)** | Subjective vitality (energy available) — range [0, V_max] |
126
+ | **C(t)** | Career capital (skills, status, relational capital) |
127
+ | **O(t)** | Organisational complexity driven by capital growth |
128
+ | **I(t)** | Leadership impact (effectiveness) — suppressed by complexity |
129
+ | **Γ(t)** | Depletion ratio (Γ > 1 means net drain; Γ < 1 means recovery) |
130
+
131
+ ## Parameter Defaults (Table 1, Paper)
132
+
133
+ | Parameter | Value | Meaning |
134
+ |-----------|-------|---------|
135
+ | R | 3.0 | Vitality recovery rate |
136
+ | V_max | 10.0 | Maximum vitality capacity |
137
+ | δ | 0.02 | Energetic cost of complexity |
138
+ | γ | 2.0 | Complexity exponent in drain |
139
+ | O₀ | 1.0 | Baseline irreducible complexity |
140
+ | β | 0.25 | Capital-complexity coupling |
141
+ | η | 1.0 | Capital scaling exponent |
142
+ | α | 0.1 | Capital accumulation rate |
143
+ | φ | 0.15 | Impact suppression by complexity |
144
+ | μ | 0.2 | Capital depreciation rate |
145
+ | ε | 0.1 | Regularization (ε → 0 in theory) |
146
+
147
+ ## The Two-Equation System
148
+
149
+ The DLVT model integrates two dynamics:
150
+
151
+ ```
152
+ Recovery: dV/dt = R·(1 − V/Vmax)
153
+ Drain: dV/dt − δ·O^γ · V/(V + ε)
154
+
155
+ Capital: dC/dt = α·I − μ·C
156
+ where I = C·V / (1 + φ·O)
157
+ ```
158
+
159
+ **Recovery** is logistic (saturation). **Drain** is nonlinear in complexity. Capital accumulates through impact (which depends on energy) and decays naturally.
160
+
161
+ ## Three Outcome Regimes
162
+
163
+ 1. **Sustainable**: Equilibrium with high vitality and manageable capital
164
+ 2. **Zombie**: Chronic exhaustion at low vitality; capital still accumulates but impact is suppressed
165
+ 3. **Collapse**: No equilibrium; vitality crashes to zero
166
+
167
+ ## Next Steps
168
+
169
+ - Read `README.md` for full API reference
170
+ - Explore `notebooks/` for interactive examples
171
+ - See `CONTRIBUTING.md` for how to extend the model
172
+ - Consult the paper for theoretical details
173
+
174
+ ## Questions?
175
+
176
+ - Check existing GitHub issues
177
+ - Review docstrings: `help(dlvt.simulate)`
178
+ - Open a new issue with your question