Question Answering
Rust
English
optimization-ai999x
optimization
operations-research
linear-programming
integer-programming
network-optimization
queueing
inventory
scheduling
game-theory
mcda
linear-and-integer-programming
convex-and-nonlinear-optimisation
assignment
optimization-solver
step-by-step-solutions
homework-help
offline
zero-hallucination
python
ai999x
Eval Results (legacy)
Rust versions 1.6.5: desktop app and command line (Windows, Linux)
Browse files- .gitattributes +1 -0
- README.md +231 -15
- docs/optimization_ai999x_desktop_guide.html +70 -0
- docs/optimization_ai999x_desktop_guide.md +144 -0
- docs/optimization_ai999x_desktop_guide.pdf +3 -0
- figures/johnson-two-machine-gantt.svg +0 -1
- figures/lp-two-variable-graphical-region.svg +0 -1
- figures/shortest-path-graph.svg +0 -1
- figures/steepest-descent-step-iteration.svg +0 -1
- figures/transportation-problem-heatmap.svg +0 -1
- rust/SHA256SUMS +4 -0
- rust/ai999x-optimization-1.6.5-linux-x86_64.tar.gz +3 -0
- rust/ai999x-optimization-1.6.5-windows-x86_64.zip +3 -0
- rust/ai999x-optimization-cli-1.6.4-linux-x86_64.tar.gz +3 -0
- rust/ai999x-optimization-cli-1.6.4-windows-x86_64.zip +3 -0
.gitattributes
CHANGED
|
@@ -44,3 +44,4 @@ dist/optimization_ai999x-1.5.0-py3-none-any.whl filter=lfs diff=lfs merge=lfs -t
|
|
| 44 |
dist/optimization_ai999x-1.6.0-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
|
| 45 |
dist/optimization_ai999x-1.6.3-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
|
| 46 |
dist/optimization_ai999x-1.6.4-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 44 |
dist/optimization_ai999x-1.6.0-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
|
| 45 |
dist/optimization_ai999x-1.6.3-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
|
| 46 |
dist/optimization_ai999x-1.6.4-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
docs/optimization_ai999x_desktop_guide.pdf filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -47,17 +47,38 @@ model-index:
|
|
| 47 |
|
| 48 |
Optimization covers linear and integer programming, convex and nonlinear optimisation, assignment, transportation and shortest-route problems, scheduling, inventory, queueing, game theory and multi-criteria decisions: 73 calculations in 16 topics, each with its formula, its steps and its units, and a plain reason instead of a number when an input is missing or out of range. One compiled engine, four ways to use it: the desktop app, the command line, the browser and Python. Everything runs on your own computer, offline.
|
| 49 |
|
| 50 |
-
[ | [Windows](https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.4/ai999x-cli-1.6.4-windows-x86_64.zip) · [Linux](https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.4/ai999x-cli-1.6.4-linux-x86_64.tar.gz) |
|
| 58 |
-
| **Browser** (any device) | [Try it on the model page](https://www.ai999x.com/models/optimization-ai999x/#
|
| 59 |
| **Python** 3.10+ | `pip install optimization-ai999x`: on Windows and Linux (x86-64) `pip` installs the same compiled engine; on other systems (macOS, ARM) it installs a pure-Python build that gives the same answers |
|
| 60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
## Ask in words: 15 examples
|
| 62 |
|
| 63 |
Each question below was asked on this release; the comment under it is the line it printed.
|
|
@@ -171,21 +192,216 @@ print(a.outcome, a.values)
|
|
| 171 |
# SOLVED {'min_tour_length': 80.0, 'tour_example': [1, 3, 4, 2, 1]}
|
| 172 |
```
|
| 173 |
|
| 174 |
-
##
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 183 |
|
| 184 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
|
| 186 |
-
|
| 187 |
|
| 188 |
-
|
|
|
|
|
|
|
| 189 |
|
| 190 |
Every calculation, with its formula, a worked example and its figures: **[Optimization on ai999x.com](https://www.ai999x.com/models/optimization-ai999x/)**. Install guides for the app and the command line: [https://www.ai999x.com/desktop-cli/](https://www.ai999x.com/desktop-cli/).
|
| 191 |
|
|
|
|
| 47 |
|
| 48 |
Optimization covers linear and integer programming, convex and nonlinear optimisation, assignment, transportation and shortest-route problems, scheduling, inventory, queueing, game theory and multi-criteria decisions: 73 calculations in 16 topics, each with its formula, its steps and its units, and a plain reason instead of a number when an input is missing or out of range. One compiled engine, four ways to use it: the desktop app, the command line, the browser and Python. Everything runs on your own computer, offline.
|
| 49 |
|
| 50 |
+
[](https://www.ai999x.com/models/optimization-ai999x/)
|
| 51 |
|
| 52 |
## Four ways to use it
|
| 53 |
|
| 54 |
| | |
|
| 55 |
|---|---|
|
| 56 |
+
| **Desktop app** (Windows, Linux) | [Windows](https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.5/ai999x-optimization-1.6.5-windows-x86_64.zip) · [Linux](https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.5/ai999x-optimization-1.6.5-linux-x86_64.tar.gz) |
|
| 57 |
| **Command line** `optimization` (Windows, Linux) | [Windows](https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.4/ai999x-cli-1.6.4-windows-x86_64.zip) · [Linux](https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.4/ai999x-cli-1.6.4-linux-x86_64.tar.gz) |
|
| 58 |
+
| **Browser** (any device) | [Try it on the model page](https://www.ai999x.com/models/optimization-ai999x/#capabilities) |
|
| 59 |
| **Python** 3.10+ | `pip install optimization-ai999x`: on Windows and Linux (x86-64) `pip` installs the same compiled engine; on other systems (macOS, ARM) it installs a pure-Python build that gives the same answers |
|
| 60 |
|
| 61 |
+
## See it
|
| 62 |
+
|
| 63 |
+
From the Optimization desktop app: every scene and chart is drawn from the computed answer.
|
| 64 |
+
|
| 65 |
+
[](https://www.ai999x.com/?ax_shot=optimization-ai999x/clip.mp4)
|
| 66 |
+
|
| 67 |
+
*[Watch the full clip (MP4)](https://www.ai999x.com/?ax_shot=optimization-ai999x/clip.mp4)*
|
| 68 |
+
|
| 69 |
+
| | |
|
| 70 |
+
|---|---|
|
| 71 |
+
| [](https://www.ai999x.com/models/optimization-ai999x/#cap-transportation_problem)<br>Transportation problem (minimum shipping cost) | [](https://www.ai999x.com/models/optimization-ai999x/#cap-eoq)<br>Economic order quantity (EOQ) |
|
| 72 |
+
| [](https://www.ai999x.com/models/optimization-ai999x/#cap-ahp_consistency_ratio)<br>AHP consistency ratio | [](https://www.ai999x.com/models/optimization-ai999x/#cap-pure_nash_equilibria)<br>Pure-strategy Nash equilibria of a bimatrix game |
|
| 73 |
+
| [](https://www.ai999x.com/models/optimization-ai999x/#cap-can_min_surface)<br>Closed cylinder of least surface area for a given volume | [](https://www.ai999x.com/models/optimization-ai999x/#cap-break_even_point)<br>Break-even quantity |
|
| 74 |
+
| [](https://www.ai999x.com/models/optimization-ai999x/#cap-mdp_discounted)<br>Discounted Markov decision process (optimal values and policy) | [](https://www.ai999x.com/models/optimization-ai999x/#cap-knapsack_01)<br>0/1 knapsack problem |
|
| 75 |
+
|
| 76 |
+
Charts:
|
| 77 |
+
|
| 78 |
+
| | | | |
|
| 79 |
+
|---|---|---|---|
|
| 80 |
+
| [](https://www.ai999x.com/models/optimization-ai999x/#cap-transportation_problem)<br>Transportation problem (minimum shipping cost) | [](https://www.ai999x.com/models/optimization-ai999x/#cap-eoq)<br>Economic order quantity (EOQ) | [](https://www.ai999x.com/models/optimization-ai999x/#cap-can_min_surface)<br>Closed cylinder of least surface area for a given volume | [](https://www.ai999x.com/models/optimization-ai999x/#cap-break_even_point)<br>Break-even quantity |
|
| 81 |
+
|
| 82 |
## Ask in words: 15 examples
|
| 83 |
|
| 84 |
Each question below was asked on this release; the comment under it is the line it printed.
|
|
|
|
| 192 |
# SOLVED {'min_tour_length': 80.0, 'tour_example': [1, 3, 4, 2, 1]}
|
| 193 |
```
|
| 194 |
|
| 195 |
+
## Command line: 15 examples
|
| 196 |
+
|
| 197 |
+
Each command below was run with `optimization` of this release; the lines under it are the answer it printed (the full answer goes on with the method, every input in SI units and the conditions it assumes).
|
| 198 |
+
|
| 199 |
+
```text
|
| 200 |
+
$ optimization solve polynomial_extrema_interval "coefficients=[1, -3, 0, 2]" lo=-1 hi=3
|
| 201 |
+
min_value = -2
|
| 202 |
+
max_value = 2
|
| 203 |
+
argmin_example = -1
|
| 204 |
+
argmax_example = 0
|
| 205 |
+
|
| 206 |
+
$ optimization solve break_even_point F_=5000 p=25 v=15
|
| 207 |
+
quantity = 500
|
| 208 |
+
revenue = 12500
|
| 209 |
+
contribution_margin = 10
|
| 210 |
+
|
| 211 |
+
$ optimization solve mdp_discounted "R=[[1, 0], [0, 2]]" "T=[[1, 0], [0, 1], [0, 1], [1, 0]]" gamma=0.9
|
| 212 |
+
value_state_1 = 10
|
| 213 |
+
values = [10.0,11.0]
|
| 214 |
+
policy = [1.0,2.0]
|
| 215 |
+
|
| 216 |
+
$ optimization solve profit_max_linear_demand a=100 b=2 F_=300 cv=20
|
| 217 |
+
quantity = 20
|
| 218 |
+
price = 60
|
| 219 |
+
profit = 500
|
| 220 |
+
|
| 221 |
+
$ optimization solve zero_sum_2x2 "A=[[3, -1], [-2, 4]]"
|
| 222 |
+
value = 1
|
| 223 |
+
p_row1 = 0.6
|
| 224 |
+
q_col1 = 0.5
|
| 225 |
+
saddle_point = no
|
| 226 |
+
|
| 227 |
+
$ optimization solve knapsack_01 "values=[60, 100, 120]" "weights=[10, 20, 30]" capacity=50
|
| 228 |
+
max_value = 220
|
| 229 |
+
items_example = [2,3]
|
| 230 |
+
total_weight = 50
|
| 231 |
+
|
| 232 |
+
$ optimization solve eoq D=1200 S=50 H=3
|
| 233 |
+
Q = 200
|
| 234 |
+
total_cost = 600
|
| 235 |
+
orders_per_period = 6
|
| 236 |
+
cycle_time = 0.1666666667
|
| 237 |
+
|
| 238 |
+
$ optimization solve linear_program sense=maximize "c=[3, 5]" "A=[[1, 0], [0, 2], [3, 2]]" "b=[4, 12, 18]" "relations=<=,<=,<="
|
| 239 |
+
optimal_value = 36
|
| 240 |
+
x = [2.0,6.0]
|
| 241 |
+
solution_unique = yes
|
| 242 |
+
shadow_prices = [0.0,1.5,1.0]
|
| 243 |
+
|
| 244 |
+
$ optimization solve ahp_consistency_ratio "judgments=[2, 4, 2]"
|
| 245 |
+
CR = 0
|
| 246 |
+
CI = 0
|
| 247 |
+
lambda_max = 3
|
| 248 |
+
weights = [0.5714285714285714,0.2857142857142857,0.14285714285714285]
|
| 249 |
+
acceptable = yes
|
| 250 |
+
|
| 251 |
+
$ optimization solve all_pairs_shortest_paths "edges=A-B 3, B-C 4, A-C 9, C-D 2" directed=false
|
| 252 |
+
nodes = ["A","B","C","D"]
|
| 253 |
+
distances = [[0.0,3.0,7.0,9.0],[3.0,0.0,4.0,6.0],[7.0,4.0,0.0,2.0],[9.0,6.0,2.0,0.0]]
|
| 254 |
+
diameter = 9
|
| 255 |
+
|
| 256 |
+
$ optimization solve equality_constrained_qp "Q=2 0; 0 2" "c=0, 0" "A=1 1" b=2
|
| 257 |
+
f_min = 2
|
| 258 |
+
x_star = [1.0,1.0]
|
| 259 |
+
multipliers = [-2.0]
|
| 260 |
+
|
| 261 |
+
$ optimization solve critical_path_method "durations=[3, 4, 2, 5]" "precedences=A-B, A-C, B-D, C-D"
|
| 262 |
+
project_duration = 12
|
| 263 |
+
critical_activities = ["A","B","D"]
|
| 264 |
+
slack = [0.0,0.0,2.0,0.0]
|
| 265 |
+
earliest_start = [0.0,3.0,3.0,7.0]
|
| 266 |
+
latest_start = [0.0,3.0,5.0,7.0]
|
| 267 |
+
|
| 268 |
+
$ optimization solve erlang_b A=3 c=5
|
| 269 |
+
blocking_probability = 0.1100543478
|
| 270 |
+
carried_traffic = 2.669836957
|
| 271 |
+
lost_traffic = 0.3301630435
|
| 272 |
+
|
| 273 |
+
$ optimization solve littlewood_protection p1=400 p2=150 mu=60 sigma=20
|
| 274 |
+
protection_level = 66.37278728
|
| 275 |
+
z = 0.318639364
|
| 276 |
+
|
| 277 |
+
$ optimization solve edd_max_lateness "p=[2, 4, 1, 3]" "d=[5, 6, 3, 9]"
|
| 278 |
+
sequence = [3,1,2,4]
|
| 279 |
+
max_lateness = 1
|
| 280 |
+
max_tardiness = 1
|
| 281 |
+
tardy_jobs_in_sequence = 2
|
| 282 |
+
```
|
| 283 |
|
| 284 |
+
## Rust library: 15 examples
|
| 285 |
+
|
| 286 |
+
The crate `optimization-ai999x` (in `rust/` of the GitHub repository) answers a JSON request with `optimization_ai999x::solve_json`. Each call below was compiled and run on this release; the comment under it is what it printed. The whole program is `rust/optimization/examples/readme.rs`: `cd rust && cargo run --release --example readme -p optimization-ai999x`.
|
| 287 |
+
|
| 288 |
+
```rust
|
| 289 |
+
use serde_json::{json, Value};
|
| 290 |
+
|
| 291 |
+
fn show(request: Value) {
|
| 292 |
+
let answer: Value = serde_json::from_str(&optimization_ai999x::solve_json(&request.to_string())).unwrap();
|
| 293 |
+
println!("{}", answer["outcome"].as_str().unwrap_or(""));
|
| 294 |
+
for v in answer["values"].as_array().into_iter().flatten() {
|
| 295 |
+
let unit = v[2].as_str().unwrap_or("");
|
| 296 |
+
let unit = if unit.is_empty() || unit == "1" { String::new() } else { format!(" {unit}") };
|
| 297 |
+
println!("{} = {}{}", v[0].as_str().unwrap_or(""), v[1], unit);
|
| 298 |
+
}
|
| 299 |
+
}
|
| 300 |
+
|
| 301 |
+
show(json!({"key": "polynomial_extrema_interval", "inputs": {"coefficients": [1, -3, 0, 2], "lo": "-1", "hi": "3"}}));
|
| 302 |
+
// SOLVED
|
| 303 |
+
// min_value = -2.0
|
| 304 |
+
// max_value = 2.0
|
| 305 |
+
// argmin_example = -1.0
|
| 306 |
+
// argmax_example = 0.0
|
| 307 |
+
|
| 308 |
+
show(json!({"key": "break_even_point", "inputs": {"F_": "5000", "p": "25", "v": "15"}}));
|
| 309 |
+
// SOLVED
|
| 310 |
+
// quantity = 500.0
|
| 311 |
+
// revenue = 12500.0
|
| 312 |
+
// contribution_margin = 10.0
|
| 313 |
+
|
| 314 |
+
show(json!({"key": "mdp_discounted", "inputs": {"R": [[1, 0], [0, 2]], "T": [[1, 0], [0, 1], [0, 1], [1, 0]], "gamma": "0.9"}}));
|
| 315 |
+
// SOLVED
|
| 316 |
+
// value_state_1 = 10.0
|
| 317 |
+
// values = [10.0,11.0]
|
| 318 |
+
// policy = [1.0,2.0]
|
| 319 |
+
|
| 320 |
+
show(json!({"key": "profit_max_linear_demand", "inputs": {"a": "100", "b": "2", "F_": "300", "cv": "20"}}));
|
| 321 |
+
// SOLVED
|
| 322 |
+
// quantity = 20.0
|
| 323 |
+
// price = 60.0
|
| 324 |
+
// profit = 500.0
|
| 325 |
+
|
| 326 |
+
show(json!({"key": "zero_sum_2x2", "inputs": {"A": [[3, -1], [-2, 4]]}}));
|
| 327 |
+
// SOLVED
|
| 328 |
+
// value = 1.0
|
| 329 |
+
// p_row1 = 0.6
|
| 330 |
+
// q_col1 = 0.5
|
| 331 |
+
// saddle_point = "no"
|
| 332 |
+
|
| 333 |
+
show(json!({"key": "knapsack_01", "inputs": {"values": [60, 100, 120], "weights": [10, 20, 30], "capacity": "50"}}));
|
| 334 |
+
// SOLVED
|
| 335 |
+
// max_value = 220.0
|
| 336 |
+
// items_example = [2,3]
|
| 337 |
+
// total_weight = 50.0
|
| 338 |
+
|
| 339 |
+
show(json!({"key": "eoq", "inputs": {"D": "1200", "S": "50", "H": "3"}}));
|
| 340 |
+
// SOLVED
|
| 341 |
+
// Q = 200.0
|
| 342 |
+
// total_cost = 600.0
|
| 343 |
+
// orders_per_period = 6.0
|
| 344 |
+
// cycle_time = 0.16666666666666666
|
| 345 |
+
|
| 346 |
+
show(json!({"key": "linear_program", "inputs": {"sense": "maximize", "c": [3, 5], "A": [[1, 0], [0, 2], [3, 2]], "b": [4, 12, 18], "relations": "<=,<=,<="}}));
|
| 347 |
+
// SOLVED
|
| 348 |
+
// optimal_value = 36.0
|
| 349 |
+
// x = [2.0,6.0]
|
| 350 |
+
// solution_unique = "yes"
|
| 351 |
+
// shadow_prices = [0.0,1.5,1.0]
|
| 352 |
+
|
| 353 |
+
show(json!({"key": "ahp_consistency_ratio", "inputs": {"judgments": [2, 4, 2]}}));
|
| 354 |
+
// SOLVED
|
| 355 |
+
// CR = 0.0
|
| 356 |
+
// CI = 0.0
|
| 357 |
+
// lambda_max = 3.0
|
| 358 |
+
// weights = [0.5714285714285714,0.2857142857142857,0.14285714285714285]
|
| 359 |
+
// acceptable = "yes"
|
| 360 |
+
|
| 361 |
+
show(json!({"key": "all_pairs_shortest_paths", "inputs": {"edges": "A-B 3, B-C 4, A-C 9, C-D 2", "directed": "false"}}));
|
| 362 |
+
// SOLVED
|
| 363 |
+
// nodes = ["A","B","C","D"]
|
| 364 |
+
// distances = [[0.0,3.0,7.0,9.0],[3.0,0.0,4.0,6.0],[7.0,4.0,0.0,2.0],[9.0,6.0,2.0,0.0]]
|
| 365 |
+
// diameter = 9.0
|
| 366 |
+
|
| 367 |
+
show(json!({"key": "equality_constrained_qp", "inputs": {"Q": "2 0; 0 2", "c": "0, 0", "A": "1 1", "b": "2"}}));
|
| 368 |
+
// SOLVED
|
| 369 |
+
// f_min = 2.0
|
| 370 |
+
// x_star = [1.0,1.0]
|
| 371 |
+
// multipliers = [-2.0]
|
| 372 |
+
|
| 373 |
+
show(json!({"key": "critical_path_method", "inputs": {"durations": [3, 4, 2, 5], "precedences": "A-B, A-C, B-D, C-D"}}));
|
| 374 |
+
// SOLVED
|
| 375 |
+
// project_duration = 12.0
|
| 376 |
+
// critical_activities = ["A","B","D"]
|
| 377 |
+
// slack = [0.0,0.0,2.0,0.0]
|
| 378 |
+
// earliest_start = [0.0,3.0,3.0,7.0]
|
| 379 |
+
// latest_start = [0.0,3.0,5.0,7.0]
|
| 380 |
+
|
| 381 |
+
show(json!({"key": "erlang_b", "inputs": {"A": "3", "c": "5"}}));
|
| 382 |
+
// SOLVED
|
| 383 |
+
// blocking_probability = 0.11005434782608696
|
| 384 |
+
// carried_traffic = 2.6698369565217392
|
| 385 |
+
// lost_traffic = 0.33016304347826086
|
| 386 |
+
|
| 387 |
+
show(json!({"key": "littlewood_protection", "inputs": {"p1": "400", "p2": "150", "mu": "60", "sigma": "20"}}));
|
| 388 |
+
// SOLVED
|
| 389 |
+
// protection_level = 66.37278727928751
|
| 390 |
+
// z = 0.31863936396437514
|
| 391 |
+
|
| 392 |
+
show(json!({"key": "edd_max_lateness", "inputs": {"p": [2, 4, 1, 3], "d": [5, 6, 3, 9]}}));
|
| 393 |
+
// SOLVED
|
| 394 |
+
// sequence = [3,1,2,4]
|
| 395 |
+
// max_lateness = 1.0
|
| 396 |
+
// max_tardiness = 1.0
|
| 397 |
+
// tardy_jobs_in_sequence = 2.0
|
| 398 |
+
```
|
| 399 |
|
| 400 |
+
## Guides
|
| 401 |
|
| 402 |
+
- Desktop app guide: the window, every calculation, scenes and charts: [PDF](https://huggingface.co/AI999X/optimization-ai999x/blob/main/docs/optimization_ai999x_desktop_guide.pdf) · [HTML](https://huggingface.co/AI999X/optimization-ai999x/blob/main/docs/optimization_ai999x_desktop_guide.html) · [Markdown](https://huggingface.co/AI999X/optimization-ai999x/blob/main/docs/optimization_ai999x_desktop_guide.md)
|
| 403 |
+
- Python guide: every calculation with a Python example: [PDF](https://huggingface.co/AI999X/optimization-ai999x/blob/main/docs/optimization_ai999x_capabilities.pdf) · [HTML](https://huggingface.co/AI999X/optimization-ai999x/blob/main/docs/optimization_ai999x_capabilities.html) · [Markdown](https://huggingface.co/AI999X/optimization-ai999x/blob/main/docs/optimization_ai999x_capabilities.md)
|
| 404 |
+
- Command-line guide: every calculation with the command and what it printed: [PDF](https://huggingface.co/AI999X/optimization-ai999x/blob/main/docs/optimization_ai999x_rust_guide.pdf) · [HTML](https://huggingface.co/AI999X/optimization-ai999x/blob/main/docs/optimization_ai999x_rust_guide.html) · [Markdown](https://huggingface.co/AI999X/optimization-ai999x/blob/main/docs/optimization_ai999x_rust_guide.md)
|
| 405 |
|
| 406 |
Every calculation, with its formula, a worked example and its figures: **[Optimization on ai999x.com](https://www.ai999x.com/models/optimization-ai999x/)**. Install guides for the app and the command line: [https://www.ai999x.com/desktop-cli/](https://www.ai999x.com/desktop-cli/).
|
| 407 |
|
docs/optimization_ai999x_desktop_guide.html
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!doctype html><html><head><meta charset="utf-8"><title>Optimization: desktop app user guide</title>
|
| 2 |
+
<script>window.MathJax={tex:{inlineMath:[['$','$']],displayMath:[['\\[','\\]']]},svg:{fontCache:'global'}};</script>
|
| 3 |
+
<script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-svg.js"></script>
|
| 4 |
+
<style>
|
| 5 |
+
@page{size:A4;margin:16mm 15mm}
|
| 6 |
+
body{font-family:"Segoe UI",Arial,sans-serif;font-size:10.5pt;line-height:1.45;color:#1b1f24;max-width:880px;margin:auto}
|
| 7 |
+
h1{font-size:22pt;border-bottom:2px solid #2b5c8a;padding-bottom:4px;margin-top:28px;page-break-before:always}
|
| 8 |
+
h1:first-of-type{page-break-before:avoid}
|
| 9 |
+
h2{font-size:15pt;color:#2b5c8a;margin-top:22px;page-break-after:avoid}
|
| 10 |
+
h3{font-size:12pt;margin-top:16px;page-break-after:avoid}
|
| 11 |
+
pre{background:#f4f6f8;border:1px solid #dde3e8;border-radius:4px;padding:8px 10px;font-size:8.8pt;white-space:pre-wrap;page-break-inside:avoid}
|
| 12 |
+
code{font-family:Consolas,monospace;font-size:9pt;background:#f4f6f8;padding:0 2px}
|
| 13 |
+
pre code{background:none;padding:0}
|
| 14 |
+
table{border-collapse:collapse;margin:8px 0;font-size:9pt;width:100%;page-break-inside:auto}
|
| 15 |
+
th,td{border:1px solid #cfd6dd;padding:3px 6px;vertical-align:top;text-align:left}
|
| 16 |
+
th{background:#eaf0f5}
|
| 17 |
+
.math{margin:6px 0;overflow-x:auto}
|
| 18 |
+
.badge{display:inline-block;color:#fff;border-radius:3px;padding:0 5px;font-size:8.5pt;white-space:nowrap}
|
| 19 |
+
figure{margin:10px 0;text-align:center;page-break-inside:avoid}figure img{max-width:88%}.svgfig svg{max-width:88%;height:auto}
|
| 20 |
+
figcaption{font-size:9pt;color:#555}
|
| 21 |
+
.pb{page-break-after:always}
|
| 22 |
+
</style></head><body>
|
| 23 |
+
<h1>Optimization: the desktop app, user guide</h1>
|
| 24 |
+
<p><strong>Optimization</strong>, desktop app 1.6.5 for Windows and Linux. <strong>Creator / engineer:</strong> Ibnul Jaif Farabi · <strong>Company:</strong> AI999X · support@ai999x.com</p>
|
| 25 |
+
<p>Optimization covers linear and integer programming, convex and nonlinear optimisation, assignment, transportation and shortest-route problems, scheduling, inventory, queueing, game theory and multi-criteria decisions. Its desktop app holds all 73 calculations in 16 topics: pick one, change its inputs and the answer, a live scene and charts follow at once. It runs on your own computer with no network connection and nothing else to install. The pictures in this guide were taken in this app.</p>
|
| 26 |
+
<h2>Contents</h2>
|
| 27 |
+
<ul><li>1. Get it and start it</li><li>2. The window</li><li>3. Compute a calculation</li><li>4. Ask in words</li><li>5. The live scene and the charts</li><li>6. Light and dark</li><li>7. Every calculation</li><li>8. Other ways to use it</li></ul>
|
| 28 |
+
<h2>1. Get it and start it</h2>
|
| 29 |
+
<table><thead><tr><th>system</th><th>download</th></tr></thead><tbody><tr><td>Windows x86-64</td><td>https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.5/ai999x-optimization-1.6.5-windows-x86_64.zip</td></tr><tr><td>Linux x86-64</td><td>https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.5/ai999x-optimization-1.6.5-linux-x86_64.tar.gz</td></tr></tbody></table>
|
| 30 |
+
<p>Windows: Download ai999x-optimization-1.6.5-windows-x86_64.zip, right-click it → Extract All, then open the folder and start ai999x-optimization.exe. If Windows SmartScreen asks, choose More info → Run anyway.</p>
|
| 31 |
+
<p>Linux:</p>
|
| 32 |
+
<pre><code class="shell">curl -LO https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.5/ai999x-optimization-1.6.5-linux-x86_64.tar.gz
|
| 33 |
+
curl -LO https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.5/SHA256SUMS
|
| 34 |
+
sha256sum -c --ignore-missing SHA256SUMS
|
| 35 |
+
tar xzf ai999x-optimization-1.6.5-linux-x86_64.tar.gz
|
| 36 |
+
./ai999x-optimization-1.6.5-linux-x86_64/ai999x-optimization</code></pre>
|
| 37 |
+
<p>Checksums of every download: https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.5/SHA256SUMS. Install steps for every app: https://www.ai999x.com/desktop-cli/</p>
|
| 38 |
+
<h2>2. The window</h2>
|
| 39 |
+
<figure><img src="https://www.ai999x.com/?ax_shot=optimization-ai999x/hero.webp"><figcaption>The Optimization app, opened on Transportation problem (minimum shipping cost) with its worked example.</figcaption></figure>
|
| 40 |
+
<p>On the left, a search box and the topics with their calculations. In the middle, the chosen calculation: its answer at the top, then the live scene (or its charts), what the answer means and the formula. On the right, its inputs, each with a slider where that makes sense, and the Compute and Reset buttons. At the bottom, a box for a question in words.</p>
|
| 41 |
+
<h2>3. Compute a calculation</h2>
|
| 42 |
+
<p>Open Network optimisation › Transportation problem (minimum shipping cost) (or type part of its name in the search box). It opens with a worked example filled in: “Solve the transportation problem with supply [20, 30], demand [10, 25, 15] and cost matrix [[2, 3, 1], [5, 4, 8]].” The answer: min_cost = 150, shipments = [[5, 0, 15], [5, 25, 0]], plan_unique = yes, dual = [-3, 0, 5, 4, 4].</p>
|
| 43 |
+
<p>Change any input (type a number with its unit, or drag its slider) and the answer, the scene and the charts follow; Compute recomputes after typing, Reset brings back the worked example. An input outside the range the formula holds for is refused with the reason, never answered with a guessed number.</p>
|
| 44 |
+
<figure><img src="https://www.ai999x.com/?ax_shot=optimization-ai999x/scene-1.webp"><figcaption>Transportation problem (minimum shipping cost): the live scene of the worked example.</figcaption></figure>
|
| 45 |
+
<h2>4. Ask in words</h2>
|
| 46 |
+
<p>Type a question as you would say it, for example “Solve the transportation problem with supply [20, 30], demand [10, 25, 15] and cost matrix [[2, 3, 1], [5, 4, 8]].” The app reads the quantities and their units, picks the calculation and answers; the command-line program reads it the same way and printed:</p>
|
| 47 |
+
<pre><code class="text">Read as: Transportation problem (minimum shipping cost)
|
| 48 |
+
min_cost = 150
|
| 49 |
+
shipments = [[5.0,0.0,15.0],[5.0,25.0,0.0]]</code></pre>
|
| 50 |
+
<p>When a question names a quantity the app cannot place, it says what is missing instead of guessing.</p>
|
| 51 |
+
<h2>5. The live scene and the charts</h2>
|
| 52 |
+
<p>Every calculation draws a scene from its answer: it moves as an input changes. The Charts button shows charts that vary one input around your values; Enlarge opens one in a large view. Scenes from other topics:</p>
|
| 53 |
+
<figure><img src="https://www.ai999x.com/?ax_shot=optimization-ai999x/scene-2.webp"><figcaption>Economic order quantity (EOQ)</figcaption></figure>
|
| 54 |
+
<figure><img src="https://www.ai999x.com/?ax_shot=optimization-ai999x/scene-3.webp"><figcaption>AHP consistency ratio</figcaption></figure>
|
| 55 |
+
<figure><img src="https://www.ai999x.com/?ax_shot=optimization-ai999x/scene-4.webp"><figcaption>Pure-strategy Nash equilibria of a bimatrix game</figcaption></figure>
|
| 56 |
+
<figure><img src="https://www.ai999x.com/?ax_shot=optimization-ai999x/scene-5.webp"><figcaption>Closed cylinder of least surface area for a given volume</figcaption></figure>
|
| 57 |
+
<figure><img src="https://www.ai999x.com/?ax_shot=optimization-ai999x/scene-6.webp"><figcaption>Break-even quantity</figcaption></figure>
|
| 58 |
+
<figure><img src="https://www.ai999x.com/?ax_shot=optimization-ai999x/scene-7.webp"><figcaption>Discounted Markov decision process (optimal values and policy)</figcaption></figure>
|
| 59 |
+
<figure><img src="https://www.ai999x.com/?ax_shot=optimization-ai999x/scene-8.webp"><figcaption>0/1 knapsack problem</figcaption></figure>
|
| 60 |
+
<figure><img src="https://www.ai999x.com/?ax_shot=optimization-ai999x/chart-1.webp"><figcaption>Transportation problem (minimum shipping cost): a chart, enlarged.</figcaption></figure>
|
| 61 |
+
<figure><img src="https://www.ai999x.com/?ax_shot=optimization-ai999x/chart-2.webp"><figcaption>Economic order quantity (EOQ): a chart, enlarged.</figcaption></figure>
|
| 62 |
+
<h2>6. Light and dark</h2>
|
| 63 |
+
<p>The app follows a light or a dark theme (the switch is in its top bar).</p>
|
| 64 |
+
<figure><img src="https://www.ai999x.com/?ax_shot=optimization-ai999x/hero-dark.webp"><figcaption>The Optimization app in the dark theme.</figcaption></figure>
|
| 65 |
+
<h2>7. Every calculation</h2>
|
| 66 |
+
<p>73 calculations in 16 topics; each has its own entry on the model's page (https://www.ai999x.com/models/optimization-ai999x/) with its formula, worked example and charts.</p>
|
| 67 |
+
<table><thead><tr><th>topic</th><th>calculations</th></tr></thead><tbody><tr><td>Calculus optimisation</td><td>Absolute extrema of a polynomial on a closed interval, Closed cylinder of least surface area for a given volume, Critical point of a two-variable quadratic and its classification, Largest rectangle for a given length of fencing, Open box of maximum volume from a rectangular sheet</td></tr><tr><td>Cost-volume-profit analysis</td><td>Break-even quantity</td></tr><tr><td>Dynamic programming</td><td>Discounted Markov decision process (optimal values and policy), Dynamic lot sizing (Wagner-Whitin)</td></tr><tr><td>Economic optimisation</td><td>Profit-maximising output with linear demand, Revenue-maximising price with linear demand</td></tr><tr><td>Game theory</td><td>2 x 2 zero-sum game (saddle point or mixed-strategy formula), Mixed-strategy Nash equilibrium of a 2 x 2 game, Pure-strategy Nash equilibria of a bimatrix game, Two-person zero-sum game (value and optimal mixed strategies)</td></tr><tr><td>Integer programming</td><td>0/1 knapsack problem, Bin packing (minimum number of bins), Chromatic number (minimum graph colouring), Integer linear program (branch and bound), Minimum vertex cover (and maximum independent set), Minimum-cost set cover, Unbounded knapsack problem, Uncapacitated facility location</td></tr><tr><td>Inventory management</td><td>Economic order quantity (EOQ), Economic production quantity (EPQ), EOQ with planned backorders, Newsvendor order quantity (discrete demand), Newsvendor order quantity (normal demand), Newsvendor order quantity (uniform demand), Order quantity with quantity discounts (all-units), Periodic-review order-up-to level, Reorder point with safety stock</td></tr><tr><td>Linear programming</td><td>Linear program (simplex method), LP duality and sensitivity ranges, Shadow prices of a linear program, Two-variable linear program (graphical corner-point method)</td></tr><tr><td>Multi-criteria decision analysis</td><td>AHP consistency ratio, AHP priority vector (principal eigenvector), AHP weights by the geometric mean method, TOPSIS ranking (closeness to the ideal solution), Weighted product model, Weighted sum model (simple additive weighting)</td></tr><tr><td>Network optimisation</td><td>All-pairs shortest distances (Floyd-Warshall), Assignment problem (Hungarian method), maximum total value, Assignment problem (Hungarian method), minimum total cost, Maximum bipartite matching, Maximum flow and minimum cut (Edmonds-Karp), Maximum-weight matching (general graph), Minimum spanning tree (Kruskal's algorithm), Minimum-cost flow (transshipment), Shortest path (Dijkstra's algorithm), Shortest path with negative weights (Bellman-Ford), Transportation problem (minimum shipping cost), Travelling salesman tour (exact, Held-Karp)</td></tr><tr><td>Nonlinear optimisation</td><td>Equality-constrained quadratic program (Lagrange multipliers / KKT), Steepest descent step with exact line search (quadratic), Unconstrained quadratic minimisation</td></tr><tr><td>Project scheduling</td><td>Critical path method (project duration and slack), PERT project duration and completion probability</td></tr><tr><td>Queueing theory</td><td>Erlang B blocking probability (M/M/c/c loss system), M/G/1 queue (Pollaczek-Khinchine formula), M/M/1 queue, M/M/c queue (Erlang C), M/M/c/K queue (finite capacity), Machine-repair (finite-source) queue, Minimum number of servers for a service target (Erlang C)</td></tr><tr><td>Revenue management</td><td>Littlewood's rule (two-fare protection level)</td></tr><tr><td>Scheduling</td><td>Earliest due date rule (minimum maximum lateness), Johnson's rule (two-machine flow shop), Minimum makespan on identical parallel machines, Moore-Hodgson algorithm (minimum number of tardy jobs), Shortest processing time rule (minimum mean flow time), Weighted shortest processing time (Smith's rule)</td></tr><tr><td>Unconstrained optimisation</td><td>Optimum of a quadratic function</td></tr></tbody></table>
|
| 68 |
+
<h2>8. Other ways to use it</h2>
|
| 69 |
+
<p>The same engine runs on the command line (<code>optimization</code>, its own guide), in Python (<code>pip install optimization-ai999x</code>, <code>import optimization_ai999x</code>, its own guide) and in the browser on https://www.ai999x.com/models/optimization-ai999x/.</p>
|
| 70 |
+
<p>Licence: Apache-2.0 · AI999X · https://www.ai999x.com/models/optimization-ai999x/</p></body></html>
|
docs/optimization_ai999x_desktop_guide.md
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Optimization: the desktop app, user guide
|
| 2 |
+
|
| 3 |
+
**Optimization**, desktop app 1.6.5 for Windows and Linux. **Creator / engineer:** Ibnul Jaif Farabi · **Company:** AI999X · support@ai999x.com
|
| 4 |
+
|
| 5 |
+
Optimization covers linear and integer programming, convex and nonlinear optimisation, assignment, transportation and shortest-route problems, scheduling, inventory, queueing, game theory and multi-criteria decisions. Its desktop app holds all 73 calculations in 16 topics: pick one, change its inputs and the answer, a live scene and charts follow at once. It runs on your own computer with no network connection and nothing else to install. The pictures in this guide were taken in this app.
|
| 6 |
+
|
| 7 |
+
## Contents
|
| 8 |
+
|
| 9 |
+
- 1. Get it and start it
|
| 10 |
+
- 2. The window
|
| 11 |
+
- 3. Compute a calculation
|
| 12 |
+
- 4. Ask in words
|
| 13 |
+
- 5. The live scene and the charts
|
| 14 |
+
- 6. Light and dark
|
| 15 |
+
- 7. Every calculation
|
| 16 |
+
- 8. Other ways to use it
|
| 17 |
+
|
| 18 |
+
## 1. Get it and start it
|
| 19 |
+
|
| 20 |
+
| system | download |
|
| 21 |
+
|---|---|
|
| 22 |
+
| Windows x86-64 | https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.5/ai999x-optimization-1.6.5-windows-x86_64.zip |
|
| 23 |
+
| Linux x86-64 | https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.5/ai999x-optimization-1.6.5-linux-x86_64.tar.gz |
|
| 24 |
+
|
| 25 |
+
Windows: Download ai999x-optimization-1.6.5-windows-x86_64.zip, right-click it → Extract All, then open the folder and start ai999x-optimization.exe. If Windows SmartScreen asks, choose More info → Run anyway.
|
| 26 |
+
|
| 27 |
+
Linux:
|
| 28 |
+
|
| 29 |
+
```shell
|
| 30 |
+
curl -LO https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.5/ai999x-optimization-1.6.5-linux-x86_64.tar.gz
|
| 31 |
+
curl -LO https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.5/SHA256SUMS
|
| 32 |
+
sha256sum -c --ignore-missing SHA256SUMS
|
| 33 |
+
tar xzf ai999x-optimization-1.6.5-linux-x86_64.tar.gz
|
| 34 |
+
./ai999x-optimization-1.6.5-linux-x86_64/ai999x-optimization
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
Checksums of every download: https://github.com/AI999X/ai999x-desktop/releases/download/v1.6.5/SHA256SUMS. Install steps for every app: https://www.ai999x.com/desktop-cli/
|
| 38 |
+
|
| 39 |
+
## 2. The window
|
| 40 |
+
|
| 41 |
+

|
| 42 |
+
|
| 43 |
+
*The Optimization app, opened on Transportation problem (minimum shipping cost) with its worked example.*
|
| 44 |
+
|
| 45 |
+
On the left, a search box and the topics with their calculations. In the middle, the chosen calculation: its answer at the top, then the live scene (or its charts), what the answer means and the formula. On the right, its inputs, each with a slider where that makes sense, and the Compute and Reset buttons. At the bottom, a box for a question in words.
|
| 46 |
+
|
| 47 |
+
## 3. Compute a calculation
|
| 48 |
+
|
| 49 |
+
Open Network optimisation › Transportation problem (minimum shipping cost) (or type part of its name in the search box). It opens with a worked example filled in: “Solve the transportation problem with supply [20, 30], demand [10, 25, 15] and cost matrix [[2, 3, 1], [5, 4, 8]].” The answer: min_cost = 150, shipments = [[5, 0, 15], [5, 25, 0]], plan_unique = yes, dual = [-3, 0, 5, 4, 4].
|
| 50 |
+
|
| 51 |
+
Change any input (type a number with its unit, or drag its slider) and the answer, the scene and the charts follow; Compute recomputes after typing, Reset brings back the worked example. An input outside the range the formula holds for is refused with the reason, never answered with a guessed number.
|
| 52 |
+
|
| 53 |
+

|
| 54 |
+
|
| 55 |
+
*Transportation problem (minimum shipping cost): the live scene of the worked example.*
|
| 56 |
+
|
| 57 |
+
## 4. Ask in words
|
| 58 |
+
|
| 59 |
+
Type a question as you would say it, for example “Solve the transportation problem with supply [20, 30], demand [10, 25, 15] and cost matrix [[2, 3, 1], [5, 4, 8]].” The app reads the quantities and their units, picks the calculation and answers; the command-line program reads it the same way and printed:
|
| 60 |
+
|
| 61 |
+
```text
|
| 62 |
+
Read as: Transportation problem (minimum shipping cost)
|
| 63 |
+
min_cost = 150
|
| 64 |
+
shipments = [[5.0,0.0,15.0],[5.0,25.0,0.0]]
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
When a question names a quantity the app cannot place, it says what is missing instead of guessing.
|
| 68 |
+
|
| 69 |
+
## 5. The live scene and the charts
|
| 70 |
+
|
| 71 |
+
Every calculation draws a scene from its answer: it moves as an input changes. The Charts button shows charts that vary one input around your values; Enlarge opens one in a large view. Scenes from other topics:
|
| 72 |
+
|
| 73 |
+

|
| 74 |
+
|
| 75 |
+
*Economic order quantity (EOQ)*
|
| 76 |
+
|
| 77 |
+

|
| 78 |
+
|
| 79 |
+
*AHP consistency ratio*
|
| 80 |
+
|
| 81 |
+

|
| 82 |
+
|
| 83 |
+
*Pure-strategy Nash equilibria of a bimatrix game*
|
| 84 |
+
|
| 85 |
+

|
| 86 |
+
|
| 87 |
+
*Closed cylinder of least surface area for a given volume*
|
| 88 |
+
|
| 89 |
+

|
| 90 |
+
|
| 91 |
+
*Break-even quantity*
|
| 92 |
+
|
| 93 |
+

|
| 94 |
+
|
| 95 |
+
*Discounted Markov decision process (optimal values and policy)*
|
| 96 |
+
|
| 97 |
+

|
| 98 |
+
|
| 99 |
+
*0/1 knapsack problem*
|
| 100 |
+
|
| 101 |
+

|
| 102 |
+
|
| 103 |
+
*Transportation problem (minimum shipping cost): a chart, enlarged.*
|
| 104 |
+
|
| 105 |
+

|
| 106 |
+
|
| 107 |
+
*Economic order quantity (EOQ): a chart, enlarged.*
|
| 108 |
+
|
| 109 |
+
## 6. Light and dark
|
| 110 |
+
|
| 111 |
+
The app follows a light or a dark theme (the switch is in its top bar).
|
| 112 |
+
|
| 113 |
+

|
| 114 |
+
|
| 115 |
+
*The Optimization app in the dark theme.*
|
| 116 |
+
|
| 117 |
+
## 7. Every calculation
|
| 118 |
+
|
| 119 |
+
73 calculations in 16 topics; each has its own entry on the model's page (https://www.ai999x.com/models/optimization-ai999x/) with its formula, worked example and charts.
|
| 120 |
+
|
| 121 |
+
| topic | calculations |
|
| 122 |
+
|---|---|
|
| 123 |
+
| Calculus optimisation | Absolute extrema of a polynomial on a closed interval, Closed cylinder of least surface area for a given volume, Critical point of a two-variable quadratic and its classification, Largest rectangle for a given length of fencing, Open box of maximum volume from a rectangular sheet |
|
| 124 |
+
| Cost-volume-profit analysis | Break-even quantity |
|
| 125 |
+
| Dynamic programming | Discounted Markov decision process (optimal values and policy), Dynamic lot sizing (Wagner-Whitin) |
|
| 126 |
+
| Economic optimisation | Profit-maximising output with linear demand, Revenue-maximising price with linear demand |
|
| 127 |
+
| Game theory | 2 x 2 zero-sum game (saddle point or mixed-strategy formula), Mixed-strategy Nash equilibrium of a 2 x 2 game, Pure-strategy Nash equilibria of a bimatrix game, Two-person zero-sum game (value and optimal mixed strategies) |
|
| 128 |
+
| Integer programming | 0/1 knapsack problem, Bin packing (minimum number of bins), Chromatic number (minimum graph colouring), Integer linear program (branch and bound), Minimum vertex cover (and maximum independent set), Minimum-cost set cover, Unbounded knapsack problem, Uncapacitated facility location |
|
| 129 |
+
| Inventory management | Economic order quantity (EOQ), Economic production quantity (EPQ), EOQ with planned backorders, Newsvendor order quantity (discrete demand), Newsvendor order quantity (normal demand), Newsvendor order quantity (uniform demand), Order quantity with quantity discounts (all-units), Periodic-review order-up-to level, Reorder point with safety stock |
|
| 130 |
+
| Linear programming | Linear program (simplex method), LP duality and sensitivity ranges, Shadow prices of a linear program, Two-variable linear program (graphical corner-point method) |
|
| 131 |
+
| Multi-criteria decision analysis | AHP consistency ratio, AHP priority vector (principal eigenvector), AHP weights by the geometric mean method, TOPSIS ranking (closeness to the ideal solution), Weighted product model, Weighted sum model (simple additive weighting) |
|
| 132 |
+
| Network optimisation | All-pairs shortest distances (Floyd-Warshall), Assignment problem (Hungarian method), maximum total value, Assignment problem (Hungarian method), minimum total cost, Maximum bipartite matching, Maximum flow and minimum cut (Edmonds-Karp), Maximum-weight matching (general graph), Minimum spanning tree (Kruskal's algorithm), Minimum-cost flow (transshipment), Shortest path (Dijkstra's algorithm), Shortest path with negative weights (Bellman-Ford), Transportation problem (minimum shipping cost), Travelling salesman tour (exact, Held-Karp) |
|
| 133 |
+
| Nonlinear optimisation | Equality-constrained quadratic program (Lagrange multipliers / KKT), Steepest descent step with exact line search (quadratic), Unconstrained quadratic minimisation |
|
| 134 |
+
| Project scheduling | Critical path method (project duration and slack), PERT project duration and completion probability |
|
| 135 |
+
| Queueing theory | Erlang B blocking probability (M/M/c/c loss system), M/G/1 queue (Pollaczek-Khinchine formula), M/M/1 queue, M/M/c queue (Erlang C), M/M/c/K queue (finite capacity), Machine-repair (finite-source) queue, Minimum number of servers for a service target (Erlang C) |
|
| 136 |
+
| Revenue management | Littlewood's rule (two-fare protection level) |
|
| 137 |
+
| Scheduling | Earliest due date rule (minimum maximum lateness), Johnson's rule (two-machine flow shop), Minimum makespan on identical parallel machines, Moore-Hodgson algorithm (minimum number of tardy jobs), Shortest processing time rule (minimum mean flow time), Weighted shortest processing time (Smith's rule) |
|
| 138 |
+
| Unconstrained optimisation | Optimum of a quadratic function |
|
| 139 |
+
|
| 140 |
+
## 8. Other ways to use it
|
| 141 |
+
|
| 142 |
+
The same engine runs on the command line (`optimization`, its own guide), in Python (`pip install optimization-ai999x`, `import optimization_ai999x`, its own guide) and in the browser on https://www.ai999x.com/models/optimization-ai999x/.
|
| 143 |
+
|
| 144 |
+
Licence: Apache-2.0 · AI999X · https://www.ai999x.com/models/optimization-ai999x/
|
docs/optimization_ai999x_desktop_guide.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2488d87cb77d6590230f2fa9ee59df2c06135869de17811cebd1212c7c4878dd
|
| 3 |
+
size 2528173
|
figures/johnson-two-machine-gantt.svg
DELETED
figures/lp-two-variable-graphical-region.svg
DELETED
figures/shortest-path-graph.svg
DELETED
figures/steepest-descent-step-iteration.svg
DELETED
figures/transportation-problem-heatmap.svg
DELETED
rust/SHA256SUMS
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
07d5939e629cb8b09f85d65b4f5105730c66db4ebfde57b0406f745c1d72b0ec ai999x-optimization-1.6.5-windows-x86_64.zip
|
| 2 |
+
d4de4df9dd61f09585d695ddcbc7225becbb980808ce163900265010a13f5cfb ai999x-optimization-1.6.5-linux-x86_64.tar.gz
|
| 3 |
+
183106c998005cc190f48f56b7483e9f1aaa03f9fa8f1fffcb27eeaa6efb87dc ai999x-optimization-cli-1.6.4-windows-x86_64.zip
|
| 4 |
+
5b8fef4aa01c12e240f994aa2c06720d9ad2dd3a0600d520ad1af9c6da5274aa ai999x-optimization-cli-1.6.4-linux-x86_64.tar.gz
|
rust/ai999x-optimization-1.6.5-linux-x86_64.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d4de4df9dd61f09585d695ddcbc7225becbb980808ce163900265010a13f5cfb
|
| 3 |
+
size 20830000
|
rust/ai999x-optimization-1.6.5-windows-x86_64.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:07d5939e629cb8b09f85d65b4f5105730c66db4ebfde57b0406f745c1d72b0ec
|
| 3 |
+
size 20004708
|
rust/ai999x-optimization-cli-1.6.4-linux-x86_64.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5b8fef4aa01c12e240f994aa2c06720d9ad2dd3a0600d520ad1af9c6da5274aa
|
| 3 |
+
size 3750502
|
rust/ai999x-optimization-cli-1.6.4-windows-x86_64.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:183106c998005cc190f48f56b7483e9f1aaa03f9fa8f1fffcb27eeaa6efb87dc
|
| 3 |
+
size 3783453
|