simple_cvxpy_solver
Solve CVXPY optimization problems by defining variables, objectives, and constraints in a simplified interface, eliminating the need for complex CVXPYProblem structures.
Instructions
A simpler interface for solving CVXPY optimization problems.
This tool provides a more straightforward interface for CVXPY problems,
without requiring the full CVXPYProblem model structure.
Args:
variables: List of variable definitions, each with 'name' and 'shape'
objective_type: Either 'minimize' or 'maximize'
objective_expr: The objective function expression as a string
constraints: List of constraint expressions as strings
parameters: Dictionary of parameter values (e.g., matrices A, b)
description: Optional description of the problem
Returns:
A list of TextContent containing the solution or an error message
Input Schema
Name | Required | Description | Default |
---|---|---|---|
constraints | Yes | ||
description | No | ||
objective_expr | Yes | ||
objective_type | Yes | ||
parameters | No | ||
variables | Yes |
Input Schema (JSON Schema)
{
"properties": {
"constraints": {
"items": {
"type": "string"
},
"title": "Constraints",
"type": "array"
},
"description": {
"default": "",
"title": "Description",
"type": "string"
},
"objective_expr": {
"title": "Objective Expr",
"type": "string"
},
"objective_type": {
"title": "Objective Type",
"type": "string"
},
"parameters": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Parameters"
},
"variables": {
"items": {
"type": "object"
},
"title": "Variables",
"type": "array"
}
},
"required": [
"variables",
"objective_type",
"objective_expr",
"constraints"
],
"title": "simple_cvxpy_solverArguments",
"type": "object"
}