TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/FabianeloV/Metodo-simplex/llms.txt
Use this file to discover all available pages before exploring further.
/api/v1/kkt/solve endpoint solves nonlinear constrained optimization problems using the Karush-Kuhn-Tucker (KKT) conditions. The solver enumerates every combination of inequality constraints that could be active at the solution, constructs the corresponding KKT stationarity system, and solves it via multivariate Newton’s method. All explored cases — valid and infeasible — are reported, along with the best feasible point.
Request
POST /api/v1/kkt/solve
Symbolic expression of the objective function using Python/SymPy syntax. Must reference only the variable names listed in
variables.Example: "x**2 + y**2", "x**2 + 2*y**2 - x*y".List of variable names used in
expression. Must contain 2 or 3 elements. Order determines the coordinate order throughout the response.Example: ["x", "y"] or ["x", "y", "z"].Optimisation direction. Accepted values:
"max" or "min".Between 1 and 5 constraints. Each constraint defines one inequality or equality condition. Equality constraints (
"=") are always active; inequality constraints are activated in all possible combinations during the case enumeration.Response
A successful call returns aKKTResponse object.
Overall outcome. One of:
"optimal"— at least one case yielded a valid KKT point satisfying all constraints."infeasible"— no valid KKT point was found across all explored cases.
Variable names echoed from the request.
Human-readable representation of the objective function as parsed by SymPy.
"max" or "min" — echoed from the request.Human-readable string representation of each constraint (e.g.
["x + y >= 1"]), in the same order as the request constraints array.Coordinates of the best valid KKT point found, in the same variable order as
variables. null if status is "infeasible".Objective function value at
optimal_point. null if status is "infeasible".case_id of the KKTCase that produced the optimal point. null if status is "infeasible".All KKT cases explored by the solver — one case per combination of active inequality constraints, plus all equality constraints.
Total number of KKT cases evaluated (always equals
len(cases)).Human-readable summary of the overall result.
Example
Minimize f(x, y) = x² + y² subject to:- x + y ≥ 1
The solver always includes a case with
active_indices: [] (all inequality constraints inactive), which corresponds to the unconstrained optimum. If that point satisfies all constraints it is returned immediately; otherwise the solver proceeds to cases with active constraints.For a minimization problem, the dual feasibility condition requires all
mu multipliers for >= inequality constraints to be non-negative (mu ≥ 0). Cases where this condition is violated are labelled "dual_infeasible" and excluded from the optimal selection.Health Check
GET /api/v1/kkt/health
Returns a liveness confirmation for the KKT Constrained Optimization service.