AxArgmin_generate_code
Generate executable Python code for nonlinear programming, rootfinding, ODE/DAE simulation, and optimal control, with an explanation of the approach.
Instructions
Generate Python code to solve a numerical problem using the argmin library. Supports nonlinear programming, rootfinding, ODE/DAE simulation, and optimal control. Returns executable code and an explanation of the approach. The code must be executed separately using the execute_code tool.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"problem_description": "<problem_description>",
"problem_type": "<problem_type>"
},
"name": "AxArgmin_generate_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| problem_type | Yes | Problem type: 'nonlinear_program' (minimize f(x) s.t. constraints), 'nonlinear_equations' (solve F(x)=0, rootfinding), 'initial_value_problem' (integrate dx/dt=f(x,t), ODE/DAE), or 'optimal_control' (dynamic optimization over time) | |
| problem_description | Yes | Natural language or mathematical description of the problem |