Endpoints: 135,583MCP servers: 37,371Payout addresses: 4,237Paid calls: 7,206Letters: 91Defects: 3,819counted 4 min ago
teppi

Server definition

Hash
sha256:aaf8b855d05fb766f2913bc9ce041fee3fe4c187767e626e4970a93908028fda
What it is
What a remote MCP server returned when asked what it offers: 11 tools

The blob, as servednamed by its sha256

{ "instructions": null, "tools": [ { "description": "Tune charge power weights for the battery peak-shaving template.\n\nSame payment as autotune_template: X-API-Key spends 1 autotune credit, and\na missing key or an empty pack is HTTP 402 for x402.", "inputSchema": { "additionalProperties": false, "properties": { "max_trials": { "default": 20, "description": "Optuna trials for the battery peak-shaving plant. Default 20. Values below 1 are raised to 1. Paid at $2.00: X-API-Key spends 1 autotune credit, or HTTP 402 is x402 Base USDC. Each call starts a new study.", "type": "integer" } }, "type": "object" }, "name": "autotune_battery_peak_shaving", "outputSchema": { "additionalProperties": true, "type": "object" } }, { "description": "Tune a linear plant and write a zero-heap C99 bundle.\n\nThe reply's ``codegen`` object lists ``mpc_bundle.h`` and ``mpc_bundle.c``\nplus ``usage_example_c`` and ``controller_kind``. A linear plant is a\ncondensed QP (``linear_qp``). A nonlinear plant, including differential\ndrive, is a linearized iteration (``linearized_rti``): one Jacobian of ``f``\nat the current ``(x, u, d)``, then projected-gradient steps. That is not a full\nnonlinear SQP and not acados SQP-RTI. The exported acados controller is a real SQP;\n``SQP_RTI`` is that backend's one-quadratic-program-per-tick mode. Compile with\n``gcc -O3 -std=c99 -Wall -Wextra -fPIC -shared -lm``. Each control step is\n``mpc_compute_u0`` then, after the plant measurement, ``mpc_observer_update``.\nNeither function allocates on the heap. ``MPC_NX``, ``MPC_NU``, ``MPC_ND``,\nand ``MPC_HORIZON`` in the header are the array sizes.\n\nSame payment as autotune_template: X-API-Key spends 1 autotune credit, and\na missing key or an empty pack is HTTP 402 for x402.", "inputSchema": { "additionalProperties": false, "properties": { "max_trials": { "default": 1, "description": "Optuna trials before the C99 bundle is written. Default 1. Values below 1 are raised to 1. Paid at $2.00: X-API-Key spends 1 autotune credit, or HTTP 402 is x402 Base USDC. Each call starts a new study and writes a new bundle.", "type": "integer" } }, "type": "object" }, "name": "autotune_embedded_controller_with_c_codegen", "outputSchema": { "additionalProperties": true, "type": "object" } }, { "description": "Tune valve weights for the three-layer root-zone irrigation template.\n\nSame payment as autotune_template: X-API-Key spends 1 autotune credit, and\na missing key or an empty pack is HTTP 402 for x402. The default study is\nphysics-v1. Pass study_version published to run the older scenario.", "inputSchema": { "additionalProperties": false, "properties": { "max_trials": { "default": 20, "description": "Optuna trials for the root-zone irrigation plant. Default 20. Values below 1 are raised to 1. Paid at $2.00: X-API-Key spends 1 autotune credit, or HTTP 402 is x402 Base USDC. Each call starts a new study.", "type": "integer" }, "study_version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Omit for physics-v1 (start [0.17, 0.22, 0.22], horizon 9). published keeps the older start-on-reference horizon 24 scenario." } }, "type": "object" }, "name": "autotune_root_zone_irrigation", "outputSchema": { "additionalProperties": true, "type": "object" } }, { "description": "Tune differential_drive, battery_peak_shaving, or root_zone_irrigation.\n\nThis is POST /v1/templates/autotune at $2.00. The name is differential_drive,\nbattery_peak_shaving, or root_zone_irrigation. The reply returns tuned\nQ, R, Rd, and Qf. Send name and max_trials.\nSend header X-API-Key when a $15 pack still has autotune credits. One call\nspends 1 of those credits. With no key, or when the credits are gone, the\ncall is HTTP 402 and an agent pays with x402. The reply returns the tuned\nweights for that template. Payment uses the same gate as the HTTP route.", "inputSchema": { "additionalProperties": false, "properties": { "request": { "additionalProperties": false, "description": "Paid template tune at $2.00 for differential_drive, battery_peak_shaving, or root_zone_irrigation. Send X-API-Key (spends 1 autotune credit) or pay HTTP 402 with x402 on Base USDC. Validate a custom plant free first; these three names are built in. Each call starts a new study.", "properties": { "max_trials": { "default": 20, "description": "Optuna trials for that plant. Default 20, must be >= 1 and <= 30.", "maximum": 30, "minimum": 1, "type": "integer" }, "name": { "description": "Built-in plant: root_zone_irrigation, battery_peak_shaving, or differential_drive.", "enum": [ "root_zone_irrigation", "battery_peak_shaving", "differential_drive" ], "type": "string" }, "study_version": { "anyOf": [ { "enum": [ "published", "physics-v1" ], "type": "string" }, { "type": "null" } ], "default": null, "description": "Irrigation only. Omit for physics-v1: start [0.17, 0.22, 0.22], comfort reference, horizon 9. published keeps the older start-on-reference horizon 24 scenario." } }, "required": [ "name" ], "type": "object" } }, "required": [ "request" ], "type": "object" }, "name": "autotune_template", "outputSchema": { "additionalProperties": true, "type": "object" } }, { "description": "Read one autotune job started by ``start_autotune_job``.\n\n``status`` is ``running``, ``complete``, or ``failed``. On ``complete``,\n``result`` holds the Pareto-best weights, overshoot, settling time, RMSE,\nand solve time. ``pareto_profiles`` names up to three points already evaluated\n(tight tracking, balanced, smooth) and ``pareto_points`` is the plot cloud.\nThe top-level ``Q``, ``R``, ``Rd``, and ``Qf`` stay the study winner.\nPoll again while it is ``running``. When payment enforcement\nis on, pass the ``job_token`` from the start call or the ``X-Job-Token``\nheader. A failed job reports ``autotune_failed``.", "inputSchema": { "additionalProperties": false, "properties": { "job_id": { "description": "Job id returned by start_autotune_job.", "type": "string" }, "job_token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Token returned with the job when payment enforcement is on. Omit it when the X-Job-Token header carries the same token. This poll is free and does not spend a credit." } }, "required": [ "job_id" ], "type": "object" }, "name": "get_autotune_job", "outputSchema": { "additionalProperties": true, "type": "object" } }, { "description": "Fit a discrete linear A, B, and dt from logged (t, u, y) samples.\n\nThis tool stays free when payment enforcement is on. It does not call\nIPOPT. Pass the returned matrices to ``solve_mpc`` as a linear system.\nSend 4 to 2000 samples. Each ``y`` has length 1..24 and each ``u`` has\nlength 1..12, the same widths on every row, all finite, with strictly\nincreasing timestamps. Anything else is rejected before the fit.", "inputSchema": { "additionalProperties": false, "properties": { "request": { "additionalProperties": false, "description": "Logged (t, u, y) samples for a free discrete linear fit. No X-API-Key and no x402 charge. Pass A, B, and dt to solve_mpc after a free validate_problem.", "properties": { "samples": { "description": "Logged (t, u, y) rows. Length 4 to 2000. This fit is free: no X-API-Key and no x402 charge.", "items": { "additionalProperties": false, "description": "One logged sample. ``u`` and ``y`` are scalars or vectors.", "properties": { "t": { "description": "Sample time. Must be finite, and strictly increasing from row to row. Use one time unit for the whole log.", "type": "number" }, "u": { "description": "Input sample, length 1 to 12. A scalar is wrapped as a one-element list. Every row uses the same length.", "items": { "type": "number" }, "maxItems": 12, "minItems": 1, "type": "array" }, "y": { "description": "Output sample, length 1 to 24. A scalar is wrapped as a one-element list. Every row uses the same length.", "items": { "type": "number" }, "maxItems": 24, "minItems": 1, "type": "array" } }, "required": [ "t", "u", "y" ], "type": "object" }, "maxItems": 2000, "minItems": 4, "type": "array" } }, "required": [ "samples" ], "type": "object" } }, "required": [ "request" ], "type": "object" }, "name": "identify_discrete_plant", "outputSchema": { "additionalProperties": true, "type": "object" } }, { "description": "Clear one session's shifted primal and dual.\n\nNext ``solve_mpc`` / ``POST /v1/solve`` with this ``session_id`` is cold.\nThe compiled solver stays. Stateless calls omit ``session_id`` and already\nclear warm-start memory, so they do not use this tool.", "inputSchema": { "additionalProperties": false, "properties": { "session_id": { "description": "Session id whose warm-start seed to drop. Required, and at most 128 characters. Free: it does not spend a credit. The compiled solver stays. The next solve_mpc with this id is a cold start. Clearing an unknown id changes nothing.", "type": "string" } }, "required": [ "session_id" ], "type": "object" }, "name": "reset_warm_start", "outputSchema": { "additionalProperties": true, "type": "object" } }, { "description": "Free closed-loop tracking check. Call validate_problem first.\n\nThis is POST /v1/simulate. It stays free. The rollout shows whether the\ncurrent weights track the reference. Call start_autotune_job at $1.50 when\nthe motion oscillates or misses the target.", "inputSchema": { "additionalProperties": false, "properties": { "request": { "additionalProperties": false, "description": "Free closed-loop rollout. No X-API-Key and no x402 charge. Call validate_problem first. Call start_autotune_job at $1.50 when the rollout oscillates or misses the target.", "properties": { "Q": { "description": "Stage state weight, shape nx by nx.", "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "Qf": { "description": "Terminal state weight, shape nx by nx.", "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "R": { "description": "Input weight, shape nu by nu.", "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "Rd": { "description": "Slew weight on delta-u, shape nu by nu.", "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "U_ref": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Input reference over the horizon, shape N by nu. Omit for the equilibrium input." }, "X_ref": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "State reference over the horizon, shape (N+1) by nx. Omit to hold x_ref." }, "actuator_delay_ms": { "anyOf": [ { "maximum": 5000, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "Optional delay in milliseconds. Used only when actuator_delay_steps is 0. Converted with round(ms / (dt * 1000)) and clamped to 0..5." }, "actuator_delay_steps": { "default": 0, "description": "Commands already in flight before the one being solved. 0 leaves the solve unchanged. Values outside 0..5 are clamped.", "type": "integer" }, "cmd_vel_frame_id": { "default": "base_link", "description": "frame_id on TwistStamped exports. Default base_link. Letters, digits, underscore, slash, and hyphen only.", "maxLength": 64, "minLength": 1, "type": "string" }, "codegen": { "default": false, "description": "Ask for the compiled oracle. Anonymous callers are forced to false so this route cannot invoke gcc. Authenticated callers may leave it true.", "type": "boolean" }, "constraints": { "anyOf": [ { "additionalProperties": false, "description": "Allowlisted rows ``h(x, u, p) <= 0`` and fixed obstacle slots.\n\nSoft rows use one slack per node. ``hard`` true removes those slacks.\nA linear plant with any row here uses the nonlinear solver. The linear-only solver option is rejected.", "properties": { "h": { "description": "Scalar rows, each h(x, u, p) <= 0. At most 8. Symbols are x[i], u[i], p[i], and pi. Same length, depth, and node caps as expression dynamics.", "items": { "type": "string" }, "maxItems": 8, "type": "array" }, "hard": { "default": false, "description": "True enforces the rows with no slack. Default false.", "type": "boolean" }, "obstacles": { "anyOf": [ { "additionalProperties": false, "description": "At most eight circles. Their four numbers each sit outside ``np <= 8``.", "properties": { "position": { "description": "Two distinct state indexes for the circle plane. Example: [0, 1].", "items": { "type": "integer" }, "maxItems": 2, "minItems": 2, "type": "array" }, "slots": { "description": "Circle slots. Length 1 to 8. Each is cx, cy, r, active.", "items": { "additionalProperties": false, "description": "One fixed circle. ``active`` is 0 or 1 and is not part of caller ``p``.", "properties": { "active": { "description": "1 keeps the circle. 0 drops the row. No other value is accepted.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "cx": { "description": "Center along the first position index, in the plant's state units.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "cy": { "description": "Center along the second position index, in the plant's state units.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "r": { "description": "Radius. Must be >= 0.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "vx": { "default": 0, "description": "Constant velocity along the first position index. Omit for 0.", "type": "number" }, "vy": { "default": 0, "description": "Constant velocity along the second position index. Omit for 0.", "type": "number" }, "vz": { "default": 0, "description": "Constant vertical velocity. Omit for 0. Planar circles ignore it.", "type": "number" } }, "required": [ "cx", "cy", "r", "active" ], "type": "object" }, "maxItems": 8, "minItems": 1, "type": "array" } }, "required": [ "position", "slots" ], "type": "object" }, { "type": "null" } ], "default": null, "description": "Fixed circles. Omit for none. The row is active * (r^2 - squared distance) <= 0." }, "p": { "description": "Caller parameters for h, length 0 to 8. On an expression plant, omit this to use the plant p. Obstacle slots do not use this vector and do not count toward the cap.", "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "maxItems": 8, "type": "array" }, "slack_l1": { "anyOf": [ { "maximum": 1000000000000, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "L1 weight on each inequality slack. Omit for 1000. Ignored when hard is true." }, "slack_l2": { "anyOf": [ { "maximum": 1000000000000, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "L2 weight on each inequality slack. Omit for 100. Ignored when hard is true." } }, "type": "object" }, { "type": "null" } ], "default": null, "description": "Optional h(x, u, p) <= 0 rows and fixed obstacle slots. Omit for none. Needs the nonlinear solver. The linear-only solver option is rejected." }, "corridor_half_width": { "anyOf": [ { "exclusiveMinimum": 0, "maximum": 100, "type": "number" }, { "type": "null" } ], "default": null, "description": "Optional half-width, in meters, of a soft corridor around the reference heading. Omit to add no corridor slacks. Nodes k = 1..N stay within this lateral distance, with a non-negative slack so a start outside the tube stays feasible." }, "costs": { "anyOf": [ { "additionalProperties": false, "description": "Path-frame and zone residuals. Economic prices stay the linear stage vectors.\n\n``linear_state_cost`` and ``linear_input_cost`` are the economic term. They are\nlinear in the node. Path samples, zone centers, half-widths, and weights are\nparameters of the compiled problem.", "properties": { "path": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "One path sample per state node, length N+1. Each sample is along, across, and heading, in the position indexes' units and the heading state's units." }, "path_frame": { "anyOf": [ { "additionalProperties": false, "description": "Squared path residuals. Heading uses both sin and 1 - cos.", "properties": { "heading": { "description": "State index of the heading. Must differ from both position indexes.", "type": "integer" }, "heading_weight": { "default": 1, "description": "Weight on both squared heading residuals, sin(heading error) and 1 - cos(heading error). Must be >= 0. Default 1. The two residuals share this weight.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "lateral_weight": { "default": 1, "description": "Weight on the squared cross-track residual. Must be >= 0. Default 1.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "longitudinal_weight": { "default": 1, "description": "Weight on the squared along-track residual. Must be >= 0. Default 1.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "position": { "description": "Two distinct state indexes of the plane the path is written in. Example: [0, 1].", "items": { "type": "integer" }, "maxItems": 2, "minItems": 2, "type": "array" } }, "required": [ "position", "heading" ], "type": "object" }, { "type": "null" } ], "default": null, "description": "Along-track, cross-track, and heading residuals. Omit for none." }, "zones": { "description": "Slack bands, at most 8. Each band is two inequalities and one slack.", "items": { "additionalProperties": false, "description": "One slack band. Inside the band the residual is zero.", "properties": { "center": { "description": "Band center, in that state's units.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "half_width": { "description": "Half width of the band. Must be >= 0.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "state": { "description": "State index this band applies to.", "minimum": 0, "type": "integer" }, "weight": { "description": "Quadratic weight on the band slack. Zero leaves the band unpaid. Must be >= 0.", "maximum": 1000000000000, "minimum": 0, "type": "number" } }, "required": [ "state", "center", "half_width", "weight" ], "type": "object" }, "maxItems": 8, "type": "array" } }, "type": "object" }, { "type": "null" } ], "default": null, "description": "Optional path-frame and zone least-squares residuals. Omit for the quadratic cost only. Needs the nonlinear solver when a path frame or a zone is set." }, "d_forecast": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Disturbance forecast, shape N by nd. Omit for a zero forecast." }, "d_hat": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Constant disturbance estimate, length nd. Omit for zeros." }, "enable_disturbance_observer": { "default": false, "description": "When true, a lightweight observer estimates a constant state bias and the MPC predicts x+ = f(x, u) + d_hat. Default false leaves the NLP unchanged.", "type": "boolean" }, "enable_stamped_cmd_vel": { "default": false, "description": "ROS 2 export only. False publishes geometry_msgs/Twist. True publishes TwistStamped. The solve is unchanged.", "type": "boolean" }, "iteration_mode": { "default": "full", "description": "full is the default and runs IPOPT to the request's iteration cap. rti takes at most two warm-started iterations, then resolves with the full cap only when the constraint residual is still above 1e-2.", "enum": [ "full", "rti" ], "type": "string" }, "linear_input_cost": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Economic stage price on each input node, length nu. Linear, not squared. Omit for zeros." }, "linear_state_cost": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Economic stage price on each state node, length nx. Linear, not squared. Omit for zeros." }, "margin_tightening_m": { "anyOf": [ { "maximum": 0.15, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "Meters of worst-case obstacle penetration measured in autotune, added to the robust pad. Clamped with the observer term at 0.15 m. Omit for zero. Used only when tightening is on." }, "max_fallback_steps": { "default": 2, "description": "ROS 2 export only. Infeasible solves hold the last command for this many ticks, then publish zero and clear the delay buffer and disturbance estimate.", "maximum": 20, "minimum": 0, "type": "integer" }, "max_iter": { "default": 200, "description": "IPOPT iteration cap. Default 200, must be >= 1 and <= 500.", "maximum": 500, "minimum": 1, "type": "integer" }, "observer_clip": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Per-state saturation on d_hat, length nx, or one number used for every state. Omit for a small default so a bad odometry sample cannot wind the estimate up." }, "observer_gain": { "default": 0.25, "description": "Observer blend, clamped to 0.05..0.6. 0.25 is a slow bias tracker.", "type": "number" }, "observer_margin_gain": { "default": 1, "description": "Scale on ||d_hat_xy|| inside the robust pad. Used only when tightening is on.", "maximum": 5, "minimum": 0, "type": "number" }, "obstacles": { "description": "Up to 8 circular keep-out zones in the x-y plane. Empty adds no obstacle slacks. Each zone is softened so a start inside the circle does not make IPOPT infeasible.", "items": { "additionalProperties": false, "description": "One circular keep-out in the plant x-y plane. States 0 and 1 are the plane.", "properties": { "margin": { "default": 0, "description": "Extra clearance added to the radius. Omit for 0.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "radius": { "description": "Circle radius. Must be >= 0.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "vx": { "default": 0, "description": "Constant velocity along x. Omit for a stationary obstacle.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "vy": { "default": 0, "description": "Constant velocity along y. Omit for a stationary obstacle.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "vz": { "default": 0, "description": "Constant velocity along z. Omit for a stationary obstacle.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "x": { "description": "Center x, in the same units as state 0.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "y": { "description": "Center y, in the same units as state 1.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" } }, "required": [ "x", "y", "radius" ], "type": "object" }, "maxItems": 8, "type": "array" }, "output_weight": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Weight on the output residual z - z_ref, with z = C x + D u. Shape ny by ny. Omit for a zero weight, which leaves the quadratic cost on x and u unchanged." }, "plan_pattern": { "anyOf": [ { "maxLength": 32, "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional planner pattern. 'helix' asks the quadrotor planner for one cleared orbit." }, "plan_to_goal": { "default": false, "description": "When true, replace waypoints with a single-goal path rolled out by the plant dynamics under commands that already respect the input and slew limits. An unreachable goal is rejected instead of tracked as a guessed polyline.", "type": "boolean" }, "planner_fidelity": { "default": "fast", "description": "Kinodynamic search fidelity. Omit for fast. The try page sends high_fidelity so a live solve uses the full search.", "enum": [ "fast", "high_fidelity" ], "type": "string" }, "plant_disturbance": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Disturbance applied only inside the simulated plant step. The NLP and the offset observer's nominal model keep disturbance_hat (zeros when omitted). Omit to step the plant with disturbance_hat, which is the previous behavior." }, "qf_source": { "default": "caller", "description": "Terminal weight source. caller uses Qf as sent. discrete_riccati replaces Qf with the discrete algebraic Riccati solution of (A, B, Q, R) on a linear plant.", "enum": [ "caller", "discrete_riccati" ], "type": "string" }, "replan_tube_m": { "anyOf": [ { "exclusiveMinimum": 0, "maximum": 20, "type": "number" }, { "type": "null" } ], "default": null, "description": "Replan when the position leaves this tube around the certified tail. Omit for 0.55 m on a kinodynamic rollout, and for no replanning otherwise." }, "reset_warm_start": { "default": false, "description": "Drop this session_id's warm-start seed before the solve. Default false. The compiled solver stays.", "type": "boolean" }, "reveal_obstacle": { "anyOf": [ { "additionalProperties": false, "description": "An obstacle that appears at one closed-loop step and stays visible.", "properties": { "height": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Optional height, meters. Omit for a pillar." }, "margin": { "default": 0, "description": "Extra keep-out, meters.", "minimum": 0, "type": "number" }, "radius": { "description": "Obstacle radius, meters.", "exclusiveMinimum": 0, "type": "number" }, "step": { "description": "Closed-loop step at which the obstacle is revealed.", "maximum": 200, "minimum": 0, "type": "integer" }, "x": { "description": "Obstacle center, x, meters.", "type": "number" }, "y": { "description": "Obstacle center, y, meters.", "type": "number" } }, "required": [ "step", "x", "y", "radius" ], "type": "object" }, { "type": "null" } ], "default": null, "description": "Optional obstacle revealed mid-rollout. It invalidates the remaining tail and requests a replan." }, "robust_keepout": { "default": false, "description": "Alias of robust_margin_tightening for a closed-loop simulate. Grows each keep-out by the observer bias. Default false.", "type": "boolean" }, "robust_margin_m": { "anyOf": [ { "maximum": 2, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "Extra meters added to every keep-out radius. Omit for the nominal disk. The compiled obstacle rows stay the same; only the numeric radius changes." }, "robust_margin_tightening": { "default": false, "description": "When true, inflate every keep-out radius and shrink the corridor by gain * ||d_hat_xy|| plus margin_tightening_m. The pad is clamped to 0.15 m and the corridor never drops below 0.05 m or its original width. Default false leaves the nominal disks unchanged.", "type": "boolean" }, "scenario_forecasts": { "anyOf": [ { "items": { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Disturbance scenarios, each shaped N by nd. Omit for one forecast. One input is shared across the scenarios. Linear plants only." }, "session_id": { "anyOf": [ { "maxLength": 128, "type": "string" }, { "type": "null" } ], "default": null, "description": "Reuse this id across solve_mpc calls so the shifted primal and dual warm start stays with this closed loop. Omit it for a stateless solve. Max length 128. The seed is stored for this caller only." }, "slack_l1": { "anyOf": [ { "maximum": 1000000000000, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "L1 penalty on soft state-bound slack. Must be >= 0. Omit for the solver default 1000." }, "slack_l2": { "anyOf": [ { "maximum": 1000000000000, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "L2 penalty on soft state-bound slack. Must be >= 0. Omit for the solver default 100." }, "solver": { "default": "auto", "description": "Leave this at auto. The server selects the numerical method.", "type": "string" }, "solver_backend": { "default": "ipopt", "description": "ipopt is the browser rollout. fatrop is the same host solver as a paid solve. sqp_rti is accepted and is compiled only for an authenticated caller; an anonymous call is forced back to ipopt and never compiles C on this route.", "enum": [ "auto", "ipopt", "fatrop", "sqp_rti" ], "type": "string" }, "solver_drop_at": { "anyOf": [ { "minimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "Closed-loop step at which IPOPT stops. From there the plant holds the last command for max_fallback_steps, then hover thrust on quadrotor_3d or zeros on every other plant. Those steps are integrated. They are not included in solve_ms." }, "steps": { "default": 40, "description": "Closed-loop steps to simulate. Default 40. Must be from 1 to 200.", "maximum": 200, "minimum": 1, "type": "integer" }, "system": { "description": "Plant to control. Free validate_problem first, then this paid solve, then autotune if the weights are still unknown.", "oneOf": [ { "additionalProperties": false, "description": "Discrete or continuous linear plant.\n\nContinuous ``(A, B, Bd)`` are converted with a matrix exponential / zero-order\nhold at ``dt``. Discrete matrices are used as given. ``Bd`` defaults to ``B``\n(input disturbance) when omitted.", "properties": { "A": { "description": "State matrix, shape nx by nx, with nx <= 24. Discrete map or continuous xdot, matching time_mode.", "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "B": { "description": "Input matrix, shape nx by nu, with nu <= 12.", "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "Bd": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Disturbance matrix, shape nx by nd, with nd <= 12. Omit to reuse B as an input disturbance." }, "C": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Output matrix, shape ny by nx. Omit for identity, which uses the full state." }, "D": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Feedthrough matrix, shape ny by nu. Omit when there is no direct term." }, "N": { "description": "Prediction horizon in steps. Must be >= 1. Values above 100 are rejected.", "minimum": 1, "type": "integer" }, "dt": { "description": "Sample time. Must be > 0. Continuous plants are zero-order-hold discretized at this step. Use seconds unless A is written in another time unit.", "exclusiveMinimum": 0, "maximum": 1000000, "type": "number" }, "du_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper slew bounds on delta-u, length nu. Omit for 1e6 on each input. Slew bounds are hard." }, "du_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower slew bounds on delta-u, length nu. Omit for -1e6 on each input. Slew bounds are hard." }, "kind": { "const": "linear", "default": "linear", "description": "Plant kind. Must be \"linear\" for matrices A and B.", "type": "string" }, "time_mode": { "default": "discrete", "description": "discrete uses A and B as given. continuous is zero-order-hold discretized at dt. Default discrete.", "enum": [ "discrete", "continuous" ], "type": "string" }, "u_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper input bounds, length nu, in the plant's input units. Omit for 1e6 on each input. Input bounds are hard." }, "u_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower input bounds, length nu, in the plant's input units. Omit for -1e6 on each input. Input bounds are hard." }, "x_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper state bounds, length nx, in the plant's state units. Omit for 1e6 on each state. State bounds are soft." }, "x_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower state bounds, length nx, in the plant's state units. Omit for -1e6 on each state. State bounds are soft." } }, "required": [ "A", "B", "dt", "N", "kind" ], "type": "object" }, { "additionalProperties": false, "description": "Registered dynamics template plus a validated parameter dictionary.", "properties": { "N": { "description": "Prediction horizon in steps. Must be >= 1 and <= 100.", "maximum": 100, "minimum": 1, "type": "integer" }, "du_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper slew bounds on delta-u, length nu. Omit for 1e6 on each input. Slew bounds are hard." }, "du_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower slew bounds on delta-u, length nu. Omit for -1e6 on each input. Slew bounds are hard." }, "kind": { "const": "nonlinear", "default": "nonlinear", "description": "Plant kind. Must be \"nonlinear\" for a registered template.", "type": "string" }, "name": { "description": "Registered template: double_integrator, thermal_rc_zone, soil_moisture_cascade, unicycle_kinematics, gravity_tank, cart_pendulum, icr_skid_steer, ackermann, quadrotor_3d, thermal_valve_process, marine_usv, anti_sway_crane, process_valve, or quadrotor.", "enum": [ "double_integrator", "thermal_rc_zone", "soil_moisture_cascade", "unicycle_kinematics", "gravity_tank", "cart_pendulum", "icr_skid_steer", "ackermann", "quadrotor_3d", "thermal_valve_process", "marine_usv", "anti_sway_crane", "process_valve", "quadrotor" ], "type": "string" }, "parameters": { "additionalProperties": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "description": "Template knobs, one number per required key. double_integrator and unicycle_kinematics: dt > 0 (seconds). thermal_rc_zone: dt > 0, capacity > 0, time_constant > 0, and ambient. soil_moisture_cascade: dt > 0, capacity > 0, tau_1 > 0, tau_2 > 0, tau_3 > 0, k_12 >= 0, k_23 >= 0. gravity_tank: dt > 0, discharge > 0, inflow_gain > 0. cart_pendulum: dt, cart_mass, pole_mass, friction, inertia, gravity, and length, each > 0. icr_skid_steer: dt > 0 and slip, a signed length with abs(slip) <= 10. Body-frame lateral velocity equals slip * yaw_rate. If x_icr is the forward coordinate of the instantaneous center, positive ahead of the reference point, slip = -x_icr. ackermann: dt > 0 and wheelbase > 0. The steer component of u_min and u_max must lie inside ±1.2 rad. quadrotor_3d: dt from 0.02 to 0.05 s (20–50 Hz outer loop), gravity > 0, and drag >= 0. Inputs are roll, pitch, and thrust acceleration. Tilt bounds stay inside ±0.45 rad. Thrust bounds stay inside 0.4 g to 2 g. Optional attitude_tau_s > 0 adds a first-order roll/pitch lag, a yaw state, and a yaw-rate command. Omit it, or send 0, and the 6-state outer loop is unchanged. thermal_valve_process: dt > 0, rangeability > 1, flow_max > 0, tau_valve > 0, capacity > 0, loss >= 0, ambient, and heater_gain > 0. Valve flow is R^(valve_pos - 1). marine_usv: dt > 0, mass > 0, inertia > 0. Added mass and quadratic drag coefficients are >= 0. anti_sway_crane: dt > 0, cable_length > 0, cart_mass > 0, load_mass > 0, gravity > 0, damping >= 0. The input is cart force. Sway angle limits are soft state bounds. process_valve: dt > 0, capacitance > 0, tau > 0, cv > 0, and supply > 0. quadrotor: dt > 0, mass > 0, gravity > 0, and attitude_tau > 0. Unknown keys are rejected.", "type": "object" }, "u_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper input bounds, length nu, in the plant's input units. Omit for 1e6 on each input. Input bounds are hard." }, "u_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower input bounds, length nu, in the plant's input units. Omit for -1e6 on each input. Input bounds are hard." }, "x_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper state bounds, length nx, in the plant's state units. Omit for 1e6 on each state. State bounds are soft." }, "x_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower state bounds, length nx, in the plant's state units. Omit for -1e6 on each state. State bounds are soft." } }, "required": [ "name", "parameters", "N", "kind" ], "type": "object" }, { "additionalProperties": false, "description": "Allowlisted scalar expressions, one per state row.\n\n``time_mode`` ``continuous`` is integrated with classical RK4 at ``dt``.\n``discrete`` means each expression is already the next state. ``p`` is a\nnumeric parameter vector baked into the discrete map. ``nd`` may be 0.\nDeclaring ``nd >= 1`` and never using ``d[i]`` is accepted; detectability\nis then false because the disturbance columns of the discrete Jacobian are zero.", "properties": { "C": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Output matrix, shape ny by nx, with ny <= 8. Omit for identity." }, "N": { "description": "Prediction horizon in steps. Must be >= 1 and <= 60.", "maximum": 60, "minimum": 1, "type": "integer" }, "dt": { "description": "Sample time. Must be > 0. Continuous plants are zero-order-hold discretized at this step. Use seconds unless A is written in another time unit.", "exclusiveMinimum": 0, "maximum": 1000000, "type": "number" }, "du_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper slew bounds on delta-u, length nu. Omit for 1e6 on each input. Slew bounds are hard." }, "du_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower slew bounds on delta-u, length nu. Omit for -1e6 on each input. Slew bounds are hard." }, "f": { "description": "One scalar expression per state, length nx. Each string is at most 512 characters and the set is at most 4096. Symbols are x[i], u[i], d[i], p[i], pi, and the smooth allowlist sin, cos, tan, atan, atan2, exp, log, tanh, sqrt, hypot, sq, plus + - * / and ^2 ^3 ^4.", "items": { "type": "string" }, "maxItems": 8, "minItems": 1, "type": "array" }, "kind": { "const": "expression", "default": "expression", "description": "Plant kind. Must be \"expression\" for allowlisted scalar expressions.", "type": "string" }, "nd": { "description": "Disturbance dimension. Must be >= 0 and <= 4. Zero is a plant with no disturbance channel. An unused d[i] when nd is positive does not change the map and reports detectable false.", "maximum": 4, "minimum": 0, "type": "integer" }, "np": { "description": "Parameter dimension. Must be >= 0 and <= 8.", "maximum": 8, "minimum": 0, "type": "integer" }, "nu": { "description": "Input dimension. Must be >= 1 and <= 4.", "maximum": 4, "minimum": 1, "type": "integer" }, "nx": { "description": "State dimension. Must be >= 1 and <= 8.", "maximum": 8, "minimum": 1, "type": "integer" }, "p": { "description": "Numeric parameter values, length np. Baked into the discrete map.", "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "maxItems": 8, "type": "array" }, "time_mode": { "default": "continuous", "description": "continuous integrates the expressions with classical RK4 at dt. discrete uses each expression as the next state. Default continuous.", "enum": [ "continuous", "discrete" ], "type": "string" }, "u_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper input bounds, length nu, in the plant's input units. Omit for 1e6 on each input. Input bounds are hard." }, "u_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower input bounds, length nu, in the plant's input units. Omit for -1e6 on each input. Input bounds are hard." }, "x_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper state bounds, length nx, in the plant's state units. Omit for 1e6 on each state. State bounds are soft." }, "x_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower state bounds, length nx, in the plant's state units. Omit for -1e6 on each state. State bounds are soft." } }, "required": [ "nx", "nu", "nd", "np", "f", "dt", "N", "kind" ], "type": "object" } ] }, "terminal_level": { "anyOf": [ { "maximum": 1000000, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "Upper bound on (x_N - x_ref)^T Qf (x_N - x_ref) when terminal_set is true. Omit for max(4, nx)." }, "terminal_set": { "default": false, "description": "When true, the terminal state must lie in a sublevel set of the Qf Lyapunov function. A slack keeps a distant start feasible. Default false leaves the NLP unchanged. This constraint is solved with IPOPT.", "type": "boolean" }, "timeout_s": { "default": 2, "description": "IPOPT wall-clock budget in seconds. Default 2, must be > 0 and <= 5.", "exclusiveMinimum": 0, "maximum": 5, "type": "number" }, "tube_bound": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Elementwise magnitude of an additive state disturbance for tube tightening. Length nx. Omit to leave the bounds unchanged. Linear plants only." }, "u_prev": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Previous applied input, length nu, used by the slew penalty. Omit for zeros." }, "waypoints": { "anyOf": [ { "items": { "additionalProperties": false, "description": "One reference switch inside a browser rollout.\n\n``step`` is the closed-loop index where this ``x_ref`` becomes the solver target.\nThe solve, validate, and export bodies do not accept this object.", "properties": { "step": { "description": "Closed-loop step at which x_ref becomes active. Must be >= 0.", "minimum": 0, "type": "integer" }, "x_ref": { "description": "Reference state, one value per state. Same length as the plant nx.", "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "minItems": 1, "type": "array" } }, "required": [ "step", "x_ref" ], "type": "object" }, "maxItems": 500, "type": "array" }, { "type": "null" } ], "default": null, "description": "Optional reference switches. Each x_ref must match nx. At most 500. The active reference at a step is the latest waypoint whose step is <= the current step. Omit to keep x_ref for the whole rollout." }, "x0": { "description": "Initial state, length nx, at most 24 entries, in the plant's state units.", "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "maxItems": 24, "type": "array" }, "x_ref": { "description": "Constant state reference, length nx, at most 24 entries. Ignored for the trajectory when X_ref is set.", "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "maxItems": 24, "type": "array" }, "z_ref": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Output reference, length ny, held at every stage. Omit for zeros." } }, "required": [ "system", "x0", "x_ref", "Q", "R", "Rd", "Qf" ], "type": "object" } }, "required": [ "request" ], "type": "object" }, "name": "simulate", "outputSchema": { "additionalProperties": true, "type": "object" } }, { "description": "Solve a multi-step constrained MPC problem on the server.\n\nUse this when the horizon has soft state bounds, hard input and slew limits,\nand an offset-free disturbance rejection term. Pass the same ``session_id``\non later calls of one closed loop so the shifted primal and dual warm start\nis restored. Omit ``session_id`` for a single stateless solve.\n\nDo not call this for a one-step linear update you can do locally (a matrix\nmultiply, a threshold, or reading a sensor). Those do not need IPOPT.\nCasADi and IPOPT return u0 and the predicted trajectory for robotics,\nenergy storage, and process control. session_id is the warm start.\n\nThis is POST /v1/solve at $0.02. Send header X-API-Key when a $15 pack still\nhas solve credits. With no key, or when those credits are gone, the call is\nHTTP 402 and an agent pays with x402. There is no second payment path.\n\nSet ``reset_warm_start`` or call the ``reset_warm_start`` tool to drop the\nseed for that session. The compiled solver stays. A reset only clears the\nseed stored for the caller who owns it.", "inputSchema": { "additionalProperties": false, "properties": { "request": { "additionalProperties": false, "description": "Paid constrained solve at $0.02. Send X-API-Key while the pack has solve credits, or pay HTTP 402 with x402 on Base USDC. Validate free first. Autotune is the later step when the weights are unknown.", "properties": { "Q": { "description": "Stage state weight, shape nx by nx.", "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "Qf": { "description": "Terminal state weight, shape nx by nx.", "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "R": { "description": "Input weight, shape nu by nu.", "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "Rd": { "description": "Slew weight on delta-u, shape nu by nu.", "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "U_ref": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Input reference over the horizon, shape N by nu. Omit for the equilibrium input." }, "X_ref": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "State reference over the horizon, shape (N+1) by nx. Omit to hold x_ref." }, "actuator_delay_ms": { "anyOf": [ { "maximum": 5000, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "Optional delay in milliseconds. Used only when actuator_delay_steps is 0. Converted with round(ms / (dt * 1000)) and clamped to 0..5." }, "actuator_delay_steps": { "default": 0, "description": "Commands already in flight before the one being solved. 0 leaves the solve unchanged. Values outside 0..5 are clamped.", "type": "integer" }, "cmd_vel_frame_id": { "default": "base_link", "description": "frame_id on TwistStamped exports. Default base_link. Letters, digits, underscore, slash, and hyphen only.", "maxLength": 64, "minLength": 1, "type": "string" }, "constraints": { "anyOf": [ { "additionalProperties": false, "description": "Allowlisted rows ``h(x, u, p) <= 0`` and fixed obstacle slots.\n\nSoft rows use one slack per node. ``hard`` true removes those slacks.\nA linear plant with any row here uses the nonlinear solver. The linear-only solver option is rejected.", "properties": { "h": { "description": "Scalar rows, each h(x, u, p) <= 0. At most 8. Symbols are x[i], u[i], p[i], and pi. Same length, depth, and node caps as expression dynamics.", "items": { "type": "string" }, "maxItems": 8, "type": "array" }, "hard": { "default": false, "description": "True enforces the rows with no slack. Default false.", "type": "boolean" }, "obstacles": { "anyOf": [ { "additionalProperties": false, "description": "At most eight circles. Their four numbers each sit outside ``np <= 8``.", "properties": { "position": { "description": "Two distinct state indexes for the circle plane. Example: [0, 1].", "items": { "type": "integer" }, "maxItems": 2, "minItems": 2, "type": "array" }, "slots": { "description": "Circle slots. Length 1 to 8. Each is cx, cy, r, active.", "items": { "additionalProperties": false, "description": "One fixed circle. ``active`` is 0 or 1 and is not part of caller ``p``.", "properties": { "active": { "description": "1 keeps the circle. 0 drops the row. No other value is accepted.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "cx": { "description": "Center along the first position index, in the plant's state units.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "cy": { "description": "Center along the second position index, in the plant's state units.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "r": { "description": "Radius. Must be >= 0.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "vx": { "default": 0, "description": "Constant velocity along the first position index. Omit for 0.", "type": "number" }, "vy": { "default": 0, "description": "Constant velocity along the second position index. Omit for 0.", "type": "number" }, "vz": { "default": 0, "description": "Constant vertical velocity. Omit for 0. Planar circles ignore it.", "type": "number" } }, "required": [ "cx", "cy", "r", "active" ], "type": "object" }, "maxItems": 8, "minItems": 1, "type": "array" } }, "required": [ "position", "slots" ], "type": "object" }, { "type": "null" } ], "default": null, "description": "Fixed circles. Omit for none. The row is active * (r^2 - squared distance) <= 0." }, "p": { "description": "Caller parameters for h, length 0 to 8. On an expression plant, omit this to use the plant p. Obstacle slots do not use this vector and do not count toward the cap.", "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "maxItems": 8, "type": "array" }, "slack_l1": { "anyOf": [ { "maximum": 1000000000000, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "L1 weight on each inequality slack. Omit for 1000. Ignored when hard is true." }, "slack_l2": { "anyOf": [ { "maximum": 1000000000000, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "L2 weight on each inequality slack. Omit for 100. Ignored when hard is true." } }, "type": "object" }, { "type": "null" } ], "default": null, "description": "Optional h(x, u, p) <= 0 rows and fixed obstacle slots. Omit for none. Needs the nonlinear solver. The linear-only solver option is rejected." }, "corridor_half_width": { "anyOf": [ { "exclusiveMinimum": 0, "maximum": 100, "type": "number" }, { "type": "null" } ], "default": null, "description": "Optional half-width, in meters, of a soft corridor around the reference heading. Omit to add no corridor slacks. Nodes k = 1..N stay within this lateral distance, with a non-negative slack so a start outside the tube stays feasible." }, "costs": { "anyOf": [ { "additionalProperties": false, "description": "Path-frame and zone residuals. Economic prices stay the linear stage vectors.\n\n``linear_state_cost`` and ``linear_input_cost`` are the economic term. They are\nlinear in the node. Path samples, zone centers, half-widths, and weights are\nparameters of the compiled problem.", "properties": { "path": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "One path sample per state node, length N+1. Each sample is along, across, and heading, in the position indexes' units and the heading state's units." }, "path_frame": { "anyOf": [ { "additionalProperties": false, "description": "Squared path residuals. Heading uses both sin and 1 - cos.", "properties": { "heading": { "description": "State index of the heading. Must differ from both position indexes.", "type": "integer" }, "heading_weight": { "default": 1, "description": "Weight on both squared heading residuals, sin(heading error) and 1 - cos(heading error). Must be >= 0. Default 1. The two residuals share this weight.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "lateral_weight": { "default": 1, "description": "Weight on the squared cross-track residual. Must be >= 0. Default 1.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "longitudinal_weight": { "default": 1, "description": "Weight on the squared along-track residual. Must be >= 0. Default 1.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "position": { "description": "Two distinct state indexes of the plane the path is written in. Example: [0, 1].", "items": { "type": "integer" }, "maxItems": 2, "minItems": 2, "type": "array" } }, "required": [ "position", "heading" ], "type": "object" }, { "type": "null" } ], "default": null, "description": "Along-track, cross-track, and heading residuals. Omit for none." }, "zones": { "description": "Slack bands, at most 8. Each band is two inequalities and one slack.", "items": { "additionalProperties": false, "description": "One slack band. Inside the band the residual is zero.", "properties": { "center": { "description": "Band center, in that state's units.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "half_width": { "description": "Half width of the band. Must be >= 0.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "state": { "description": "State index this band applies to.", "minimum": 0, "type": "integer" }, "weight": { "description": "Quadratic weight on the band slack. Zero leaves the band unpaid. Must be >= 0.", "maximum": 1000000000000, "minimum": 0, "type": "number" } }, "required": [ "state", "center", "half_width", "weight" ], "type": "object" }, "maxItems": 8, "type": "array" } }, "type": "object" }, { "type": "null" } ], "default": null, "description": "Optional path-frame and zone least-squares residuals. Omit for the quadratic cost only. Needs the nonlinear solver when a path frame or a zone is set." }, "d_forecast": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Disturbance forecast, shape N by nd. Omit for a zero forecast." }, "d_hat": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Constant disturbance estimate, length nd. Omit for zeros." }, "enable_disturbance_observer": { "default": false, "description": "When true, a lightweight observer estimates a constant state bias and the MPC predicts x+ = f(x, u) + d_hat. Default false leaves the NLP unchanged.", "type": "boolean" }, "enable_stamped_cmd_vel": { "default": false, "description": "ROS 2 export only. False publishes geometry_msgs/Twist. True publishes TwistStamped. The solve is unchanged.", "type": "boolean" }, "iteration_mode": { "default": "full", "description": "full is the default and runs IPOPT to the request's iteration cap. rti takes at most two warm-started iterations, then resolves with the full cap only when the constraint residual is still above 1e-2.", "enum": [ "full", "rti" ], "type": "string" }, "linear_input_cost": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Economic stage price on each input node, length nu. Linear, not squared. Omit for zeros." }, "linear_state_cost": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Economic stage price on each state node, length nx. Linear, not squared. Omit for zeros." }, "margin_tightening_m": { "anyOf": [ { "maximum": 0.15, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "Meters of worst-case obstacle penetration measured in autotune, added to the robust pad. Clamped with the observer term at 0.15 m. Omit for zero. Used only when tightening is on." }, "max_fallback_steps": { "default": 2, "description": "ROS 2 export only. Infeasible solves hold the last command for this many ticks, then publish zero and clear the delay buffer and disturbance estimate.", "maximum": 20, "minimum": 0, "type": "integer" }, "max_iter": { "default": 200, "description": "IPOPT iteration cap. Default 200, must be >= 1 and <= 500.", "maximum": 500, "minimum": 1, "type": "integer" }, "observer_clip": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Per-state saturation on d_hat, length nx, or one number used for every state. Omit for a small default so a bad odometry sample cannot wind the estimate up." }, "observer_gain": { "default": 0.25, "description": "Observer blend, clamped to 0.05..0.6. 0.25 is a slow bias tracker.", "type": "number" }, "observer_margin_gain": { "default": 1, "description": "Scale on ||d_hat_xy|| inside the robust pad. Used only when tightening is on.", "maximum": 5, "minimum": 0, "type": "number" }, "obstacles": { "description": "Up to 8 circular keep-out zones in the x-y plane. Empty adds no obstacle slacks. Each zone is softened so a start inside the circle does not make IPOPT infeasible.", "items": { "additionalProperties": false, "description": "One circular keep-out in the plant x-y plane. States 0 and 1 are the plane.", "properties": { "margin": { "default": 0, "description": "Extra clearance added to the radius. Omit for 0.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "radius": { "description": "Circle radius. Must be >= 0.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "vx": { "default": 0, "description": "Constant velocity along x. Omit for a stationary obstacle.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "vy": { "default": 0, "description": "Constant velocity along y. Omit for a stationary obstacle.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "vz": { "default": 0, "description": "Constant velocity along z. Omit for a stationary obstacle.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "x": { "description": "Center x, in the same units as state 0.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "y": { "description": "Center y, in the same units as state 1.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" } }, "required": [ "x", "y", "radius" ], "type": "object" }, "maxItems": 8, "type": "array" }, "output_weight": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Weight on the output residual z - z_ref, with z = C x + D u. Shape ny by ny. Omit for a zero weight, which leaves the quadratic cost on x and u unchanged." }, "qf_source": { "default": "caller", "description": "Terminal weight source. caller uses Qf as sent. discrete_riccati replaces Qf with the discrete algebraic Riccati solution of (A, B, Q, R) on a linear plant.", "enum": [ "caller", "discrete_riccati" ], "type": "string" }, "reset_warm_start": { "default": false, "description": "Drop this session_id's warm-start seed before the solve. Default false. The compiled solver stays.", "type": "boolean" }, "robust_keepout": { "default": false, "description": "Alias of robust_margin_tightening for a closed-loop simulate. Grows each keep-out by the observer bias. Default false.", "type": "boolean" }, "robust_margin_m": { "anyOf": [ { "maximum": 2, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "Extra meters added to every keep-out radius. Omit for the nominal disk. The compiled obstacle rows stay the same; only the numeric radius changes." }, "robust_margin_tightening": { "default": false, "description": "When true, inflate every keep-out radius and shrink the corridor by gain * ||d_hat_xy|| plus margin_tightening_m. The pad is clamped to 0.15 m and the corridor never drops below 0.05 m or its original width. Default false leaves the nominal disks unchanged.", "type": "boolean" }, "scenario_forecasts": { "anyOf": [ { "items": { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Disturbance scenarios, each shaped N by nd. Omit for one forecast. One input is shared across the scenarios. Linear plants only." }, "session_id": { "anyOf": [ { "maxLength": 128, "type": "string" }, { "type": "null" } ], "default": null, "description": "Reuse this id across solve_mpc calls so the shifted primal and dual warm start stays with this closed loop. Omit it for a stateless solve. Max length 128. The seed is stored for this caller only." }, "slack_l1": { "anyOf": [ { "maximum": 1000000000000, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "L1 penalty on soft state-bound slack. Must be >= 0. Omit for the solver default 1000." }, "slack_l2": { "anyOf": [ { "maximum": 1000000000000, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "L2 penalty on soft state-bound slack. Must be >= 0. Omit for the solver default 100." }, "solver": { "default": "auto", "description": "Leave this at auto. The server selects the numerical method.", "type": "string" }, "solver_backend": { "default": "ipopt", "description": "Nonlinear program backend. ipopt is the existing solver and the default, so a payload that omits this field is unchanged. auto uses fatrop when this CasADi build has the plugin and the shooting NLP matches its stage-wise structure, and IPOPT otherwise. fatrop asks for that OCP solver and still falls back to IPOPT if structure detection rejects the formulation.", "enum": [ "auto", "ipopt", "fatrop" ], "type": "string" }, "system": { "description": "Plant to control. Free validate_problem first, then this paid solve, then autotune if the weights are still unknown.", "oneOf": [ { "additionalProperties": false, "description": "Discrete or continuous linear plant.\n\nContinuous ``(A, B, Bd)`` are converted with a matrix exponential / zero-order\nhold at ``dt``. Discrete matrices are used as given. ``Bd`` defaults to ``B``\n(input disturbance) when omitted.", "properties": { "A": { "description": "State matrix, shape nx by nx, with nx <= 24. Discrete map or continuous xdot, matching time_mode.", "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "B": { "description": "Input matrix, shape nx by nu, with nu <= 12.", "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "Bd": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Disturbance matrix, shape nx by nd, with nd <= 12. Omit to reuse B as an input disturbance." }, "C": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Output matrix, shape ny by nx. Omit for identity, which uses the full state." }, "D": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Feedthrough matrix, shape ny by nu. Omit when there is no direct term." }, "N": { "description": "Prediction horizon in steps. Must be >= 1. Values above 100 are rejected.", "minimum": 1, "type": "integer" }, "dt": { "description": "Sample time. Must be > 0. Continuous plants are zero-order-hold discretized at this step. Use seconds unless A is written in another time unit.", "exclusiveMinimum": 0, "maximum": 1000000, "type": "number" }, "du_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper slew bounds on delta-u, length nu. Omit for 1e6 on each input. Slew bounds are hard." }, "du_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower slew bounds on delta-u, length nu. Omit for -1e6 on each input. Slew bounds are hard." }, "kind": { "const": "linear", "default": "linear", "description": "Plant kind. Must be \"linear\" for matrices A and B.", "type": "string" }, "time_mode": { "default": "discrete", "description": "discrete uses A and B as given. continuous is zero-order-hold discretized at dt. Default discrete.", "enum": [ "discrete", "continuous" ], "type": "string" }, "u_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper input bounds, length nu, in the plant's input units. Omit for 1e6 on each input. Input bounds are hard." }, "u_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower input bounds, length nu, in the plant's input units. Omit for -1e6 on each input. Input bounds are hard." }, "x_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper state bounds, length nx, in the plant's state units. Omit for 1e6 on each state. State bounds are soft." }, "x_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower state bounds, length nx, in the plant's state units. Omit for -1e6 on each state. State bounds are soft." } }, "required": [ "A", "B", "dt", "N", "kind" ], "type": "object" }, { "additionalProperties": false, "description": "Registered dynamics template plus a validated parameter dictionary.", "properties": { "N": { "description": "Prediction horizon in steps. Must be >= 1 and <= 100.", "maximum": 100, "minimum": 1, "type": "integer" }, "du_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper slew bounds on delta-u, length nu. Omit for 1e6 on each input. Slew bounds are hard." }, "du_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower slew bounds on delta-u, length nu. Omit for -1e6 on each input. Slew bounds are hard." }, "kind": { "const": "nonlinear", "default": "nonlinear", "description": "Plant kind. Must be \"nonlinear\" for a registered template.", "type": "string" }, "name": { "description": "Registered template: double_integrator, thermal_rc_zone, soil_moisture_cascade, unicycle_kinematics, gravity_tank, cart_pendulum, icr_skid_steer, ackermann, quadrotor_3d, thermal_valve_process, marine_usv, anti_sway_crane, process_valve, or quadrotor.", "enum": [ "double_integrator", "thermal_rc_zone", "soil_moisture_cascade", "unicycle_kinematics", "gravity_tank", "cart_pendulum", "icr_skid_steer", "ackermann", "quadrotor_3d", "thermal_valve_process", "marine_usv", "anti_sway_crane", "process_valve", "quadrotor" ], "type": "string" }, "parameters": { "additionalProperties": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "description": "Template knobs, one number per required key. double_integrator and unicycle_kinematics: dt > 0 (seconds). thermal_rc_zone: dt > 0, capacity > 0, time_constant > 0, and ambient. soil_moisture_cascade: dt > 0, capacity > 0, tau_1 > 0, tau_2 > 0, tau_3 > 0, k_12 >= 0, k_23 >= 0. gravity_tank: dt > 0, discharge > 0, inflow_gain > 0. cart_pendulum: dt, cart_mass, pole_mass, friction, inertia, gravity, and length, each > 0. icr_skid_steer: dt > 0 and slip, a signed length with abs(slip) <= 10. Body-frame lateral velocity equals slip * yaw_rate. If x_icr is the forward coordinate of the instantaneous center, positive ahead of the reference point, slip = -x_icr. ackermann: dt > 0 and wheelbase > 0. The steer component of u_min and u_max must lie inside ±1.2 rad. quadrotor_3d: dt from 0.02 to 0.05 s (20–50 Hz outer loop), gravity > 0, and drag >= 0. Inputs are roll, pitch, and thrust acceleration. Tilt bounds stay inside ±0.45 rad. Thrust bounds stay inside 0.4 g to 2 g. Optional attitude_tau_s > 0 adds a first-order roll/pitch lag, a yaw state, and a yaw-rate command. Omit it, or send 0, and the 6-state outer loop is unchanged. thermal_valve_process: dt > 0, rangeability > 1, flow_max > 0, tau_valve > 0, capacity > 0, loss >= 0, ambient, and heater_gain > 0. Valve flow is R^(valve_pos - 1). marine_usv: dt > 0, mass > 0, inertia > 0. Added mass and quadratic drag coefficients are >= 0. anti_sway_crane: dt > 0, cable_length > 0, cart_mass > 0, load_mass > 0, gravity > 0, damping >= 0. The input is cart force. Sway angle limits are soft state bounds. process_valve: dt > 0, capacitance > 0, tau > 0, cv > 0, and supply > 0. quadrotor: dt > 0, mass > 0, gravity > 0, and attitude_tau > 0. Unknown keys are rejected.", "type": "object" }, "u_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper input bounds, length nu, in the plant's input units. Omit for 1e6 on each input. Input bounds are hard." }, "u_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower input bounds, length nu, in the plant's input units. Omit for -1e6 on each input. Input bounds are hard." }, "x_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper state bounds, length nx, in the plant's state units. Omit for 1e6 on each state. State bounds are soft." }, "x_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower state bounds, length nx, in the plant's state units. Omit for -1e6 on each state. State bounds are soft." } }, "required": [ "name", "parameters", "N", "kind" ], "type": "object" }, { "additionalProperties": false, "description": "Allowlisted scalar expressions, one per state row.\n\n``time_mode`` ``continuous`` is integrated with classical RK4 at ``dt``.\n``discrete`` means each expression is already the next state. ``p`` is a\nnumeric parameter vector baked into the discrete map. ``nd`` may be 0.\nDeclaring ``nd >= 1`` and never using ``d[i]`` is accepted; detectability\nis then false because the disturbance columns of the discrete Jacobian are zero.", "properties": { "C": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Output matrix, shape ny by nx, with ny <= 8. Omit for identity." }, "N": { "description": "Prediction horizon in steps. Must be >= 1 and <= 60.", "maximum": 60, "minimum": 1, "type": "integer" }, "dt": { "description": "Sample time. Must be > 0. Continuous plants are zero-order-hold discretized at this step. Use seconds unless A is written in another time unit.", "exclusiveMinimum": 0, "maximum": 1000000, "type": "number" }, "du_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper slew bounds on delta-u, length nu. Omit for 1e6 on each input. Slew bounds are hard." }, "du_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower slew bounds on delta-u, length nu. Omit for -1e6 on each input. Slew bounds are hard." }, "f": { "description": "One scalar expression per state, length nx. Each string is at most 512 characters and the set is at most 4096. Symbols are x[i], u[i], d[i], p[i], pi, and the smooth allowlist sin, cos, tan, atan, atan2, exp, log, tanh, sqrt, hypot, sq, plus + - * / and ^2 ^3 ^4.", "items": { "type": "string" }, "maxItems": 8, "minItems": 1, "type": "array" }, "kind": { "const": "expression", "default": "expression", "description": "Plant kind. Must be \"expression\" for allowlisted scalar expressions.", "type": "string" }, "nd": { "description": "Disturbance dimension. Must be >= 0 and <= 4. Zero is a plant with no disturbance channel. An unused d[i] when nd is positive does not change the map and reports detectable false.", "maximum": 4, "minimum": 0, "type": "integer" }, "np": { "description": "Parameter dimension. Must be >= 0 and <= 8.", "maximum": 8, "minimum": 0, "type": "integer" }, "nu": { "description": "Input dimension. Must be >= 1 and <= 4.", "maximum": 4, "minimum": 1, "type": "integer" }, "nx": { "description": "State dimension. Must be >= 1 and <= 8.", "maximum": 8, "minimum": 1, "type": "integer" }, "p": { "description": "Numeric parameter values, length np. Baked into the discrete map.", "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "maxItems": 8, "type": "array" }, "time_mode": { "default": "continuous", "description": "continuous integrates the expressions with classical RK4 at dt. discrete uses each expression as the next state. Default continuous.", "enum": [ "continuous", "discrete" ], "type": "string" }, "u_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper input bounds, length nu, in the plant's input units. Omit for 1e6 on each input. Input bounds are hard." }, "u_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower input bounds, length nu, in the plant's input units. Omit for -1e6 on each input. Input bounds are hard." }, "x_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper state bounds, length nx, in the plant's state units. Omit for 1e6 on each state. State bounds are soft." }, "x_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower state bounds, length nx, in the plant's state units. Omit for -1e6 on each state. State bounds are soft." } }, "required": [ "nx", "nu", "nd", "np", "f", "dt", "N", "kind" ], "type": "object" } ] }, "terminal_level": { "anyOf": [ { "maximum": 1000000, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "Upper bound on (x_N - x_ref)^T Qf (x_N - x_ref) when terminal_set is true. Omit for max(4, nx)." }, "terminal_set": { "default": false, "description": "When true, the terminal state must lie in a sublevel set of the Qf Lyapunov function. A slack keeps a distant start feasible. Default false leaves the NLP unchanged. This constraint is solved with IPOPT.", "type": "boolean" }, "timeout_s": { "default": 2, "description": "IPOPT wall-clock budget in seconds. Default 2, must be > 0 and <= 5.", "exclusiveMinimum": 0, "maximum": 5, "type": "number" }, "tube_bound": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Elementwise magnitude of an additive state disturbance for tube tightening. Length nx. Omit to leave the bounds unchanged. Linear plants only." }, "u_prev": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Previous applied input, length nu, used by the slew penalty. Omit for zeros." }, "x0": { "description": "Initial state, length nx, at most 24 entries, in the plant's state units.", "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "maxItems": 24, "type": "array" }, "x_ref": { "description": "Constant state reference, length nx, at most 24 entries. Ignored for the trajectory when X_ref is set.", "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "maxItems": 24, "type": "array" }, "z_ref": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Output reference, length ny, held at every stage. Omit for zeros." } }, "required": [ "system", "x0", "x_ref", "Q", "R", "Rd", "Qf" ], "type": "object" } }, "required": [ "request" ], "type": "object" }, "name": "solve_mpc", "outputSchema": { "additionalProperties": true, "type": "object" } }, { "description": "Paid at $1.50. Call free validate_problem and free simulate first.\n\nCall this when manual Q, R, Rd, and Qf oscillate or miss the target.\nThen poll ``get_autotune_job``.\n\nThe tuner needs discrete or continuous linear matrices A and B, one of\ndouble_integrator, thermal_rc_zone, soil_moisture_cascade, cart_pendulum,\nunicycle_kinematics, gravity_tank, icr_skid_steer, and ackermann, or a kind\nexpression plant with one allowlisted scalar expression per state row.\nExpressions outside that allowlist are rejected. Optional h rows and fixed\nobstacle slots, path-frame residuals, and zone bands are accepted.\n\nCall this when the weights are unknown and you can afford a closed-loop\nstudy with plant mismatch. Optuna tunes Q, R, Rd, and Qf on the single\nscenario in the request and reports overshoot and settling time. There is\nno scenario bank and no never-worse check: the result is the best trial of\nthat study, not a comparison with weights you already have. It is an alternative to manual PID or\nhand-tuned MPC. The reply is a ``job_id``. When payment\nenforcement is on it also includes a ``job_token`` for ``get_autotune_job``.\nIt does not contain the weights. Poll until ``status`` is ``complete`` or\n``failed``. The finished result's ``Q``, ``R``, ``Rd``, and ``Qf`` are the\nphysical weights. ``normalized_Q`` and its siblings are the unitless search box.\n\nPayment settles when the job is accepted onto the queue, not when the study\nfinishes. This is POST /v1/autotune at $1.50. Send header X-API-Key when a\n$15 pack still has an autotune credit. With no key, or when those credits\nare gone, the call is HTTP 402 and an agent pays with x402. A full queue is HTTP 429 and is not charged. The template study uses sampler seed 7. The study itself stops\nat ``timeout_seconds``. A process restart marks leftover ``running`` rows\n``failed`` with ``interrupted_by_restart`` instead of deleting a paid job.", "inputSchema": { "additionalProperties": false, "properties": { "request": { "additionalProperties": false, "description": "Paid at $1.50. Call free validate_problem and free simulate first. Call this when the weights oscillate or miss the target. Send X-API-Key or pay the HTTP 402 with x402 on Base USDC. Poll get_autotune_job with the returned job_id.", "properties": { "constraints": { "anyOf": [ { "additionalProperties": false, "description": "Allowlisted rows ``h(x, u, p) <= 0`` and fixed obstacle slots.\n\nSoft rows use one slack per node. ``hard`` true removes those slacks.\nA linear plant with any row here uses the nonlinear solver. The linear-only solver option is rejected.", "properties": { "h": { "description": "Scalar rows, each h(x, u, p) <= 0. At most 8. Symbols are x[i], u[i], p[i], and pi. Same length, depth, and node caps as expression dynamics.", "items": { "type": "string" }, "maxItems": 8, "type": "array" }, "hard": { "default": false, "description": "True enforces the rows with no slack. Default false.", "type": "boolean" }, "obstacles": { "anyOf": [ { "additionalProperties": false, "description": "At most eight circles. Their four numbers each sit outside ``np <= 8``.", "properties": { "position": { "description": "Two distinct state indexes for the circle plane. Example: [0, 1].", "items": { "type": "integer" }, "maxItems": 2, "minItems": 2, "type": "array" }, "slots": { "description": "Circle slots. Length 1 to 8. Each is cx, cy, r, active.", "items": { "additionalProperties": false, "description": "One fixed circle. ``active`` is 0 or 1 and is not part of caller ``p``.", "properties": { "active": { "description": "1 keeps the circle. 0 drops the row. No other value is accepted.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "cx": { "description": "Center along the first position index, in the plant's state units.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "cy": { "description": "Center along the second position index, in the plant's state units.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "r": { "description": "Radius. Must be >= 0.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "vx": { "default": 0, "description": "Constant velocity along the first position index. Omit for 0.", "type": "number" }, "vy": { "default": 0, "description": "Constant velocity along the second position index. Omit for 0.", "type": "number" }, "vz": { "default": 0, "description": "Constant vertical velocity. Omit for 0. Planar circles ignore it.", "type": "number" } }, "required": [ "cx", "cy", "r", "active" ], "type": "object" }, "maxItems": 8, "minItems": 1, "type": "array" } }, "required": [ "position", "slots" ], "type": "object" }, { "type": "null" } ], "default": null, "description": "Fixed circles. Omit for none. The row is active * (r^2 - squared distance) <= 0." }, "p": { "description": "Caller parameters for h, length 0 to 8. On an expression plant, omit this to use the plant p. Obstacle slots do not use this vector and do not count toward the cap.", "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "maxItems": 8, "type": "array" }, "slack_l1": { "anyOf": [ { "maximum": 1000000000000, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "L1 weight on each inequality slack. Omit for 1000. Ignored when hard is true." }, "slack_l2": { "anyOf": [ { "maximum": 1000000000000, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "L2 weight on each inequality slack. Omit for 100. Ignored when hard is true." } }, "type": "object" }, { "type": "null" } ], "default": null, "description": "Same h rows and obstacle slots as solve. Omit for an unconstrained study." }, "costs": { "anyOf": [ { "additionalProperties": false, "description": "Path-frame and zone residuals. Economic prices stay the linear stage vectors.\n\n``linear_state_cost`` and ``linear_input_cost`` are the economic term. They are\nlinear in the node. Path samples, zone centers, half-widths, and weights are\nparameters of the compiled problem.", "properties": { "path": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "One path sample per state node, length N+1. Each sample is along, across, and heading, in the position indexes' units and the heading state's units." }, "path_frame": { "anyOf": [ { "additionalProperties": false, "description": "Squared path residuals. Heading uses both sin and 1 - cos.", "properties": { "heading": { "description": "State index of the heading. Must differ from both position indexes.", "type": "integer" }, "heading_weight": { "default": 1, "description": "Weight on both squared heading residuals, sin(heading error) and 1 - cos(heading error). Must be >= 0. Default 1. The two residuals share this weight.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "lateral_weight": { "default": 1, "description": "Weight on the squared cross-track residual. Must be >= 0. Default 1.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "longitudinal_weight": { "default": 1, "description": "Weight on the squared along-track residual. Must be >= 0. Default 1.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "position": { "description": "Two distinct state indexes of the plane the path is written in. Example: [0, 1].", "items": { "type": "integer" }, "maxItems": 2, "minItems": 2, "type": "array" } }, "required": [ "position", "heading" ], "type": "object" }, { "type": "null" } ], "default": null, "description": "Along-track, cross-track, and heading residuals. Omit for none." }, "zones": { "description": "Slack bands, at most 8. Each band is two inequalities and one slack.", "items": { "additionalProperties": false, "description": "One slack band. Inside the band the residual is zero.", "properties": { "center": { "description": "Band center, in that state's units.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "half_width": { "description": "Half width of the band. Must be >= 0.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "state": { "description": "State index this band applies to.", "minimum": 0, "type": "integer" }, "weight": { "description": "Quadratic weight on the band slack. Zero leaves the band unpaid. Must be >= 0.", "maximum": 1000000000000, "minimum": 0, "type": "number" } }, "required": [ "state", "center", "half_width", "weight" ], "type": "object" }, "maxItems": 8, "type": "array" } }, "type": "object" }, { "type": "null" } ], "default": null, "description": "Same path-frame and zone residuals as solve. Omit to tune the quadratic cost only." }, "curriculum": { "anyOf": [ { "additionalProperties": false, "description": "Declarative stages. JSON only: there is no code to run.", "properties": { "held_out": { "description": "Required scenarios scored after the last stage. They are not used to train or to apply the cap.", "items": { "additionalProperties": false, "description": "Step-reference rollout used by the auto-tuner.", "properties": { "disturbance_onset_step": { "default": 0, "description": "Closed-loop step index when step_disturbance turns on. Default 0, must be >= 0.", "minimum": 0, "type": "integer" }, "n_steps": { "default": 40, "description": "Closed-loop steps in the scored rollout. Default 40, must be >= 1 and <= 200.", "maximum": 200, "minimum": 1, "type": "integer" }, "plant_model_mismatch_pct": { "default": 0, "description": "Plant-model mismatch in percent. The plant is scaled by 1 + pct/100. Default 0.", "type": "number" }, "seed": { "default": 0, "description": "Seed for the sensor noise. Default 0.", "type": "integer" }, "sensor_noise_std": { "default": 0, "description": "Sensor noise standard deviation, in the plant's state units. Default 0, must be >= 0.", "minimum": 0, "type": "number" }, "step_disturbance": { "anyOf": [ { "items": { "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Constant disturbance applied from disturbance_onset_step, length nd. Omit for none." }, "step_reference": { "description": "Step state reference held for the rollout, length nx.", "items": { "type": "number" }, "type": "array" }, "x0": { "description": "Initial state for the rollout, length nx, in the plant's state units.", "items": { "type": "number" }, "type": "array" } }, "required": [ "x0", "step_reference" ], "type": "object" }, "maxItems": 12, "minItems": 1, "type": "array" }, "stages": { "description": "Ordered stages. Length 1 to 4. Each stage warm-starts from the previous stage's best feasible trial.", "items": { "additionalProperties": false, "description": "One fixed bank. The numbers are the only plant the stage trains on.", "properties": { "scenarios": { "description": "Training scenarios for this stage. Length 1 to 12. The stage does not add scenarios of its own.", "items": { "additionalProperties": false, "description": "Step-reference rollout used by the auto-tuner.", "properties": { "disturbance_onset_step": { "default": 0, "description": "Closed-loop step index when step_disturbance turns on. Default 0, must be >= 0.", "minimum": 0, "type": "integer" }, "n_steps": { "default": 40, "description": "Closed-loop steps in the scored rollout. Default 40, must be >= 1 and <= 200.", "maximum": 200, "minimum": 1, "type": "integer" }, "plant_model_mismatch_pct": { "default": 0, "description": "Plant-model mismatch in percent. The plant is scaled by 1 + pct/100. Default 0.", "type": "number" }, "seed": { "default": 0, "description": "Seed for the sensor noise. Default 0.", "type": "integer" }, "sensor_noise_std": { "default": 0, "description": "Sensor noise standard deviation, in the plant's state units. Default 0, must be >= 0.", "minimum": 0, "type": "number" }, "step_disturbance": { "anyOf": [ { "items": { "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Constant disturbance applied from disturbance_onset_step, length nd. Omit for none." }, "step_reference": { "description": "Step state reference held for the rollout, length nx.", "items": { "type": "number" }, "type": "array" }, "x0": { "description": "Initial state for the rollout, length nx, in the plant's state units.", "items": { "type": "number" }, "type": "array" } }, "required": [ "x0", "step_reference" ], "type": "object" }, "maxItems": 12, "minItems": 1, "type": "array" }, "trials": { "description": "Optuna trials for this stage. Must be >= 1 and <= 40.", "maximum": 40, "minimum": 1, "type": "integer" }, "validation": { "description": "Cap scenarios for this stage. Length 1 to 12. Used by the regression cap, not as the held-out block.", "items": { "additionalProperties": false, "description": "Step-reference rollout used by the auto-tuner.", "properties": { "disturbance_onset_step": { "default": 0, "description": "Closed-loop step index when step_disturbance turns on. Default 0, must be >= 0.", "minimum": 0, "type": "integer" }, "n_steps": { "default": 40, "description": "Closed-loop steps in the scored rollout. Default 40, must be >= 1 and <= 200.", "maximum": 200, "minimum": 1, "type": "integer" }, "plant_model_mismatch_pct": { "default": 0, "description": "Plant-model mismatch in percent. The plant is scaled by 1 + pct/100. Default 0.", "type": "number" }, "seed": { "default": 0, "description": "Seed for the sensor noise. Default 0.", "type": "integer" }, "sensor_noise_std": { "default": 0, "description": "Sensor noise standard deviation, in the plant's state units. Default 0, must be >= 0.", "minimum": 0, "type": "number" }, "step_disturbance": { "anyOf": [ { "items": { "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Constant disturbance applied from disturbance_onset_step, length nd. Omit for none." }, "step_reference": { "description": "Step state reference held for the rollout, length nx.", "items": { "type": "number" }, "type": "array" }, "x0": { "description": "Initial state for the rollout, length nx, in the plant's state units.", "items": { "type": "number" }, "type": "array" } }, "required": [ "x0", "step_reference" ], "type": "object" }, "maxItems": 12, "minItems": 1, "type": "array" } }, "required": [ "scenarios", "validation", "trials" ], "type": "object" }, "maxItems": 4, "minItems": 1, "type": "array" }, "timeout_seconds": { "description": "Wall-clock budget for every stage and the held-out scoring, in seconds. Must be > 0 and <= 120.", "exclusiveMinimum": 0, "maximum": 120, "type": "number" } }, "required": [ "stages", "held_out", "timeout_seconds" ], "type": "object" }, { "type": "null" } ], "default": null, "description": "Optional JSON stages. Omit to tune the single scenario in this request. When set, each stage uses only its supplied scenarios and the held-out block is scored afterward." }, "kpi": { "additionalProperties": false, "description": "Scorecard weights and the Optuna trial and time budget.", "properties": { "control_effort_weight": { "description": "Weight on control effort in the score. Must be >= 0.", "minimum": 0, "type": "number" }, "max_optuna_trials": { "description": "Optuna trials in the study. Must be >= 1 and <= 40.", "maximum": 40, "minimum": 1, "type": "integer" }, "settling_time_weight": { "description": "Weight on settling time in the score. Must be >= 0.", "minimum": 0, "type": "number" }, "slew_penalty_weight": { "description": "Weight on input slew in the score. Must be >= 0.", "minimum": 0, "type": "number" }, "target_max_overshoot_pct": { "description": "Overshoot target in percent. Must be >= 0.", "minimum": 0, "type": "number" }, "timeout_seconds": { "description": "Study wall-clock limit in seconds. Must be > 0 and <= 120. The study stops at this budget.", "exclusiveMinimum": 0, "maximum": 120, "type": "number" } }, "required": [ "target_max_overshoot_pct", "settling_time_weight", "control_effort_weight", "slew_penalty_weight", "max_optuna_trials", "timeout_seconds" ], "type": "object" }, "scenario": { "additionalProperties": false, "description": "Closed-loop rollout the tuner scores, including mismatch and noise.", "properties": { "disturbance_onset_step": { "default": 0, "description": "Closed-loop step index when step_disturbance turns on. Default 0, must be >= 0.", "minimum": 0, "type": "integer" }, "n_steps": { "default": 40, "description": "Closed-loop steps in the scored rollout. Default 40, must be >= 1 and <= 200.", "maximum": 200, "minimum": 1, "type": "integer" }, "plant_model_mismatch_pct": { "default": 0, "description": "Plant-model mismatch in percent. The plant is scaled by 1 + pct/100. Default 0.", "type": "number" }, "seed": { "default": 0, "description": "Seed for the sensor noise. Default 0.", "type": "integer" }, "sensor_noise_std": { "default": 0, "description": "Sensor noise standard deviation, in the plant's state units. Default 0, must be >= 0.", "minimum": 0, "type": "number" }, "step_disturbance": { "anyOf": [ { "items": { "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Constant disturbance applied from disturbance_onset_step, length nd. Omit for none." }, "step_reference": { "description": "Step state reference held for the rollout, length nx.", "items": { "type": "number" }, "type": "array" }, "x0": { "description": "Initial state for the rollout, length nx, in the plant's state units.", "items": { "type": "number" }, "type": "array" } }, "required": [ "x0", "step_reference" ], "type": "object" }, "system": { "description": "Plant for the study. Free validate_problem first. This request is the paid autotune step after a solve, when the quadratic weights are still unknown.", "oneOf": [ { "additionalProperties": false, "description": "Discrete or continuous linear plant.\n\nContinuous ``(A, B, Bd)`` are converted with a matrix exponential / zero-order\nhold at ``dt``. Discrete matrices are used as given. ``Bd`` defaults to ``B``\n(input disturbance) when omitted.", "properties": { "A": { "description": "State matrix, shape nx by nx, with nx <= 24. Discrete map or continuous xdot, matching time_mode.", "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "B": { "description": "Input matrix, shape nx by nu, with nu <= 12.", "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "Bd": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Disturbance matrix, shape nx by nd, with nd <= 12. Omit to reuse B as an input disturbance." }, "C": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Output matrix, shape ny by nx. Omit for identity, which uses the full state." }, "D": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Feedthrough matrix, shape ny by nu. Omit when there is no direct term." }, "N": { "description": "Prediction horizon in steps. Must be >= 1. Values above 100 are rejected.", "minimum": 1, "type": "integer" }, "dt": { "description": "Sample time. Must be > 0. Continuous plants are zero-order-hold discretized at this step. Use seconds unless A is written in another time unit.", "exclusiveMinimum": 0, "maximum": 1000000, "type": "number" }, "du_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper slew bounds on delta-u, length nu. Omit for 1e6 on each input. Slew bounds are hard." }, "du_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower slew bounds on delta-u, length nu. Omit for -1e6 on each input. Slew bounds are hard." }, "kind": { "const": "linear", "default": "linear", "description": "Plant kind. Must be \"linear\" for matrices A and B.", "type": "string" }, "time_mode": { "default": "discrete", "description": "discrete uses A and B as given. continuous is zero-order-hold discretized at dt. Default discrete.", "enum": [ "discrete", "continuous" ], "type": "string" }, "u_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper input bounds, length nu, in the plant's input units. Omit for 1e6 on each input. Input bounds are hard." }, "u_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower input bounds, length nu, in the plant's input units. Omit for -1e6 on each input. Input bounds are hard." }, "x_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper state bounds, length nx, in the plant's state units. Omit for 1e6 on each state. State bounds are soft." }, "x_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower state bounds, length nx, in the plant's state units. Omit for -1e6 on each state. State bounds are soft." } }, "required": [ "A", "B", "dt", "N", "kind" ], "type": "object" }, { "additionalProperties": false, "description": "Registered dynamics template plus a validated parameter dictionary.", "properties": { "N": { "description": "Prediction horizon in steps. Must be >= 1 and <= 100.", "maximum": 100, "minimum": 1, "type": "integer" }, "du_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper slew bounds on delta-u, length nu. Omit for 1e6 on each input. Slew bounds are hard." }, "du_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower slew bounds on delta-u, length nu. Omit for -1e6 on each input. Slew bounds are hard." }, "kind": { "const": "nonlinear", "default": "nonlinear", "description": "Plant kind. Must be \"nonlinear\" for a registered template.", "type": "string" }, "name": { "description": "Registered template: double_integrator, thermal_rc_zone, soil_moisture_cascade, unicycle_kinematics, gravity_tank, cart_pendulum, icr_skid_steer, ackermann, quadrotor_3d, thermal_valve_process, marine_usv, anti_sway_crane, process_valve, or quadrotor.", "enum": [ "double_integrator", "thermal_rc_zone", "soil_moisture_cascade", "unicycle_kinematics", "gravity_tank", "cart_pendulum", "icr_skid_steer", "ackermann", "quadrotor_3d", "thermal_valve_process", "marine_usv", "anti_sway_crane", "process_valve", "quadrotor" ], "type": "string" }, "parameters": { "additionalProperties": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "description": "Template knobs, one number per required key. double_integrator and unicycle_kinematics: dt > 0 (seconds). thermal_rc_zone: dt > 0, capacity > 0, time_constant > 0, and ambient. soil_moisture_cascade: dt > 0, capacity > 0, tau_1 > 0, tau_2 > 0, tau_3 > 0, k_12 >= 0, k_23 >= 0. gravity_tank: dt > 0, discharge > 0, inflow_gain > 0. cart_pendulum: dt, cart_mass, pole_mass, friction, inertia, gravity, and length, each > 0. icr_skid_steer: dt > 0 and slip, a signed length with abs(slip) <= 10. Body-frame lateral velocity equals slip * yaw_rate. If x_icr is the forward coordinate of the instantaneous center, positive ahead of the reference point, slip = -x_icr. ackermann: dt > 0 and wheelbase > 0. The steer component of u_min and u_max must lie inside ±1.2 rad. quadrotor_3d: dt from 0.02 to 0.05 s (20–50 Hz outer loop), gravity > 0, and drag >= 0. Inputs are roll, pitch, and thrust acceleration. Tilt bounds stay inside ±0.45 rad. Thrust bounds stay inside 0.4 g to 2 g. Optional attitude_tau_s > 0 adds a first-order roll/pitch lag, a yaw state, and a yaw-rate command. Omit it, or send 0, and the 6-state outer loop is unchanged. thermal_valve_process: dt > 0, rangeability > 1, flow_max > 0, tau_valve > 0, capacity > 0, loss >= 0, ambient, and heater_gain > 0. Valve flow is R^(valve_pos - 1). marine_usv: dt > 0, mass > 0, inertia > 0. Added mass and quadratic drag coefficients are >= 0. anti_sway_crane: dt > 0, cable_length > 0, cart_mass > 0, load_mass > 0, gravity > 0, damping >= 0. The input is cart force. Sway angle limits are soft state bounds. process_valve: dt > 0, capacitance > 0, tau > 0, cv > 0, and supply > 0. quadrotor: dt > 0, mass > 0, gravity > 0, and attitude_tau > 0. Unknown keys are rejected.", "type": "object" }, "u_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper input bounds, length nu, in the plant's input units. Omit for 1e6 on each input. Input bounds are hard." }, "u_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower input bounds, length nu, in the plant's input units. Omit for -1e6 on each input. Input bounds are hard." }, "x_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper state bounds, length nx, in the plant's state units. Omit for 1e6 on each state. State bounds are soft." }, "x_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower state bounds, length nx, in the plant's state units. Omit for -1e6 on each state. State bounds are soft." } }, "required": [ "name", "parameters", "N", "kind" ], "type": "object" }, { "additionalProperties": false, "description": "Allowlisted scalar expressions, one per state row.\n\n``time_mode`` ``continuous`` is integrated with classical RK4 at ``dt``.\n``discrete`` means each expression is already the next state. ``p`` is a\nnumeric parameter vector baked into the discrete map. ``nd`` may be 0.\nDeclaring ``nd >= 1`` and never using ``d[i]`` is accepted; detectability\nis then false because the disturbance columns of the discrete Jacobian are zero.", "properties": { "C": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Output matrix, shape ny by nx, with ny <= 8. Omit for identity." }, "N": { "description": "Prediction horizon in steps. Must be >= 1 and <= 60.", "maximum": 60, "minimum": 1, "type": "integer" }, "dt": { "description": "Sample time. Must be > 0. Continuous plants are zero-order-hold discretized at this step. Use seconds unless A is written in another time unit.", "exclusiveMinimum": 0, "maximum": 1000000, "type": "number" }, "du_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper slew bounds on delta-u, length nu. Omit for 1e6 on each input. Slew bounds are hard." }, "du_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower slew bounds on delta-u, length nu. Omit for -1e6 on each input. Slew bounds are hard." }, "f": { "description": "One scalar expression per state, length nx. Each string is at most 512 characters and the set is at most 4096. Symbols are x[i], u[i], d[i], p[i], pi, and the smooth allowlist sin, cos, tan, atan, atan2, exp, log, tanh, sqrt, hypot, sq, plus + - * / and ^2 ^3 ^4.", "items": { "type": "string" }, "maxItems": 8, "minItems": 1, "type": "array" }, "kind": { "const": "expression", "default": "expression", "description": "Plant kind. Must be \"expression\" for allowlisted scalar expressions.", "type": "string" }, "nd": { "description": "Disturbance dimension. Must be >= 0 and <= 4. Zero is a plant with no disturbance channel. An unused d[i] when nd is positive does not change the map and reports detectable false.", "maximum": 4, "minimum": 0, "type": "integer" }, "np": { "description": "Parameter dimension. Must be >= 0 and <= 8.", "maximum": 8, "minimum": 0, "type": "integer" }, "nu": { "description": "Input dimension. Must be >= 1 and <= 4.", "maximum": 4, "minimum": 1, "type": "integer" }, "nx": { "description": "State dimension. Must be >= 1 and <= 8.", "maximum": 8, "minimum": 1, "type": "integer" }, "p": { "description": "Numeric parameter values, length np. Baked into the discrete map.", "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "maxItems": 8, "type": "array" }, "time_mode": { "default": "continuous", "description": "continuous integrates the expressions with classical RK4 at dt. discrete uses each expression as the next state. Default continuous.", "enum": [ "continuous", "discrete" ], "type": "string" }, "u_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper input bounds, length nu, in the plant's input units. Omit for 1e6 on each input. Input bounds are hard." }, "u_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower input bounds, length nu, in the plant's input units. Omit for -1e6 on each input. Input bounds are hard." }, "x_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper state bounds, length nx, in the plant's state units. Omit for 1e6 on each state. State bounds are soft." }, "x_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower state bounds, length nx, in the plant's state units. Omit for -1e6 on each state. State bounds are soft." } }, "required": [ "nx", "nu", "nd", "np", "f", "dt", "N", "kind" ], "type": "object" } ] } }, "required": [ "system", "scenario", "kpi" ], "type": "object" } }, "required": [ "request" ], "type": "object" }, "name": "start_autotune_job", "outputSchema": { "additionalProperties": { "type": "string" }, "type": "object" } }, { "description": "Free feasibility check. Call this first, then simulate, before any paid tool.\n\nThis is POST /v1/validate. It stays free when payment enforcement is on.\nIt does not use X-API-Key and it does not return HTTP 402. A failing check\nmeans the plant, bounds, or weights are not feasible. After it passes, call\nsimulate to see closed-loop tracking. Call start_autotune_job at $1.50 only\nwhen those weights oscillate or miss the target.", "inputSchema": { "additionalProperties": false, "properties": { "request": { "additionalProperties": false, "description": "Free. Call validate_problem first, then the free simulate tool, before any paid call. No X-API-Key and no x402 charge.", "properties": { "Q": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Stage state weight, shape nx by nx. Omit to skip the weight check." }, "Qf": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Terminal state weight, shape nx by nx. Omit to skip the weight check." }, "R": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Input weight, shape nu by nu. Omit to skip the weight check." }, "Rd": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Slew weight, shape nu by nu. Omit to skip the weight check." }, "constraints": { "anyOf": [ { "additionalProperties": false, "description": "Allowlisted rows ``h(x, u, p) <= 0`` and fixed obstacle slots.\n\nSoft rows use one slack per node. ``hard`` true removes those slacks.\nA linear plant with any row here uses the nonlinear solver. The linear-only solver option is rejected.", "properties": { "h": { "description": "Scalar rows, each h(x, u, p) <= 0. At most 8. Symbols are x[i], u[i], p[i], and pi. Same length, depth, and node caps as expression dynamics.", "items": { "type": "string" }, "maxItems": 8, "type": "array" }, "hard": { "default": false, "description": "True enforces the rows with no slack. Default false.", "type": "boolean" }, "obstacles": { "anyOf": [ { "additionalProperties": false, "description": "At most eight circles. Their four numbers each sit outside ``np <= 8``.", "properties": { "position": { "description": "Two distinct state indexes for the circle plane. Example: [0, 1].", "items": { "type": "integer" }, "maxItems": 2, "minItems": 2, "type": "array" }, "slots": { "description": "Circle slots. Length 1 to 8. Each is cx, cy, r, active.", "items": { "additionalProperties": false, "description": "One fixed circle. ``active`` is 0 or 1 and is not part of caller ``p``.", "properties": { "active": { "description": "1 keeps the circle. 0 drops the row. No other value is accepted.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "cx": { "description": "Center along the first position index, in the plant's state units.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "cy": { "description": "Center along the second position index, in the plant's state units.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "r": { "description": "Radius. Must be >= 0.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "vx": { "default": 0, "description": "Constant velocity along the first position index. Omit for 0.", "type": "number" }, "vy": { "default": 0, "description": "Constant velocity along the second position index. Omit for 0.", "type": "number" }, "vz": { "default": 0, "description": "Constant vertical velocity. Omit for 0. Planar circles ignore it.", "type": "number" } }, "required": [ "cx", "cy", "r", "active" ], "type": "object" }, "maxItems": 8, "minItems": 1, "type": "array" } }, "required": [ "position", "slots" ], "type": "object" }, { "type": "null" } ], "default": null, "description": "Fixed circles. Omit for none. The row is active * (r^2 - squared distance) <= 0." }, "p": { "description": "Caller parameters for h, length 0 to 8. On an expression plant, omit this to use the plant p. Obstacle slots do not use this vector and do not count toward the cap.", "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "maxItems": 8, "type": "array" }, "slack_l1": { "anyOf": [ { "maximum": 1000000000000, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "L1 weight on each inequality slack. Omit for 1000. Ignored when hard is true." }, "slack_l2": { "anyOf": [ { "maximum": 1000000000000, "minimum": 0, "type": "number" }, { "type": "null" } ], "default": null, "description": "L2 weight on each inequality slack. Omit for 100. Ignored when hard is true." } }, "type": "object" }, { "type": "null" } ], "default": null, "description": "h rows and obstacle slots to check. Omit to skip that check. The linear-only solver option is rejected." }, "costs": { "anyOf": [ { "additionalProperties": false, "description": "Path-frame and zone residuals. Economic prices stay the linear stage vectors.\n\n``linear_state_cost`` and ``linear_input_cost`` are the economic term. They are\nlinear in the node. Path samples, zone centers, half-widths, and weights are\nparameters of the compiled problem.", "properties": { "path": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "One path sample per state node, length N+1. Each sample is along, across, and heading, in the position indexes' units and the heading state's units." }, "path_frame": { "anyOf": [ { "additionalProperties": false, "description": "Squared path residuals. Heading uses both sin and 1 - cos.", "properties": { "heading": { "description": "State index of the heading. Must differ from both position indexes.", "type": "integer" }, "heading_weight": { "default": 1, "description": "Weight on both squared heading residuals, sin(heading error) and 1 - cos(heading error). Must be >= 0. Default 1. The two residuals share this weight.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "lateral_weight": { "default": 1, "description": "Weight on the squared cross-track residual. Must be >= 0. Default 1.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "longitudinal_weight": { "default": 1, "description": "Weight on the squared along-track residual. Must be >= 0. Default 1.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "position": { "description": "Two distinct state indexes of the plane the path is written in. Example: [0, 1].", "items": { "type": "integer" }, "maxItems": 2, "minItems": 2, "type": "array" } }, "required": [ "position", "heading" ], "type": "object" }, { "type": "null" } ], "default": null, "description": "Along-track, cross-track, and heading residuals. Omit for none." }, "zones": { "description": "Slack bands, at most 8. Each band is two inequalities and one slack.", "items": { "additionalProperties": false, "description": "One slack band. Inside the band the residual is zero.", "properties": { "center": { "description": "Band center, in that state's units.", "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "half_width": { "description": "Half width of the band. Must be >= 0.", "maximum": 1000000000000, "minimum": 0, "type": "number" }, "state": { "description": "State index this band applies to.", "minimum": 0, "type": "integer" }, "weight": { "description": "Quadratic weight on the band slack. Zero leaves the band unpaid. Must be >= 0.", "maximum": 1000000000000, "minimum": 0, "type": "number" } }, "required": [ "state", "center", "half_width", "weight" ], "type": "object" }, "maxItems": 8, "type": "array" } }, "type": "object" }, { "type": "null" } ], "default": null, "description": "Path-frame and zone residuals to check. Omit to skip that check." }, "d_hat": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Disturbance estimate, length nd. Omit to skip that length check." }, "linear_input_cost": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Linear input stage cost, length nu. Omit to skip that check." }, "linear_state_cost": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Linear state stage cost, length nx. Omit to skip that check." }, "output_weight": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Output residual weight, shape ny by ny. Omit to skip that check." }, "qf_source": { "default": "caller", "description": "caller checks Qf only. discrete_riccati also requires a linear plant.", "enum": [ "caller", "discrete_riccati" ], "type": "string" }, "scenario_forecasts": { "anyOf": [ { "items": { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Scenario forecasts, each N by nd. Omit to skip that check." }, "solver": { "default": "auto", "description": "Leave this at auto. The server selects the numerical method.", "type": "string" }, "system": { "description": "Plant to check. This call is free: no X-API-Key and no x402 charge. Run it before the paid solve, and before autotune.", "oneOf": [ { "additionalProperties": false, "description": "Discrete or continuous linear plant.\n\nContinuous ``(A, B, Bd)`` are converted with a matrix exponential / zero-order\nhold at ``dt``. Discrete matrices are used as given. ``Bd`` defaults to ``B``\n(input disturbance) when omitted.", "properties": { "A": { "description": "State matrix, shape nx by nx, with nx <= 24. Discrete map or continuous xdot, matching time_mode.", "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "B": { "description": "Input matrix, shape nx by nu, with nu <= 12.", "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, "Bd": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Disturbance matrix, shape nx by nd, with nd <= 12. Omit to reuse B as an input disturbance." }, "C": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Output matrix, shape ny by nx. Omit for identity, which uses the full state." }, "D": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Feedthrough matrix, shape ny by nu. Omit when there is no direct term." }, "N": { "description": "Prediction horizon in steps. Must be >= 1. Values above 100 are rejected.", "minimum": 1, "type": "integer" }, "dt": { "description": "Sample time. Must be > 0. Continuous plants are zero-order-hold discretized at this step. Use seconds unless A is written in another time unit.", "exclusiveMinimum": 0, "maximum": 1000000, "type": "number" }, "du_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper slew bounds on delta-u, length nu. Omit for 1e6 on each input. Slew bounds are hard." }, "du_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower slew bounds on delta-u, length nu. Omit for -1e6 on each input. Slew bounds are hard." }, "kind": { "const": "linear", "default": "linear", "description": "Plant kind. Must be \"linear\" for matrices A and B.", "type": "string" }, "time_mode": { "default": "discrete", "description": "discrete uses A and B as given. continuous is zero-order-hold discretized at dt. Default discrete.", "enum": [ "discrete", "continuous" ], "type": "string" }, "u_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper input bounds, length nu, in the plant's input units. Omit for 1e6 on each input. Input bounds are hard." }, "u_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower input bounds, length nu, in the plant's input units. Omit for -1e6 on each input. Input bounds are hard." }, "x_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper state bounds, length nx, in the plant's state units. Omit for 1e6 on each state. State bounds are soft." }, "x_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower state bounds, length nx, in the plant's state units. Omit for -1e6 on each state. State bounds are soft." } }, "required": [ "A", "B", "dt", "N", "kind" ], "type": "object" }, { "additionalProperties": false, "description": "Registered dynamics template plus a validated parameter dictionary.", "properties": { "N": { "description": "Prediction horizon in steps. Must be >= 1 and <= 100.", "maximum": 100, "minimum": 1, "type": "integer" }, "du_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper slew bounds on delta-u, length nu. Omit for 1e6 on each input. Slew bounds are hard." }, "du_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower slew bounds on delta-u, length nu. Omit for -1e6 on each input. Slew bounds are hard." }, "kind": { "const": "nonlinear", "default": "nonlinear", "description": "Plant kind. Must be \"nonlinear\" for a registered template.", "type": "string" }, "name": { "description": "Registered template: double_integrator, thermal_rc_zone, soil_moisture_cascade, unicycle_kinematics, gravity_tank, cart_pendulum, icr_skid_steer, ackermann, quadrotor_3d, thermal_valve_process, marine_usv, anti_sway_crane, process_valve, or quadrotor.", "enum": [ "double_integrator", "thermal_rc_zone", "soil_moisture_cascade", "unicycle_kinematics", "gravity_tank", "cart_pendulum", "icr_skid_steer", "ackermann", "quadrotor_3d", "thermal_valve_process", "marine_usv", "anti_sway_crane", "process_valve", "quadrotor" ], "type": "string" }, "parameters": { "additionalProperties": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "description": "Template knobs, one number per required key. double_integrator and unicycle_kinematics: dt > 0 (seconds). thermal_rc_zone: dt > 0, capacity > 0, time_constant > 0, and ambient. soil_moisture_cascade: dt > 0, capacity > 0, tau_1 > 0, tau_2 > 0, tau_3 > 0, k_12 >= 0, k_23 >= 0. gravity_tank: dt > 0, discharge > 0, inflow_gain > 0. cart_pendulum: dt, cart_mass, pole_mass, friction, inertia, gravity, and length, each > 0. icr_skid_steer: dt > 0 and slip, a signed length with abs(slip) <= 10. Body-frame lateral velocity equals slip * yaw_rate. If x_icr is the forward coordinate of the instantaneous center, positive ahead of the reference point, slip = -x_icr. ackermann: dt > 0 and wheelbase > 0. The steer component of u_min and u_max must lie inside ±1.2 rad. quadrotor_3d: dt from 0.02 to 0.05 s (20–50 Hz outer loop), gravity > 0, and drag >= 0. Inputs are roll, pitch, and thrust acceleration. Tilt bounds stay inside ±0.45 rad. Thrust bounds stay inside 0.4 g to 2 g. Optional attitude_tau_s > 0 adds a first-order roll/pitch lag, a yaw state, and a yaw-rate command. Omit it, or send 0, and the 6-state outer loop is unchanged. thermal_valve_process: dt > 0, rangeability > 1, flow_max > 0, tau_valve > 0, capacity > 0, loss >= 0, ambient, and heater_gain > 0. Valve flow is R^(valve_pos - 1). marine_usv: dt > 0, mass > 0, inertia > 0. Added mass and quadratic drag coefficients are >= 0. anti_sway_crane: dt > 0, cable_length > 0, cart_mass > 0, load_mass > 0, gravity > 0, damping >= 0. The input is cart force. Sway angle limits are soft state bounds. process_valve: dt > 0, capacitance > 0, tau > 0, cv > 0, and supply > 0. quadrotor: dt > 0, mass > 0, gravity > 0, and attitude_tau > 0. Unknown keys are rejected.", "type": "object" }, "u_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper input bounds, length nu, in the plant's input units. Omit for 1e6 on each input. Input bounds are hard." }, "u_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower input bounds, length nu, in the plant's input units. Omit for -1e6 on each input. Input bounds are hard." }, "x_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper state bounds, length nx, in the plant's state units. Omit for 1e6 on each state. State bounds are soft." }, "x_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower state bounds, length nx, in the plant's state units. Omit for -1e6 on each state. State bounds are soft." } }, "required": [ "name", "parameters", "N", "kind" ], "type": "object" }, { "additionalProperties": false, "description": "Allowlisted scalar expressions, one per state row.\n\n``time_mode`` ``continuous`` is integrated with classical RK4 at ``dt``.\n``discrete`` means each expression is already the next state. ``p`` is a\nnumeric parameter vector baked into the discrete map. ``nd`` may be 0.\nDeclaring ``nd >= 1`` and never using ``d[i]`` is accepted; detectability\nis then false because the disturbance columns of the discrete Jacobian are zero.", "properties": { "C": { "anyOf": [ { "items": { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Output matrix, shape ny by nx, with ny <= 8. Omit for identity." }, "N": { "description": "Prediction horizon in steps. Must be >= 1 and <= 60.", "maximum": 60, "minimum": 1, "type": "integer" }, "dt": { "description": "Sample time. Must be > 0. Continuous plants are zero-order-hold discretized at this step. Use seconds unless A is written in another time unit.", "exclusiveMinimum": 0, "maximum": 1000000, "type": "number" }, "du_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper slew bounds on delta-u, length nu. Omit for 1e6 on each input. Slew bounds are hard." }, "du_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower slew bounds on delta-u, length nu. Omit for -1e6 on each input. Slew bounds are hard." }, "f": { "description": "One scalar expression per state, length nx. Each string is at most 512 characters and the set is at most 4096. Symbols are x[i], u[i], d[i], p[i], pi, and the smooth allowlist sin, cos, tan, atan, atan2, exp, log, tanh, sqrt, hypot, sq, plus + - * / and ^2 ^3 ^4.", "items": { "type": "string" }, "maxItems": 8, "minItems": 1, "type": "array" }, "kind": { "const": "expression", "default": "expression", "description": "Plant kind. Must be \"expression\" for allowlisted scalar expressions.", "type": "string" }, "nd": { "description": "Disturbance dimension. Must be >= 0 and <= 4. Zero is a plant with no disturbance channel. An unused d[i] when nd is positive does not change the map and reports detectable false.", "maximum": 4, "minimum": 0, "type": "integer" }, "np": { "description": "Parameter dimension. Must be >= 0 and <= 8.", "maximum": 8, "minimum": 0, "type": "integer" }, "nu": { "description": "Input dimension. Must be >= 1 and <= 4.", "maximum": 4, "minimum": 1, "type": "integer" }, "nx": { "description": "State dimension. Must be >= 1 and <= 8.", "maximum": 8, "minimum": 1, "type": "integer" }, "p": { "description": "Numeric parameter values, length np. Baked into the discrete map.", "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "maxItems": 8, "type": "array" }, "time_mode": { "default": "continuous", "description": "continuous integrates the expressions with classical RK4 at dt. discrete uses each expression as the next state. Default continuous.", "enum": [ "continuous", "discrete" ], "type": "string" }, "u_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper input bounds, length nu, in the plant's input units. Omit for 1e6 on each input. Input bounds are hard." }, "u_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower input bounds, length nu, in the plant's input units. Omit for -1e6 on each input. Input bounds are hard." }, "x_max": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Upper state bounds, length nx, in the plant's state units. Omit for 1e6 on each state. State bounds are soft." }, "x_min": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Lower state bounds, length nx, in the plant's state units. Omit for -1e6 on each state. State bounds are soft." } }, "required": [ "nx", "nu", "nd", "np", "f", "dt", "N", "kind" ], "type": "object" } ] }, "tube_bound": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Tube disturbance magnitude, length nx. Omit to skip that check." }, "x0": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Initial state, length nx. Omit to skip that length check." }, "x_ref": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "State reference, length nx. Omit to skip that length check." }, "z_ref": { "anyOf": [ { "items": { "maximum": 1000000000000, "minimum": -1000000000000, "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Output reference, length ny. Omit to skip that check." } }, "required": [ "system" ], "type": "object" } }, "required": [ "request" ], "type": "object" }, "name": "validate_problem", "outputSchema": { "additionalProperties": true, "type": "object" } } ] }
Verify it yourselfcurl -s https://api.teppi.xyz/v1/evidence/sha256:aaf8b855d05fb766f2913bc9ce041fee3fe4c187767e626e4970a93908028fda | sha256sum