optimization-ai999x 1.1.0__py3-none-win_amd64.whl
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.
- optimization_ai999x/__init__.py +49 -0
- optimization_ai999x/_ax_native.dll +0 -0
- optimization_ai999x/_capabilities.py +955 -0
- optimization_ai999x/_engine/__init__.py +14 -0
- optimization_ai999x/_engine/_lazy.py +49 -0
- optimization_ai999x/_engine/answer.py +187 -0
- optimization_ai999x/_engine/compiler.py +547 -0
- optimization_ai999x/_engine/decision_reader.py +233 -0
- optimization_ai999x/_engine/derivations.py +166 -0
- optimization_ai999x/_engine/engine.py +250 -0
- optimization_ai999x/_engine/explain.py +157 -0
- optimization_ai999x/_engine/explanations.py +143 -0
- optimization_ai999x/_engine/expr.py +251 -0
- optimization_ai999x/_engine/formula_solver.py +302 -0
- optimization_ai999x/_engine/identity.py +42 -0
- optimization_ai999x/_engine/inputs.py +160 -0
- optimization_ai999x/_engine/knowledge_store.py +269 -0
- optimization_ai999x/_engine/native.py +239 -0
- optimization_ai999x/_engine/pack.py +200 -0
- optimization_ai999x/_engine/planner.py +180 -0
- optimization_ai999x/_engine/policy.py +87 -0
- optimization_ai999x/_engine/precision.py +108 -0
- optimization_ai999x/_engine/proc_reader.py +443 -0
- optimization_ai999x/_engine/procedure_spec.py +283 -0
- optimization_ai999x/_engine/product.py +1068 -0
- optimization_ai999x/_engine/quantity.py +255 -0
- optimization_ai999x/_engine/relation.py +190 -0
- optimization_ai999x/_engine/retrieval.py +61 -0
- optimization_ai999x/_engine/search.py +75 -0
- optimization_ai999x/_engine/slot_reader.py +109 -0
- optimization_ai999x/_engine/student_gate.py +228 -0
- optimization_ai999x/_engine/systems/__init__.py +33 -0
- optimization_ai999x/_engine/systems/reader.py +248 -0
- optimization_ai999x/_engine/systems/solver.py +284 -0
- optimization_ai999x/_engine/visual.py +161 -0
- optimization_ai999x/cli.py +29 -0
- optimization_ai999x/pack/MANIFEST.json +51 -0
- optimization_ai999x/pack/capabilities/procedures.py +6172 -0
- optimization_ai999x/pack/capabilities/procedures_certified.json +79 -0
- optimization_ai999x/pack/dictionary/kinds.json +5 -0
- optimization_ai999x/pack/dictionary/terms.json +19 -0
- optimization_ai999x/pack/knowledge/reference_cases.json +3 -0
- optimization_ai999x/pack/knowledge/relations.json +5 -0
- optimization_ai999x/pack/optimization_knowledge_public.sqlite +0 -0
- optimization_ai999x/pack/search/encoder.int8.onnx +0 -0
- optimization_ai999x/pack/search/index.json +1 -0
- optimization_ai999x/pack/search/tokenizer.json +8088 -0
- optimization_ai999x-1.1.0.dist-info/METADATA +570 -0
- optimization_ai999x-1.1.0.dist-info/RECORD +54 -0
- optimization_ai999x-1.1.0.dist-info/WHEEL +4 -0
- optimization_ai999x-1.1.0.dist-info/entry_points.txt +2 -0
- optimization_ai999x-1.1.0.dist-info/licenses/LICENSE +204 -0
- optimization_ai999x-1.1.0.dist-info/licenses/NOTICE +8 -0
- optimization_ai999x-1.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"""optimization-ai999x — offline optimization answers with their formula, steps and verification.
|
|
2
|
+
|
|
3
|
+
import optimization_ai999x as m
|
|
4
|
+
m.ask("<a question in words>").show()
|
|
5
|
+
m.formulas() # every certified capability
|
|
6
|
+
|
|
7
|
+
72 certified capabilities: linear and integer programming (exact rational simplex with dual certificates, graphical
|
|
8
|
+
LPs, shadow prices), calculus and quadratic optimisation (classic max/min word problems, polynomial extrema on an
|
|
9
|
+
interval, critical points, unconstrained and equality-constrained quadratic programs, a steepest-descent step),
|
|
10
|
+
networks (shortest paths, Bellman-Ford, all pairs, spanning tree, max flow / min cut, min-cost flow, transportation,
|
|
11
|
+
assignment, matchings), combinatorial optimisation (knapsack, set cover, facility location, bin packing, travelling
|
|
12
|
+
salesman, graph colouring, vertex cover), inventory (EOQ family, reorder point, newsvendor, Littlewood, Wagner-Whitin),
|
|
13
|
+
queueing (M/M/1, M/M/c, M/M/c/K, Erlang B, M/G/1, machine repair, staffing), scheduling (SPT, WSPT, EDD,
|
|
14
|
+
Moore-Hodgson, Johnson, parallel machines, CPM, PERT), game theory (zero-sum games, pure and mixed Nash equilibria),
|
|
15
|
+
multi-criteria decisions (TOPSIS, weighted sum and product models, AHP) and discounted Markov decision processes.
|
|
16
|
+
Where an optimum is attained by several solutions the optimal VALUE is the answer and a solution is labelled an
|
|
17
|
+
example. Built by the AI999X model machine from the same engine as every domain; a question that is not determined
|
|
18
|
+
is refused rather than guessed.
|
|
19
|
+
|
|
20
|
+
>>> m.ask("Solve the transportation problem with supply [20, 30], demand [10, 25, 15] and cost matrix [[2, 3, 1], [5, 4, 8]].").values["min_cost"]
|
|
21
|
+
150.0
|
|
22
|
+
>>> m.solve("zero_sum_2x2", A=[[3, -1], [-2, 4]]).values["value"]
|
|
23
|
+
1.0
|
|
24
|
+
|
|
25
|
+
Creator / engineer: Ibnul Jaif Farabi. Company: AI999X.
|
|
26
|
+
"""
|
|
27
|
+
from __future__ import annotations
|
|
28
|
+
|
|
29
|
+
from pathlib import Path
|
|
30
|
+
|
|
31
|
+
try: # the installed package carries its own copy of the engine
|
|
32
|
+
from ._engine import Answer
|
|
33
|
+
from ._engine.product import Product
|
|
34
|
+
except ImportError: # the factory's source tree, during development
|
|
35
|
+
from ai999x_factory.runtime import Answer
|
|
36
|
+
from ai999x_factory.runtime.product import Product
|
|
37
|
+
|
|
38
|
+
__version__ = "1.1.0"
|
|
39
|
+
_P = Product("optimization", [Path(__file__).resolve().parent / "pack", Path(__file__).resolve().parents[3]])
|
|
40
|
+
pack, ask, solve, compile_problem = _P.pack, _P.ask, _P.solve, _P.compile_problem
|
|
41
|
+
formula, formulas, quantities, conditions, capabilities = _P.formula, _P.formulas, _P.quantities, _P.conditions, _P.capabilities
|
|
42
|
+
examples, family_examples, structured_example, to_si = _P.examples, _P.family_examples, _P.structured_example, _P.to_si
|
|
43
|
+
templates, procedure_examples = _P.templates, _P.procedure_examples
|
|
44
|
+
prove, derivations, about = _P.prove, _P.derivations, (lambda: {**_P.about(), "version": __version__, "engine": _P.engine()})
|
|
45
|
+
knowledge, lookup, related = _P.knowledge, _P.lookup, _P.related
|
|
46
|
+
plot, plot_relation, search = _P.plot, _P.plot_relation, _P.search # figures (SVG) and capability search ([search])
|
|
47
|
+
figures, engine = _P.figures, _P.engine # live figures and the engine in use: the Rust engine on Windows/Linux x86_64
|
|
48
|
+
__all__ = ["ask", "solve", "prove", "derivations", "about", "formula", "formulas", "quantities", "conditions", "capabilities",
|
|
49
|
+
"compile_problem", "pack", "Answer", "plot", "plot_relation", "search", "figures", "engine", "__version__"]
|
|
Binary file
|