Skip to main content
1-Visitor
November 12, 2015
Solved

Way to Implement a TimeOut (limit calculation time) for a Solve Block?

  • November 12, 2015
  • 4 replies
  • 2425 views

In MathCad 15, is there a way to limit the calculation time, or implement a time out, for a solve block? 

I have a parameterized solve block in which there are some values of the inputs that cause the solve block to run continuously (or at least longer than I'm willing to wait).

I'd like to skip over those instances where it does this in the looping of the parametrized solve block and continue on to the next set of inputs in the loop.

Thank You

Best answer by StuartBruff

ANDREW LITCH wrote:

In MathCad 15, is there a way to limit the calculation time, or implement a time out, for a solve block?

I have a parameterized solve block in which there are some values of the inputs that cause the solve block to run continuously (or at least longer than I'm willing to wait).

I'd like to skip over those instances where it does this in the looping of the parametrized solve block and continue on to the next set of inputs in the loop.

Typically, now that I want one to, I can't get a solve block to take more than a couple of seconds.  Nor can I find one on the Community.

However, I was wondering if were possible to pass the start time to a solve block, create an auxiliary function that simply looks at the time and raises an error if t > start time + n seconds, and then make that function part of the dependencies?

Stuart

4 replies

23-Emerald V
November 12, 2015

ANDREW LITCH wrote:

In MathCad 15, is there a way to limit the calculation time, or implement a time out, for a solve block?

I have a parameterized solve block in which there are some values of the inputs that cause the solve block to run continuously (or at least longer than I'm willing to wait).

I'd like to skip over those instances where it does this in the looping of the parametrized solve block and continue on to the next set of inputs in the loop.

Typically, now that I want one to, I can't get a solve block to take more than a couple of seconds.  Nor can I find one on the Community.

However, I was wondering if were possible to pass the start time to a solve block, create an auxiliary function that simply looks at the time and raises an error if t > start time + n seconds, and then make that function part of the dependencies?

Stuart

24-Ruby IV
November 15, 2015

Stuart,

You propose an approach by using the "time()" function?

23-Emerald V
November 16, 2015

VladimirN. wrote:

Stuart,

You propose an approach by using the "time()" function?

Hi Vladimir,

Yes.

Ideally, of course, it should be a user-definable parameter of a solve block (with a default of eternity or until we get caught in the cross-fire a Kardashev Type II civilization bar fight).

Stuart