optimization-ai999x — offline, verified optimization solver with step-by-step answers

Install · Capability guide · Evaluation · AI999X on Hugging Face · Website · Support: Buy Me a Coffee

License: Apache-2.0 · Author: Ibnul Jaif Farabi (creator and engineer) · Organization: AI999X · Version 1.0.3

Field: Mathematics & Statistics · Tasks: Question Answering, Sentence Similarity, Feature Extraction

optimization-ai999x is an offline, deterministic Python solver that answers optimization questions with verified results from 72 certified capabilities, gives 240 documented answers identically on Windows and Linux, and refuses rather than guesses when an answer cannot be verified.

optimization-ai999x is a compact, deterministic optimization engine for Python. It reads a question in plain English (or a typed call), picks a certified optimization capability, computes the answer exactly, checks it, and returns the result with its steps, units, LaTeX and assumptions — or an honest refusal that says what is missing. It runs fully offline on any CPU, needs no GPU, no API key and no internet, and is built to give zero wrong answers: when it is not sure, it refuses instead of guessing.

Buy me a coffee License Python Offline

Highlights

  • Verified, not generated. Every answer is computed by a certified optimization capability and checked (substituted back, dimension-checked or compared with an independent computation) before it is returned.
  • Zero wrong answers by design. Seven explicit outcomes — SOLVED, NEEDS_INPUT, AMBIGUOUS, INVALID_INPUT, OUT_OF_SCOPE, UNRECOGNIZED_FORMAT, INTERNAL_ERROR — never a silent guess. Every one of its 240 documented answers is reproduced exactly on every tested platform.
  • Plain-English questions and a guaranteed typed interface. ask() reads documented question forms; solve(capability_id, **inputs) always solves a supported task with valid inputs.
  • Explains itself. Steps, formulas in LaTeX, units, assumptions and the model used, ready for notebooks, tutoring apps and homework checkers.
  • Small and portable. Pure Python (sympy, mpmath); identical answers on Windows and Linux (Python 3.10, 3.11, 3.12, 3.13, 3.14).
  • Coverage: linear and integer programming, convex and nonlinear optimisation, assignment, transportation and shortest-route problems, scheduling, inventory, queueing, game theory and multi-criteria decisions.

Model overview

Property Value
Package optimization-ai999x 1.0.3 (import optimization_ai999x)
Type Deterministic neuro-symbolic optimization engine (rule-based reading + certified symbolic capabilities)
Capabilities 72 certified procedures
Knowledge pack version 1.0.1
Golden answers 240 documented answers, identical on every tested platform
Platforms tested Windows (Python 3.13), Linux x86-64 (Python 3.10, 3.11, 3.12, 3.13, 3.14)
Runtime CPU only, offline; no GPU, no network, no API key
License Apache-2.0
Creator / engineer Ibnul Jaif Farabi
Organization AI999X

Quickstart

pip install optimization-ai999x
# or straight from this repository:
pip install https://huggingface.co/AI999X/optimization-ai999x/resolve/main/dist/optimization_ai999x-1.0.3-py3-none-any.whl
import optimization_ai999x as optimization

optimization.ask("Solve the transportation problem with supply [20, 30], demand [10, 25, 15] and cost matrix [[2, 3, 1], [5, 4, 8]].").show()
# -> SOLVED — min_cost = 150, shipments = [[5.0, 0.0, 15.0], [5.0, 25.0, 0.0]], plan_unique = yes, dual = [-3.0, 0.0, 5.0, 4.0, 4.0]  (transportation_problem)
optimization.ask("Find the shortest path from A to D in the undirected graph with edges A-B 4, A-C 2, B-C 1, B-D 5, C-D 8.").show()
# -> SOLVED — distance = 8, path = ['A', 'C', 'B', 'D'], path_unique = yes  (shortest_path)
optimization.solve("eoq", D=1200, S=50, H=3).show()
# -> SOLVED — Q = 200, total_cost = 600, orders_per_period = 6, cycle_time = 0.166667  (eoq)
optimization.ask("Find the AHP consistency ratio for the pairwise judgments [3, 5, 2].").show()
# -> SOLVED — CR = 0.003185, CI = 0.0018473, lambda_max = 3.00369, weights = [0.6483290138222366, 0.2296507940626371, 0.12202019211512621]  (ahp_consistency_ratio)
optimization.ask("Find the pure-strategy Nash equilibria of the bimatrix game with row payoffs [[3, 0], [5, 1]] and column payoffs [[3, 5], [0, 1]].").show()
# -> SOLVED — count = 1, equilibria = [[2.0, 2.0]]  (pure_nash_equilibria)
optimization.ask("Who created you?").message
# -> optimization-ai999x was created and engineered by Ibnul Jaif Farabi at AI999X.

Command line: optimization-ai999x "<question>", optimization-ai999x --capabilities. The outputs above were produced by running this exact code on optimization-ai999x 1.0.3.

Find the right capability, and draw it

optimization.search() finds which certified capability a question is about — across every AI999X model, so a question for another model points you to it. It runs ai999x-encoder, AI999X's own capability encoder (4.7M parameters, a 4.9 MB ONNX model, offline; the root model.safetensors of this repository): pip install "optimization-ai999x[search]". ask(question, suggest=True) adds the same pointers to a question it does not answer; an answer itself never changes.

import optimization_ai999x as optimization

optimization.search("Solve x^2 - 5x + 6 = 0", k=2)
# -> Roots of a quadratic equation (math-foundations-ai999x, 0.63); Roots of a cubic equation (math-foundations-ai999x, 0.59)

How every answer is verified

  1. Reading — the question is turned into typed quantities (value, unit, kind, role) and one asked quantity; every stated number must be used or the question is refused.
  2. Planning — only certified capabilities may answer; a capability applies only under the conditions the wording states (for example a pendulum, a liquid at rest, boiling).
  3. Computing — exact symbolic or high-precision numeric evaluation.
  4. Checking — dimensions, substitution back into the defining equation, and agreement between independent readings; any disagreement becomes a refusal, never a number.

Capabilities are certified before they ship: each must reproduce hand-worked reference cases, reject a deliberately wrong variant (a control), and leave every benchmark answer unchanged.

Worked examples

Each question was put to optimization-ai999x; the answer is the one it returned, with the steps it took.

Transportation problem (minimum shipping cost) · Network optimisation

Solve the transportation problem with supply [20, 30], demand [10, 25, 15] and cost matrix [[2, 3, 1], [5, 4, 8]].

→ min_cost = 150, shipments = [[5, 0, 15], [5, 25, 0]], plan_unique = yes, dual = [-3, 0, 5, 4, 4]

Steps
  • Transportation problem (minimum shipping cost): supply = [20, 30], demand = [10, 25, 15], cost = [2 3 1; 5 4 8] → min_cost = 150, shipments = [[5, 0, 15], [5, 25, 0]], plan_unique = yes, dual = [-3, 0, 5, 4, 4]

Shortest path (Dijkstra's algorithm) · Network optimisation

Find the shortest path from A to D in the undirected graph with edges A-B 4, A-C 2, B-C 1, B-D 5, C-D 8.

→ distance = 8, path = [A, C, B, D], path_unique = yes

Steps
  • Shortest path (Dijkstra's algorithm): edges = A-B (4), A-C (2), B-C (1), B-D (5), C-D (8), source = A, target = D, directed = False → distance = 8, path = [A, C, B, D], path_unique = yes

Economic order quantity (EOQ) · Inventory management

m.solve("eoq", D=1200, S=50, H=3)

→ Q = 200, total_cost = 600, orders_per_period = 6, cycle_time = 0.1666666667

Steps
  • Economic order quantity (EOQ): D = 1200, S = 50, H = 3 → Q = 200, total_cost = 600, orders_per_period = 6, cycle_time = 0.1666666667

AHP consistency ratio · Multi-criteria decision analysis

Find the AHP consistency ratio for the pairwise judgments [3, 5, 2].

→ CR = 0.003184998331, CI = 0.001847299032, lambda_max = 3.003694598, weights = [0.6483290138, 0.2296507941, 0.1220201921], acceptable = yes

Steps
  • AHP consistency ratio: judgments = [3, 5, 2] → CR = 0.003184998331, CI = 0.001847299032, lambda_max = 3.003694598, weights = [0.6483290138, 0.2296507941, 0.1220201921], acceptable = yes

Pure-strategy Nash equilibria of a bimatrix game · Game theory

Find the pure-strategy Nash equilibria of the bimatrix game with row payoffs [[3, 0], [5, 1]] and column payoffs [[3, 5], [0, 1]].

→ count = 1, equilibria = [[2, 2]]

Steps
  • Pure-strategy Nash equilibria of a bimatrix game: A = [3 0; 5 1], B = [3 5; 0 1] → count = 1, equilibria = [[2, 2]]

Closed cylinder of least surface area for a given volume · Calculus optimisation

A closed cylindrical can must hold 500 cm^3. Find the dimensions that minimize the surface area.

→ radius = 4.301270069, height = 8.602540138, min_area = 348.7342055

Steps
  • Closed cylinder of least surface area for a given volume: V = 500 → radius = 4.301270069, height = 8.602540138, min_area = 348.7342055

Figures

Every point was computed by optimization-ai999x.

A linear programme: feasible region and optimal corner

A linear programme: feasible region and optimal corner — computed by optimization-ai999x

Maximise 3x + 5y subject to x ≤ 4; 2y ≤ 12; 3x + 2y ≤ 18, x, y ≥ 0: the feasible region with the corner points the package returns ((0, 0), (0, 6), (2, 6), (4, 0), (4, 3)) and the objective line through the optimum; marked: x = 2, y = 6, objective 36.

Steepest descent zig-zagging to the minimum

Steepest descent zig-zagging to the minimum — computed by optimization-ai999x

Steepest descent with exact line search on f(x) = ½ xᵀQx, Q = [[2, 0], [0, 8]], from x₀ = (4, 1): six steps computed by the package, each perpendicular to the level set through its start (f = 20, 7.2, 2.592, 0.93312, 0.335923, 0.120932, 0.0435356); marked: x₆ = (0.186624, 0.046656).

Shortest path and minimum spanning tree

Shortest path and minimum spanning tree — computed by optimization-ai999x

A weighted network (A-B 4, A-C 2, B-C 1, B-D 5, C-D 8, A-E 7, E-D 3, C-E 6): the shortest path from A to D the package finds, A → C → B → D of length 8, and its minimum spanning tree (B-C, A-C, E-D, B-D, total weight 11).

An optimal transportation plan

An optimal transportation plan — computed by optimization-ai999x

The optimal transportation plan the package computes for supplies [20, 30], demands [10, 25, 15] and unit costs [[2, 3, 1], [5, 4, 8]] (rows: sources, columns: destinations; left the unit costs, right the quantities shipped): minimum total cost 150.

A two-machine schedule in Johnson's order

A two-machine schedule in Johnson's order — computed by optimization-ai999x

A two-machine flow shop: processing times [5, 2, 6, 7] on machine 1 and [3, 4, 8, 2] on machine 2. The package's Johnson order is job 2 → job 3 → job 1 → job 4, with makespan 22; each job starts on machine 2 as soon as it leaves machine 1 and machine 2 is free.

Capabilities

72 certified procedures. A few of them:

  • Procedures: 0/1 knapsack problem; 2 x 2 zero-sum game (saddle point or mixed-strategy formula); AHP consistency ratio; AHP priority vector (principal eigenvector); AHP weights by the geometric mean method; Absolute extrema of a polynomial on a closed interval; All-pairs shortest distances (Floyd-Warshall); Assignment problem (Hungarian method), maximum total value; Assignment problem (Hungarian method), minimum total cost; Bin packing (minimum number of bins); Break-even quantity; Chromatic number (minimum graph colouring); Closed cylinder of least surface area for a given volume; Critical path method (project duration and slack); Critical point of a two-variable quadratic and its classification; Discounted Markov decision process (optimal values and policy); Dynamic lot sizing (Wagner-Whitin); EOQ with planned backorders; Earliest due date rule (minimum maximum lateness); Economic order quantity (EOQ); Economic production quantity (EPQ); Equality-constrained quadratic program (Lagrange multipliers / KKT); Erlang B blocking probability (M/M/c/c loss system); Integer linear program (branch and bound) …

optimization_ai999x.templates() lists every question form ask() reads; the capability guide (PDF, every example executed) is included in this repository.

All 72 formulas

Show every formula, by topic

Calculus optimisation / geometry

Closed cylinder of least surface area for a given volume

r∗=(V2π)1/3,h∗=2r∗ r^* = \left(\frac{V}{2\pi}\right)^{1/3}, \quad h^* = 2r^*

Largest rectangle for a given length of fencing

Amax⁡=L216 (4 sides),L28 (3 sides) A_{\max} = \frac{L^2}{16} \text{ (4 sides)}, \quad \frac{L^2}{8} \text{ (3 sides)}

Open box of maximum volume from a rectangular sheet

x∗=(L+W)−L2−LW+W26 x^* = \frac{(L+W) - \sqrt{L^2 - LW + W^2}}{6}

Calculus optimisation / one variable

Absolute extrema of a polynomial on a closed interval

min⁡[a,b]f=min⁡{f(a),f(b),f(c):f′(c)=0, a<c<b} \min_{[a,b]} f = \min\{f(a), f(b), f(c) : f'(c) = 0,\ a < c < b\}

Calculus optimisation / several variables

Critical point of a two-variable quadratic and its classification

D=fxxfyy−fxy2=4ac−b2 D = f_{xx} f_{yy} - f_{xy}^2 = 4ac - b^2

Cost-volume-profit analysis

Break-even quantity

QBE=Fp−v Q_{BE} = \frac{F}{p - v}

Dynamic programming / Markov decision processes

Discounted Markov decision process (optimal values and policy)

V∗(s)=max⁡a(R(s,a)+γ∑s′P(s′∣s,a) V∗(s′)) V^*(s) = \max_a \Big( R(s,a) + \gamma \sum_{s'} P(s' \mid s,a)\, V^*(s') \Big)

Dynamic programming / inventory

Dynamic lot sizing (Wagner-Whitin)

Ct=min⁡1≤s≤t(Cs−1+K+h∑u=st(u−s) du) C_t = \min_{1 \le s \le t} \Big( C_{s-1} + K + h \sum_{u=s}^{t} (u - s)\, d_u \Big)

Economic optimisation / monopoly pricing

Profit-maximising output with linear demand

q∗=a−c2b,p∗=a+c2 q^* = \frac{a - c}{2b}, \quad p^* = \frac{a + c}{2}

Economic optimisation / pricing

Revenue-maximising price with linear demand

p∗=α2β,R∗=α24β p^* = \frac{\alpha}{2\beta}, \quad R^* = \frac{\alpha^2}{4\beta}

Game theory / non-zero-sum games

Mixed-strategy Nash equilibrium of a 2 x 2 game

q=a22−a12a11−a12−a21+a22,p=b22−b21b11−b12−b21+b22 q = \frac{a_{22} - a_{12}}{a_{11} - a_{12} - a_{21} + a_{22}},\quad p = \frac{b_{22} - b_{21}}{b_{11} - b_{12} - b_{21} + b_{22}}

Pure-strategy Nash equilibria of a bimatrix game

ars=max⁡kaks,brs=max⁡kbrk a_{rs} = \max_k a_{ks},\quad b_{rs} = \max_k b_{rk}

Game theory / zero-sum games

2 x 2 zero-sum game (saddle point or mixed-strategy formula)

v=ad−bca+d−b−c,p=d−ca+d−b−c,q=d−ba+d−b−c v = \frac{ad - bc}{a + d - b - c},\quad p = \frac{d - c}{a + d - b - c},\quad q = \frac{d - b}{a + d - b - c}

Two-person zero-sum game (value and optimal mixed strategies)

v=max⁡x∈Δmmin⁡j∑ixiaij=min⁡y∈Δnmax⁡i∑jaijyj v = \max_{x \in \Delta_m} \min_{j} \sum_i x_i a_{ij} = \min_{y \in \Delta_n} \max_i \sum_j a_{ij} y_j

Integer programming

Integer linear program (branch and bound)

max⁡/min⁡  c⊤xs.t. Ax  (≤,≥,=)  b,  x∈Z≥0n \max / \min \; c^\top x \quad \text{s.t. } A x \;(\le,\ge,=)\; b,\; x \in \mathbb{Z}_{\ge 0}^n

Integer programming / covering

Minimum vertex cover (and maximum independent set)

τ(G)=min⁡{∣C∣:C∩{u,v}≠∅ ∀uv∈E},α(G)=∣V∣−τ(G) \tau(G) = \min\{\vert C\vert : C \cap \{u, v\} \neq \emptyset\ \forall uv \in E\},\quad \alpha(G) = \vert V\vert - \tau(G)

Minimum-cost set cover

min⁡∑icixi s.t. ∑i∋exi≥1 ∀e, x∈{0,1} \min \sum_i c_i x_i\ \text{s.t.}\ \sum_{i \ni e} x_i \ge 1\ \forall e,\ x \in \{0,1\}

Integer programming / graph colouring

Chromatic number (minimum graph colouring)

χ(G)=min⁡{k:∃ c:V→{1..k}, c(u)≠c(v) ∀uv∈E} \chi(G) = \min\{k : \exists\, c: V \to \{1..k\},\ c(u) \neq c(v)\ \forall uv \in E\}

Integer programming / knapsack

0/1 knapsack problem

max⁡∑ivixi s.t. ∑iwixi≤W, xi∈{0,1} \max \sum_i v_i x_i \ \text{s.t.}\ \sum_i w_i x_i \le W,\ x_i \in \{0,1\}

Unbounded knapsack problem

V(c)=max⁡(V(c−1), max⁡i:wi≤cV(c−wi)+vi) V(c) = \max\big(V(c-1),\ \max_{i: w_i \le c} V(c - w_i) + v_i\big)

Integer programming / location

Uncapacitated facility location

min⁡S≠∅∑i∈Sfi+∑jmin⁡i∈Scij \min_{S \neq \emptyset} \sum_{i \in S} f_i + \sum_j \min_{i \in S} c_{ij}

Integer programming / packing

Bin packing (minimum number of bins)

min⁡#bins ≥ ⌈∑jsj/C⌉ \min \#\text{bins} \ \ge\ \left\lceil \sum_j s_j / C \right\rceil

Inventory management

EOQ with planned backorders

Q∗=2DSH⋅H+BB,s∗=Q∗HH+B Q^* = \sqrt{\frac{2DS}{H}\cdot\frac{H+B}{B}}, \quad s^* = Q^* \frac{H}{H+B}

Economic order quantity (EOQ)

Q∗=2DSH,TC∗=2DSH Q^* = \sqrt{\frac{2 D S}{H}}, \quad TC^* = \sqrt{2 D S H}

Economic production quantity (EPQ)

Q∗=2DSH(1−D/P) Q^* = \sqrt{\frac{2DS}{H(1 - D/P)}}

Order quantity with quantity discounts (all-units)

TC(Q)=Dpk+DSQ+ipkQ2 TC(Q) = D p_k + \frac{D S}{Q} + \frac{i p_k Q}{2}

Periodic-review order-up-to level

S=dˉ(R+L)+zSL σdR+L S = \bar d (R + L) + z_{SL}\,\sigma_d\sqrt{R + L}

Reorder point with safety stock

ROP=dˉL+zSL σdL ROP = \bar d L + z_{SL}\,\sigma_d \sqrt{L}

Inventory management / single-period

Newsvendor order quantity (discrete demand)

Q∗=min⁡{d:F(d)≥p−cp−s} Q^* = \min\{ d : F(d) \ge \tfrac{p - c}{p - s} \}

Newsvendor order quantity (normal demand)

F(Q∗)=p−cp−s,Q∗=μ+z σ F(Q^*) = \frac{p - c}{p - s}, \quad Q^* = \mu + z\,\sigma

Newsvendor order quantity (uniform demand)

Q∗=a+p−cp−s(b−a) Q^* = a + \frac{p - c}{p - s}(b - a)

Linear programming

Linear program (simplex method)

max⁡/min⁡  c⊤xs.t. Ax  (≤,≥,=)  b,  x≥0 \max / \min \; c^\top x \quad \text{s.t. } A x \;(\le, \ge, =)\; b,\; x \ge 0

Two-variable linear program (graphical corner-point method)

z∗=max⁡v∈cornersc⊤v z^* = \max_{v \in \text{corners}} c^\top v

Linear programming / sensitivity analysis

Shadow prices of a linear program

y⊤=cB⊤B−1,∂z∗∂bi=yi y^\top = c_B^\top B^{-1}, \qquad \frac{\partial z^*}{\partial b_i} = y_i

Multi-criteria decision analysis

TOPSIS ranking (closeness to the ideal solution)

C_i = \frac{D_i^-}{D_i^+ + D_i^-},\quad D_i^\pm = \Big\\vert w \odot r_i - v^\pm \Big\\vert _2

Weighted product model

Pi=∏jnij wj P_i = \prod_j n_{ij}^{\,w_j}

Weighted sum model (simple additive weighting)

Si=∑jwjnij,nij=xijmax⁡ixij or min⁡ixijxij S_i = \sum_j w_j n_{ij},\quad n_{ij} = \frac{x_{ij}}{\max_i x_{ij}}\ \text{or}\ \frac{\min_i x_{ij}}{x_{ij}}

Multi-criteria decision analysis / AHP

AHP consistency ratio

CI=λmax⁡−nn−1,CR=CIRIn CI = \frac{\lambda_{\max} - n}{n - 1},\quad CR = \frac{CI}{RI_n}

AHP priority vector (principal eigenvector)

Pw=λmax⁡w,∑iwi=1 P w = \lambda_{\max} w,\quad \sum_i w_i = 1

AHP weights by the geometric mean method

wi=(∏jaij)1/n∑k(∏jakj)1/n w_i = \frac{(\prod_j a_{ij})^{1/n}}{\sum_k (\prod_j a_{kj})^{1/n}}

Network optimisation / assignment

Assignment problem (Hungarian method), maximum total value

min⁡σ∑iciσ(i)=max⁡{∑iui+∑jvj:ui+vj≤cij} \min_{\sigma} \sum_i c_{i\sigma(i)} = \max \Big\{ \sum_i u_i + \sum_j v_j : u_i + v_j \le c_{ij} \Big\}

Assignment problem (Hungarian method), minimum total cost

min⁡σ∑iciσ(i)=max⁡{∑iui+∑jvj:ui+vj≤cij} \min_{\sigma} \sum_i c_{i\sigma(i)} = \max \Big\{ \sum_i u_i + \sum_j v_j : u_i + v_j \le c_{ij} \Big\}

Network optimisation / flows

Maximum flow and minimum cut (Edmonds-Karp)

max⁡∣f∣=min⁡(S,Sˉ)c(S,Sˉ) \max \vert f\vert = \min_{(S, \bar S)} c(S, \bar S)

Minimum-cost flow (transshipment)

min⁡∑cijxij s.t. ∑jxvj−∑ixiv=bv, 0≤xij≤uij \min \sum c_{ij} x_{ij}\ \text{s.t.}\ \sum_j x_{vj} - \sum_i x_{iv} = b_v,\ 0 \le x_{ij} \le u_{ij}

Network optimisation / matching

Maximum bipartite matching

ν(G)=τ(G) for bipartite G \nu(G) = \tau(G) \text{ for bipartite } G

Maximum-weight matching (general graph)

max⁡M matching∑e∈Mwe \max_{M \text{ matching}} \sum_{e \in M} w_e

Network optimisation / routing

Travelling salesman tour (exact, Held-Karp)

g(S,k)=min⁡m∈S∖{k}(g(S∖{k},m)+dmk) g(S, k) = \min_{m \in S \setminus \{k\}} \big(g(S \setminus \{k\}, m) + d_{mk}\big)

Network optimisation / shortest routes

All-pairs shortest distances (Floyd-Warshall)

dij←min⁡(dij, dik+dkj) d_{ij} \leftarrow \min(d_{ij},\, d_{ik} + d_{kj})

Shortest path (Dijkstra's algorithm)

d(v)=min⁡(u,v)(d(u)+wuv) d(v) = \min_{(u,v)} \big(d(u) + w_{uv}\big)

Shortest path with negative weights (Bellman-Ford)

d(v)≤d(u)+wuv ∀(u,v) d(v) \le d(u) + w_{uv} \ \forall (u,v)

Network optimisation / spanning trees

Minimum spanning tree (Kruskal's algorithm)

min⁡T spanning tree∑e∈Twe \min_{T \text{ spanning tree}} \sum_{e \in T} w_e

Network optimisation / transportation

Transportation problem (minimum shipping cost)

min⁡∑ijcijxij s.t. ∑jxij≤si, ∑ixij=dj, x≥0 \min \sum_{ij} c_{ij} x_{ij}\ \text{s.t.}\ \sum_j x_{ij} \le s_i,\ \sum_i x_{ij} = d_j,\ x \ge 0

Nonlinear optimisation / descent methods

Steepest descent step with exact line search (quadratic)

α=g⊤gg⊤Qg,x1=x0−αg \alpha = \frac{g^\top g}{g^\top Q g},\quad x_1 = x_0 - \alpha g

Nonlinear optimisation / quadratic

Equality-constrained quadratic program (Lagrange multipliers / KKT)

[QA⊤A0][xλ]=[−cb] \begin{bmatrix} Q & A^\top \\ A & 0 \end{bmatrix}\begin{bmatrix} x \\ \lambda \end{bmatrix} = \begin{bmatrix} -c \\ b \end{bmatrix}

Unconstrained quadratic minimisation

x∗=−Q−1c,f∗=12c⊤x∗ x^* = -Q^{-1} c,\quad f^* = \tfrac12 c^\top x^*

Project scheduling

Critical path method (project duration and slack)

ESk=max⁡j→k(ESj+dj),LSk=min⁡k→sLSs−dk,slackk=LSk−ESk ES_k = \max_{j \to k}(ES_j + d_j),\quad LS_k = \min_{k \to s} LS_s - d_k,\quad \text{slack}_k = LS_k - ES_k

PERT project duration and completion probability

te=a+4m+b6,  σ2=(b−a6)2,  P(T≤d)=Φ ⁣(d−μσ) t_e = \frac{a + 4m + b}{6},\; \sigma^2 = \left(\frac{b - a}{6}\right)^2,\; P(T \le d) = \Phi\!\left(\frac{d - \mu}{\sigma}\right)

Queueing theory

M/G/1 queue (Pollaczek-Khinchine formula)

Lq=λ2σS2+ρ22(1−ρ) L_q = \frac{\lambda^2 \sigma_S^2 + \rho^2}{2(1-\rho)}

M/M/1 queue

L=ρ1−ρ,  W=1μ−λ,  Wq=ρμ−λ L = \frac{\rho}{1-\rho},\; W = \frac{1}{\mu - \lambda},\; W_q = \frac{\rho}{\mu-\lambda}

M/M/c queue (Erlang C)

C(c,a)=B(c,a)1−ρ(1−B(c,a)),Lq=C ρ1−ρ C(c, a) = \frac{B(c,a)}{1 - \rho(1 - B(c,a))}, \quad L_q = C\,\frac{\rho}{1-\rho}

M/M/c/K queue (finite capacity)

πn∝ann! (n≤c),acc!(ac)n−c (c<n≤K) \pi_n \propto \frac{a^n}{n!}\ (n \le c),\quad \frac{a^c}{c!}\left(\frac{a}{c}\right)^{n-c}\ (c < n \le K)

Machine-repair (finite-source) queue

πn∝N!(N−n)! (λ/μ)nn! or c! cn−c \pi_n \propto \frac{N!}{(N-n)!}\,\frac{(\lambda/\mu)^n}{n!\ \text{or}\ c!\,c^{n-c}}

Queueing theory / staffing

Minimum number of servers for a service target (Erlang C)

c∗=min⁡{c>λ/μ:C(c,λ/μ)≤α} c^* = \min\{c > \lambda/\mu : C(c, \lambda/\mu) \le \alpha\}

Queueing theory / teletraffic

Erlang B blocking probability (M/M/c/c loss system)

B(c,A)=Ac/c!∑k=0cAk/k! B(c, A) = \frac{A^c / c!}{\sum_{k=0}^{c} A^k / k!}

Revenue management

Littlewood's rule (two-fare protection level)

P(D1>y∗)=p2p1,y∗=μ+z σ P(D_1 > y^*) = \frac{p_2}{p_1}, \quad y^* = \mu + z\,\sigma

Scheduling / flow shop

Johnson's rule (two-machine flow shop)

min⁡Cmax⁡ for F2vertCmax⁡ \min C_{\max} \text{ for } F2 \\vert C_{\max}

Scheduling / parallel machines

Minimum makespan on identical parallel machines

min⁡assignmentmax⁡k∑j→kpj \min_{\text{assignment}} \max_k \sum_{j \to k} p_j

Scheduling / single machine

Earliest due date rule (minimum maximum lateness)

min⁡Lmax⁡=min⁡max⁡j(Cj−dj):  d[1]≤d[2]≤… \min L_{\max} = \min \max_j (C_j - d_j):\; d_{[1]} \le d_{[2]} \le \dots

Moore-Hodgson algorithm (minimum number of tardy jobs)

min⁡∑jUj \min \sum_j U_j

Shortest processing time rule (minimum mean flow time)

min⁡1n∑jCj:  p[1]≤p[2]≤… \min \tfrac{1}{n}\sum_j C_j:\; p_{[1]} \le p_{[2]} \le \dots

Weighted shortest processing time (Smith's rule)

min⁡∑jwjCj:  p[1]w[1]≤p[2]w[2]≤… \min \sum_j w_j C_j:\; \frac{p_{[1]}}{w_{[1]}} \le \frac{p_{[2]}}{w_{[2]}} \le \dots

Unconstrained optimisation / one variable

Optimum of a quadratic function

x∗=−b2a,f∗=c−b24a x^* = -\frac{b}{2a}, \quad f^* = c - \frac{b^2}{4a}

Out of scope

  • Open-ended explanation, essay writing or tutoring dialogue: it is a solver, not a chatbot.
  • Questions outside its certified optimization capabilities, and any question whose stated numbers it cannot all use — it refuses with the reason instead.
  • High-stakes engineering, medical or legal decisions without independent review.

Limitations

  • It answers what its certified capabilities cover (linear and integer programming, convex and nonlinear optimisation, assignment, transportation and shortest-route problems, scheduling, inventory, queueing, game theory and multi-criteria decisions); anything else is refused with a reason.
  • ask() reads documented question forms and common phrasings; unusual wording may be refused — use solve() for guaranteed results.
  • Results are as correct as the certified relations and their stated conditions; a certified relation is a checked model, not a claim about every physical situation.

Citation

@software{optimization_ai999x_1_0_3,
  title  = {optimization-ai999x: an offline, verified optimization solver},
  author = {Farabi, Ibnul Jaif}, organization = {AI999X},
  year   = {2026}, version = {1.0.3},
  url    = {https://huggingface.co/AI999X/optimization-ai999x}
}

Contact

Questions, bug reports and requests: open a discussion on https://huggingface.co/AI999X/optimization-ai999x/discussions or visit https://ai999x.com.

Support the project

optimization-ai999x is free and open source. If it helps you, you can support further development on Buy Me a Coffee.

Created and engineered by Ibnul Jaif Farabi · AI999X · ai999x.com

Downloads last month
38
Safetensors
Model size
4.72M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collections including AI999X/optimization-ai999x

Evaluation results

  • identical on every platform on Golden answers (240 documented questions, Windows + Linux Python 3.10-3.14)
    self-reported
    1.000
  • right capability first on Capability search, 12998 held-out verified questions across all AI999X models
    self-reported
    0.918
  • in the top five on Capability search, 12998 held-out verified questions across all AI999X models
    self-reported
    0.988