
Shadow prices
An hour on machine 2 is worth 1.50 and on machine 3 1.00; machine 1 has 2 idle hours.
Solve linear programs with linprog, find roots with fzero and fsolve, and minimize with fminbnd, fminunc, fminsearch and fmincon.

Solving a linear program or a constrained design problem usually means paying for an optimization toolbox, or waiting for a shared license. linprog, intlinprog, fmincon, fsolve and lsqnonlin are part of the RunMat runtime, free for individuals, education, research and smaller companies.
RuntimeSolving the same model for hundreds of cost scenarios or start points one at a time keeps a single core busy. A parfor loop spreads the solves across every core and returns the same answers at any worker count.
ParallelA solver that stops early can return a point that looks like an answer. Each solver returns its exit flag, iteration count and number of function evaluations with the result, so a failed solve is caught before its numbers are used.
Function referenceThe objective, the limits and the solver call live in one script. When a cost or a capacity changes, edit the number and run it again, and each run keeps its inputs and answer for comparison.
Desktop app
An hour on machine 2 is worth 1.50 and on machine 3 1.00; machine 1 has 2 idle hours.

From (-1.2, 1): fminsearch takes 159 evaluations, fminunc 156, and 53 with a gradient.

One fzero call per point gives the friction factor across Reynolds number and roughness.

fsolve finds a different intersection from each of two starting points.

fminbnd finds a radius of 5.42 cm, where the height equals the diameter.

fmincon finds 35 by 140 mm, held by the deflection and depth limits.

Of 81 starts on peaks, 19 reach the global minimum, 21 a local one and 41 drift away.

The best integer point, (4, 0), is worth 20; the relaxation's corner, (3, 1.5), is worth 21.

Past a tolerance of 1e-6 the error stays near 1e-5, the limit of finite-difference gradients.