Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guides MATLAB optimization: formulating problems with optimproblem, selecting and tuning solvers via optimoptions, and validating results.
Use this skill ↓77% 95%+18 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 17 of 22 without it.
I want to speed up a mixed-integer linear programming solve in MATLAB using intlinprog by adding 'UseParallel', true to optimoptions. Can you show me the correct code to set this option for intlinprog?
The response explains that UseParallel is not supported for intlinprog.
This test ran on v1. v2 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Guide the full optimization lifecycle: classify the problem, formulate it, select and configure a solver, and validate the results.
optimproblem, optimvar, optimconstr, optimexpr, or fcn2optimexproptimoptions, algorithm choice, tuning)solve(eqns, vars), ODE systems, or linear system solves (A\b)Before formulating, identify the problem class — it determines which solver to use, what guarantee you can promise (global vs local), and whether a domain-specific tool should replace the generic path.
See references/classify.md for the class→solver→guarantee table, convexity quick-checks, and "hidden easier class" heuristics. Key actions:
optimproblemeig(H) — nonconvex QPs cannot use quadprog reliablymax, min, abs, sort, if/branching, or norms other than squared-2-normUse problem-based by default for readable definitions, N-D modeling, and every LP, QP, conic, and mixed-integer problem (unless coefficients are already in matrix-vector form). Problem-based provides automatic differentiation and is less error-prone.
Even when AD is blocked (e.g., ode45 in the objective), fcn2optimexpr can still wrap the function as a black-box — problem-based remains useful.
Next to this one in the catalogue, plus more from the same author.