AngouriMath

Navigation

← Back to list of members

Budget

 Property

Summary

What an algorithm that can run away is allowed to spend before it declines.

Remarks

Leaving this alone is not the same as setting it to
Unlimited.
Unset, each algorithm keeps the budget
it chose for itself -- the Gröbner path bounds itself by five seconds and
by five structural ceilings, and did so before this setting existed. Set, this
replaces those defaults wherever a budget is honoured, so
Unlimited here means "do not stop", which for a
doubly-exponential algorithm means what it says.
A budget in Steps is reproducible and one in
Time is not, so a caller who needs the same answer on
every machine sets the first and leaves the second
null. Which one stopped a computation is reported through
BudgetRecording.
(#373)
It is honoured only where an algorithm asks -- today that is the Gröbner
system solver. Everything else in the library bounds itself by ceilings of its
own that this does not reach, so setting it does not make an arbitrary call
bounded.

Example

using var _ = MathS.Settings.Budget.Set(new WorkBudget { Steps = 100_000 });
using var recording = BudgetRecording.Start();
var solutions = MathS.Equations("x2 + y2 - 4", "x y - 1").Solve("x", "y");

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online