Aging chain with items taken out, on hold and put back

Use this forum to post Vensim related questions.
Post Reply
WayneZhou2009
Senior Member
Posts: 105
Joined: Wed Oct 25, 2017 3:52 pm
Vensim version: PRO

Aging chain with items taken out, on hold and put back

Post by WayneZhou2009 »

Hi Tom,

I came across an old post where the question raised was almost exactly the one I am having now and you gave a very enlightening solution using arrays. I have attached it here for easy reference. And the post is: viewtopic.php?f=2&t=5287

Essentially, the situation is about taking out some items from an aging chain, and keeping them "on-hold" for a certain period during which they keep aging as usual (as if they were still in the original chain). After the "on-hold" period they are released from hold and put back into the correct age positions of the chain. Multiple-hold is allowed.

For example, on a certain day, I take out 3 items with ages of 2,3,4 days respectively, they are hold for 5 days, then released and put back to the chain. Since now these 3 items are 7, 8, 9 days old, they should rejoin their peers who were also 2, 3, 4 days old 5 days ago and are 7, 8, 9 days old now. And so on.

However I found one component of your model a bit confusing. In fact it is also the particular issue that I cannot find a proper solution for my own model. It is the use of first-order delay for releasing the items on hold and letting them return the chain. See the red circle in the figure. Why is the first-order delay appropriate here? By using it, the "hold duration" is taken as the average hold duration, implying that items (with the same ages) may be held either longer or shorter. But here the requirement is that the hold duration is exactly the same for each and every item on hold, e.g. 30 days in the attached model.

Perhaps my interpretation of your model is inaccurate. Please could you offer some insights?

I know the original post and your model were back in 2013 and Vensim has been advancing since then. So, I wonder if there is any alternative solution to this issue, still in the context of Vensim (not Ventity).

Many thanks for your time.
Attachments
Aging on hold.jpg
Aging on hold.jpg (39.78 KiB) Viewed 9318 times
130603_queueFifo_delayConveyor+TF.mdl
(10.37 KiB) Downloaded 249 times
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Aging chain with items taken out, on hold and put back

Post by tomfid »

I think the difference is simply a matter of focus - this model is the continuous version, that doesn't worry about individual items.

I guess you could use an infinite-order delay here, to hold the items by an exact time, and then return them to an appropriate (later) slat in the delay chain. In that case, you wouldn't need to worry about the aging process for the held items - the stock of items on hold would really only be there for accounting.
WayneZhou2009
Senior Member
Posts: 105
Joined: Wed Oct 25, 2017 3:52 pm
Vensim version: PRO

Re: Aging chain with items taken out, on hold and put back

Post by WayneZhou2009 »

Hi Tom, thanks for your suggestion. However, I do not think that solves the problem, because when those items are being on hold for the required period, they shall keep aging as usual rather than being "frozen". If an infinite-order delay is used, the outcome is that a 5-day-old item entering the delay (say, hold for 10 days) will still be 5-day-old when leaving the delay box, but it should be 15-day-old. Moreover it is also possible that items on hold may experience some % of scrappage every day.

So I think the explicit aging process for items taken out, as shown by the "Items on Hold" and "Aging on Hold" in the above picture, is still needed. The problem is how to tell Vensim the hold (the duration of aging in the "Items on Hold" box) is 10 days (or whatever number desired).

Could you offer some further advice please? Many thanks.
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Aging chain with items taken out, on hold and put back

Post by tomfid »

You could map the return flow from age x to age x+d of the main stock, right?
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Aging chain with items taken out, on hold and put back

Post by tomfid »

Does the delay order for items on hold, or the integer constraint on items, actually matter in some policy-relevant way? If so, it seems like you really need a discrete event simulation.
LAUJJL
Senior Member
Posts: 1421
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Re: Aging chain with items taken out, on hold and put back

Post by LAUJJL »

Hi

It looks like a partly discreet problem, as you deal with individual delays.

I personally avoid delays, because you have no information about what is in the delay.
It is too impossible to step back in games with delays.

In this case I use arrays, where I have a total control on what is happening.

I join an example that can be read with Vensim pro, dss or reader.

The first subscript aggregates the widgets by their age, assuming that when the widget enters the ageing chain it has age 0. At each step the ageing chain slides one month. After 100 months, the widget leaves the chain. It is possible to change this by modifying the subscript.
The subscript age uses mapping.

There is too another subscript representing widgets on hold or not.

The model is just an example of representation.

At each step, new widgets are entering the ageing chain and at time 30 and 40, it automatically transfers widgets from the not on hold chain to the on hold chain and back, verifying that there are enough widgets to transfer. At time 40, it can only transfer 10 widgets back instead of the 20 initially planned.

You have control on the quantity of widgets to move between the two ageing chains, when to do it, and the age concerned, or the delay of holding back.

Regards.

JJ
Attachments
aging chain.vpm
(127.68 KiB) Downloaded 207 times
WayneZhou2009
Senior Member
Posts: 105
Joined: Wed Oct 25, 2017 3:52 pm
Vensim version: PRO

Re: Aging chain with items taken out, on hold and put back

Post by WayneZhou2009 »

Hi JJ, thank you so much for your example model. I was hoping to use 2 subscripts but was not able to figure it out. Your approach is enlightening. I have not fully understood the logic behind your model, so I am still studying it carefully. For now, a quick question please: does this model allow widgets to transfer from not-on-hold chain to on-hold chain at each time step (each month)? In other words, can the "moving time" (30, 40 in your model) be at any time step so that every month there are some widgets going out from the main stock and being on hold?

Thank you so much.
WayneZhou2009
Senior Member
Posts: 105
Joined: Wed Oct 25, 2017 3:52 pm
Vensim version: PRO

Re: Aging chain with items taken out, on hold and put back

Post by WayneZhou2009 »

Hi Tom, I feel that this has to be regarded as a 2-dimension problem. So maybe subscripts [i,j] and VECTOR ELM MAP should be used?
tomfid wrote: Fri Nov 02, 2018 2:41 pm You could map the return flow from age x to age x+d of the main stock, right?
LAUJJL
Senior Member
Posts: 1421
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Re: Aging chain with items taken out, on hold and put back

Post by LAUJJL »

Hi

In this model, you can generate two events every time step, and each event describes moving a definite quantity of widgets from one level to the other at a definite age.

If you want to describe more events happening in a month, you must either reduce the time step, or add the subscript age to some of the variables, so as to move widgets at different age.
This may necessitate adding an age2 subscript equivalent to the subscript age.

Try first to understand the model uploaded. There is no one definite way to describe things, one must well understand what one wants to do and imagine different ways to do it and chose the most practical one.

Regards.

JJ
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Aging chain with items taken out, on hold and put back

Post by tomfid »

I'm still not convinced of the policy relevance of preserving every detail of the aging structure.
WayneZhou2009
Senior Member
Posts: 105
Joined: Wed Oct 25, 2017 3:52 pm
Vensim version: PRO

Re: Aging chain with items taken out, on hold and put back

Post by WayneZhou2009 »

It may be necessary to go to this level in some cases such as infrastructure development, power plants, etc. Hence the distribution of their ages and properties at yearly level would have relevance from policy-making perspective.
tomfid wrote: Fri Nov 02, 2018 8:23 pm I'm still not convinced of the policy relevance of preserving every detail of the aging structure.
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Aging chain with items taken out, on hold and put back

Post by tomfid »

I think the natural heterogeneity of such things negates most of the benefit of the model detail. If you're talking about wind turbines, they're too numerous to worry about it. If coal plants, each one is unique and the duration of retrofit projects has high variance. I can see how the precise timing might matter if you're managing a vehicle fleet for a single company, but not if you're interested in a national building retrofit program.
WayneZhou2009
Senior Member
Posts: 105
Joined: Wed Oct 25, 2017 3:52 pm
Vensim version: PRO

Re: Aging chain with items taken out, on hold and put back

Post by WayneZhou2009 »

Thanks Tom for your insight. So what would be a reasonable simplification here if the "on-hold" segment of the model is still needed?
WayneZhou2009
Senior Member
Posts: 105
Joined: Wed Oct 25, 2017 3:52 pm
Vensim version: PRO

Re: Aging chain with items taken out, on hold and put back

Post by WayneZhou2009 »

To reflect the high variance of the post-retrofit period ("on-hold" period), would the original first-order delay treatment in the picture above be a reasonable approximation?
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Aging chain with items taken out, on hold and put back

Post by tomfid »

I would generally assume that the first-order approximation is reasonable until proven otherwise.

Here's a comparison of 3 approaches. It appears that the dispersion problem in the aging chain is much more significant than the delay order for the hold process.

The cohort approach (inspired by Ventity) was harder to set up. However, it would be much easier to generalize to any arbitrary process for the hold/retrofit.
Aging Approaches 1.mdl
(13.74 KiB) Downloaded 203 times
LAUJJL
Senior Member
Posts: 1421
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Re: Aging chain with items taken out, on hold and put back

Post by LAUJJL »

Hi
It is difficult to chose between different solutions, without a deep knowledge of the problem.
Is it a real problem or an academic one?
If it is a real problem, we do not know what the model has to improve: financial, technical issues?
Regards.
JJ
WayneZhou2009
Senior Member
Posts: 105
Joined: Wed Oct 25, 2017 3:52 pm
Vensim version: PRO

Re: Aging chain with items taken out, on hold and put back

Post by WayneZhou2009 »

Hi Tom, thank you so much for setting up these models, which provide very helpful insights into their inherent dynamics and the emergent outcomes.
WayneZhou2009
Senior Member
Posts: 105
Joined: Wed Oct 25, 2017 3:52 pm
Vensim version: PRO

Re: Aging chain with items taken out, on hold and put back

Post by WayneZhou2009 »

Hi JJ, it is still something exploratory. I agree that it is difficult to choose between them, but it is great to have these options available.
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Aging chain with items taken out, on hold and put back

Post by tomfid »

LAUJJL wrote: Sat Nov 03, 2018 8:55 am It is difficult to chose between different solutions, without a deep knowledge of the problem.
Exactly. There are lots of approximations that are good enough for some purposes. There's probably no solution for all purposes. Even building an exact representation as a discrete event or agent based simulation, while it would always be technically correct, would be a poor approach in many cases - expensive, unwieldy, slow.
LAUJJL
Senior Member
Posts: 1421
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Re: Aging chain with items taken out, on hold and put back

Post by LAUJJL »

Hi Tom

I totally agree with your point of view, except that you did not mention one of the characteristics of individual based methods: they are easier to test because they are a more exact representation of the reality making it possible to compare the exact reality to the model behaviour.

Of course it is too possible to test more continuous and aggregated models, mainly by using them extensively and building tests like the reality checks of Vensim. Unfortunately this is rarely done:
I have never seen a model published in the system dynamics conference with reality checks in it!

This makes SD models more error prone when reaching a certain size.

Of course SD has brought the possibility to address with mathematical rigour problems whose size made them intractable otherwise. But it attracted too lots of people interested by this possibility and neglecting the necessity of hard work, using and testing the models.
This situation generated a kind of tolerance towards eventual bugs that has spread within the SD community even with supposedly 'experts'.

I had recently to study a published model by an 'expert' and studied by other 'experts' (about 15 of them) and that was deeply bugged. I stopped studying it after having found 6 bugs, expecting to find many others in about 100 variables, unsubscripted and one view model readable with the Vensim PLE but with many feed back loops. I was shocked by this.

I suppose that the experts probably did not work with the model, thinking that it was tested by some one else and accepting the conclusions of the model builder without verification. The problem is that this was repeated about 15 times!

These cases deserve deeply the field. I sincerely wonder if there exists system dynamicists working properly.

Best regards.

JJ
LAUJJL
Senior Member
Posts: 1421
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Re: Aging chain with items taken out, on hold and put back

Post by LAUJJL »

There was a mistake in my previous post.
i did not mean deserve deeply the field, but was deeply detrimental to the field
Post Reply