|
1 | | - |
2 | | -**Python 3+**, current release: **1.0.0** build 2022-07-21 |
| 1 | +Release: **1.0.1** | build: **2024.08.26** | Python: **>=3.7** |
3 | 2 |
|
4 | 3 | # Python Lanchester's laws |
5 | 4 |
|
6 | | -**A Python module, a Jupyter notebook and a sample application for predicting the result of a battle using Lanchester differential equations. The module can predict the result with 3 different models: `linear law`, `square law` and `modernized model`. An example included in the repository allows you to predict the result using one of these 3 models and display the result and a plot with the progress of the battle over time. The module can be easily used in any Python application.** |
| 5 | +**A Python module, Jupyter notebook, and sample application for predicting the outcome of battles using Lanchester's differential equations. The module can forecast results using three different models: the `linear law`, the `square law`, and a `modernized model`. An example included in the repository demonstrates how to predict outcomes using any of these three models and display both the result and a plot showing the progress of the battle over time. The module can be easily integrated into any Python application.** |
7 | 6 |
|
8 | 7 | ## What are Lanchester's laws? |
| 8 | + |
9 | 9 | from: https://en.wikipedia.org/wiki/Lanchester%27s_laws |
10 | 10 | > Lanchester's laws are mathematical formulae for calculating the relative strengths of military forces. The Lanchester equations are differential equations describing the time dependence of two armies' strengths A and B as a function of time, with the function depending only on A and B. |
11 | 11 | In 1915 and 1916, during World War I, M. Osipov and Frederick Lanchester independently devised a series of differential equations to demonstrate the power relationships between opposing forces. Among these are what is known as Lanchester's linear law (for ancient combat) and Lanchester's square law (for modern combat with long-range weapons such as firearms). |
12 | 12 |
|
13 | | -**Screenshot from included example application:** |
| 13 | +**Screenshot from included example application** |
14 | 14 |
|
15 | 15 |  |
16 | 16 |
|
17 | | -## Repository contents: |
| 17 | +## Repository contents |
18 | 18 |
|
19 | | -- `lanchester.py` - Python module with functions that solve the Lanchester equations in time |
20 | | -- `app.py` - example application that uses the module |
21 | | -- `notebook.ipynb` - Jupyter notebook with an example of how it works in real-time |
| 19 | +- `lanchester.py` - A Python module containing functions that solve the Lanchester equations over time. |
| 20 | +- `app.py` - An example application demonstrating the use of the module. |
| 21 | +- `notebook.ipynb` - A Jupyter notebook showcasing an example of how the module works in real time. |
22 | 22 |
|
23 | 23 |
|
24 | | -### Example of use: |
| 24 | +### Example of Use |
25 | 25 |
|
26 | | -The module can predict the result using 3 different models: `linear law`, `square law` and `modernized model`. |
| 26 | +The module can predict outcomes using three different models: the `linear law`, the `square law`, and a `modernized model`. |
27 | 27 |
|
28 | 28 | **Required packages** |
29 | 29 |
|
@@ -145,13 +145,16 @@ plt.legend() |
145 | 145 | plt.show() |
146 | 146 | ``` |
147 | 147 |
|
148 | | -**Result:** |
| 148 | +**Result of the battle** |
149 | 149 |
|
150 | 150 |  |
151 | 151 |
|
152 | 152 |
|
153 | 153 | ## Changelog |
154 | | -**- 1.0.0** - published first release (2022-07-21) |
| 154 | + |
| 155 | +**1.0.0** - Initial release (2022-07-21) |
| 156 | + |
| 157 | +**1.0.1** - Updated documentation (2024-08-26) |
155 | 158 |
|
156 | 159 | --- |
157 | 160 | **Python Lanchester is free to use, but if you like it, you can support my work by buying me a coffee ;)** |
|
0 commit comments