The Simplex Optimizer backend is a FastAPI application that exposes seven solver groups—covering linear programming, binary and pure integer programming, single-variable optimization, multivariable gradient descent, and constrained nonlinear programming via KKT—through a single REST API. Every route follows the same conventions: POST to aDocumentation 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.
/solve endpoint with a JSON body, GET a /health endpoint to verify liveness, and read back a structured JSON response. There is no authentication layer; the API is open by design for local and classroom use.
Base URL
| Environment | URL |
|---|---|
| Development | http://localhost:8000 |
| Production | Your deployed backend URL |
/api/v1/.
Authentication
No authentication is required. The API is open—send requests directly without any token, API key, or session cookie.Content Type
AllPOST requests must include the header:
Endpoints
The table below lists all 15 endpoints exposed by the API.| Method | Path | Description |
|---|---|---|
POST | /api/v1/simplex/solve | Solve a linear programme via the Big-M Simplex method |
GET | /api/v1/simplex/health | Health check for the simplex service |
POST | /api/v1/binary/solve | Solve a binary integer programme via Branch & Bound |
GET | /api/v1/binary/health | Health check for the binary service |
POST | /api/v1/integer/solve | Solve a pure integer programme via Branch & Bound |
GET | /api/v1/integer/health | Health check for the integer service |
POST | /api/v1/bisection/solve | Optimize a single-variable polynomial via bisection on f′(x) |
GET | /api/v1/bisection/health | Health check for the bisection service |
POST | /api/v1/newton/solve | Optimize a single-variable polynomial via Newton-Raphson |
GET | /api/v1/newton/health | Health check for the Newton service |
POST | /api/v1/gradient/solve | Optimize a multivariable function via gradient descent/ascent |
POST | /api/v1/gradient/graphical | Compute surface or volume grid data for a multivariable function |
GET | /api/v1/gradient/health | Health check for the gradient service |
POST | /api/v1/kkt/solve | Solve a constrained NLP via Karush-Kuhn-Tucker conditions |
GET | /api/v1/kkt/health | Health check for the KKT service |
Error Responses
Validation errors are handled by Pydantic v2 and FastAPI and return an HTTP422 Unprocessable Entity with a structured detail array. Each item in the array identifies the location of the invalid field (loc), a human-readable message (msg), and an error type string (type).
All solver endpoints also raise
422 for domain-level errors—for example, when constraint coefficient lengths do not match the objective function length. The detail field will contain a plain string in that case rather than the structured Pydantic array.Interactive Documentation
FastAPI automatically generates two interactive API explorers from the OpenAPI schema:- Swagger UI — http://localhost:8000/docs
Test requests directly from the browser with a full form-based interface. - ReDoc — http://localhost:8000/redoc
A read-friendly reference layout with schema details and examples.
Endpoint Groups
Simplex (LP)
Solve linear programmes with 2–5 variables using the Big-M Simplex method. Includes graphical output for two-variable problems.
Binary Integer
Solve binary (0/1) integer programmes via Branch & Bound, with a full enumeration tree returned in the response.
Pure Integer
Solve pure integer programmes via Branch & Bound with variable-specific lower and upper bound branching.
Bisection
Find optima of single-variable polynomials by applying bisection to the first derivative f′(x).
Newton-Raphson
Find optima of single-variable polynomials using second-order Newton-Raphson iteration on f′(x).
Gradient Descent
Optimize symbolic multivariable functions (2–3 variables) via gradient descent or ascent, with optional graphical surface data.
KKT
Solve constrained nonlinear programmes by enumerating active-constraint combinations and applying KKT conditions via multivariable Newton.