Skip to main content

Documentation 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.

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 a /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

EnvironmentURL
Developmenthttp://localhost:8000
ProductionYour deployed backend URL
All endpoints are prefixed with /api/v1/.

Authentication

No authentication is required. The API is open—send requests directly without any token, API key, or session cookie.

Content Type

All POST requests must include the header:
Content-Type: application/json

Endpoints

The table below lists all 15 endpoints exposed by the API.
MethodPathDescription
POST/api/v1/simplex/solveSolve a linear programme via the Big-M Simplex method
GET/api/v1/simplex/healthHealth check for the simplex service
POST/api/v1/binary/solveSolve a binary integer programme via Branch & Bound
GET/api/v1/binary/healthHealth check for the binary service
POST/api/v1/integer/solveSolve a pure integer programme via Branch & Bound
GET/api/v1/integer/healthHealth check for the integer service
POST/api/v1/bisection/solveOptimize a single-variable polynomial via bisection on f′(x)
GET/api/v1/bisection/healthHealth check for the bisection service
POST/api/v1/newton/solveOptimize a single-variable polynomial via Newton-Raphson
GET/api/v1/newton/healthHealth check for the Newton service
POST/api/v1/gradient/solveOptimize a multivariable function via gradient descent/ascent
POST/api/v1/gradient/graphicalCompute surface or volume grid data for a multivariable function
GET/api/v1/gradient/healthHealth check for the gradient service
POST/api/v1/kkt/solveSolve a constrained NLP via Karush-Kuhn-Tucker conditions
GET/api/v1/kkt/healthHealth check for the KKT service

Error Responses

Validation errors are handled by Pydantic v2 and FastAPI and return an HTTP 422 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).
{
  "detail": [
    {
      "type": "too_short",
      "loc": ["body", "objective"],
      "msg": "List should have at least 2 items after validation, not 1",
      "input": [3.0],
      "ctx": { "field_type": "List", "min_length": 2, "actual_length": 1 }
    }
  ]
}
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:

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.

Build docs developers (and LLMs) love