Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Infinite recursion when it should not be. 1

Status
Not open for further replies.

Degine

Industrial
Oct 21, 2010
3
I'm trying to simulate cycle times as a function of work released at a station.

Please see attached worksheet.

Mathcad 14

Mathcad 11


The problem is, for the CT(w), it requires CT(w-1).

While understandable this leads to recursion, CT(1) is very easily calculated since some parts reduce to 0 for example:
w-1/CT(w-1)=0 for w=1

No need to know CT(w-1) as 0 divided by anything will always be 0.

So how can I avoid Mathcad worrying about 'infinite recursion' / overflow?

Note: w=1,2...32 at most. So definitely not infinite.
 
Replies continue below

Recommended for you

Wow great thanks, I never knew about the second kind of subscript. (<.> vs <[>) It seems like a great solution for many things.

However think I've oversimplified the expression, please see attached files with expressions to describe multi-station lines. The expression is completely wrong, but describes what I'm trying to do. (Unfortunately, the second expression no longer contains redundancies.)

I guess a solution would be to separate all the CT_j(w) and sum them up later, i.e. move everything to different expressions like you might calculate everything in different cells in Excel.
But then each expression refers to another expression that has not yet been calculated -> every expression should be solved at the same time. Another form of problematic recursion I guess.

Note: CT_j should be a function of w rather than j. Didn't manage to formulate that in Mathcad.

Mathcad 11

Mathcad 14
 
Just file into your brain that an indexed variable is NOT a vector; that will save you loads of grief later.

Engineering.com appears to be non-responsive at the moment. I'll post the file later

TTFN

FAQ731-376
 
Thank you very much, this has been of great help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor