Restricted Production

All topics specific to modeling questions in Enterprise Dynamics
Post Reply
DaveK
Posts: 4
Joined: Thursday 12 May, 2011 - 08:57

Restricted Production

Post by DaveK »

Hello,

I have the following modelling problem: my system consists of two sources, representing the same product. The first source is continuously producing products. In the further process, those products are tested for any damage at all: 5% of the products are damaged and led to a sink.
Now, everytime a damaged product enters the sink, I want the second source to produce another new damaged-free product. So in the end of this simulation, the input of the sink and the output of second source should be the same.

Thanks ahead!
Dave
MarvinH
Posts: 93
Joined: Tuesday 25 January, 2011 - 11:07
Contact:

Re: Restricted Production

Post by MarvinH »

Hello Dave,

Does the second source really have to be a source? Otherwise you could use a splitter in front of the sink. When a damaged product wants to enter the sink, first create a copy of this atom by using the splitter. I have attached a small model in which the described method is applied.

Two products will leave the splitter, one can be sent to the sink and the other one can be sent back into the system. Note that you can add a queue behind the splitter to possibly "reset" the product that is sent back into the system. I have done this by resetting the Damaged label on entry of the queue.

Please let me know whether this approach suits your problem.

Regards,

Marvin
Attachments
DamagedProducts.mod
(16.53 KiB) Downloaded 360 times
DaveK
Posts: 4
Joined: Thursday 12 May, 2011 - 08:57

Re: Restricted Production

Post by DaveK »

Hello Marvin,

thank you for your immediate response. This might be a fair compromise, but it also kind of falsifies the simulation, because that makes it seem like we can repair the product. That's not possible, so if there's a chance, I'd like to control the source, depending on how many products enter the sink for the damaged products.
But I have no clue how to do that. I can not block the source by using the lock and/or unlock atom, I don't think condition control would work out, and 4D-Scripts in "Number of products" do not work out either, do they?

I was considering to put a lock atom behind the source and then enter a 4dscript in "lock level", so that the number would adjust to the input of the sink!

Thanks again for your help!
Dave
MarvinH
Posts: 93
Joined: Tuesday 25 January, 2011 - 11:07
Contact:

Re: Restricted Production

Post by MarvinH »

Hello Dave!

Another way to model this system is done as attached. On entry of the second sink, two things are done on the second source:
- Increase the number of products to be released on the second source;
- Create an event to create a new product in the second source immediately.

To use this approach, you should add an initialize atom to make sure the number of products from the second source is initialized on 0 each time the simulation starts.

Good luck!
Attachments
DamagedProducts_v2.mod
(25.14 KiB) Downloaded 361 times
DaveK
Posts: 4
Joined: Thursday 12 May, 2011 - 08:57

Re: Restricted Production

Post by DaveK »

Thanks for your help, this is a sufficient solution! I also created an Initialize-atom that I would like to connect with a source in order to access "Trigger on Creation". The reference is probably stated somewhere in the online-help, but I can't find the right entry. Could you help me out on this matter?

Thanks a lot!
Dave
MarvinH
Posts: 93
Joined: Tuesday 25 January, 2011 - 11:07
Contact:

Re: Restricted Production

Post by MarvinH »

Hello Dave!

I am not really sure about what you exactly mean, but I think you want to reference the source from within your Initialize-atom. The way to do this, is connecting an input channel of the initialize-atom to the central channel of the atom you want to control, in this situation the source. Now you can reference the source by using the command

Code: Select all

In(1, c)
, in case you connected the source to the first input channel of the initialize atom.

Hope this works for you!

Regards,

Marvin
DaveK
Posts: 4
Joined: Thursday 12 May, 2011 - 08:57

Re: Restricted Production

Post by DaveK »

Hello Marvin,
thanks for your response. I'm sorry, I did not describe my problem adequately! I was looking for the short form "CreationTrigger", but I found it out by myself! But my initialize-atom is still not working, there are two problems! Here is the initialize code:

Code: Select all

Att([CreationTrigger], In(1, c)) := bernoulli(50,[Setlabel([Destination], Uniform(1,2),i)],[Setlabel([Destination], Uniform(3,4),i)])
Now, everytime I restart the simulation or try to save it, an error message appears:

2 Time: 0 Atom: Initialize29 (ID=240), OnReset>No atom currently selected: i

I understand what the problem is, but the initialize-atom is posting either the "Setlabel([Destination], 1,i)", or the Setlabel([Destination], 2,i) properly in the field Trigger on creation (connected source). I will have to share the model with various people, so this would not be convenient. Is there any chance, I can avoid the error message?

This is not my entire problem. As I said, the correct code is posted in "Trigger on creation" after I start a simulation run, but apparently the lable is not set, because the products are not filtered according to their labels anymore. Later on, for example, every product with Destination=1 is supposed to go through channel 1 and the other one is supposed to go through channel 2, but both products simply stop moving, as if they don't have any value at all ...

Very confusing...
Greetings!
MarvinH
Posts: 93
Joined: Tuesday 25 January, 2011 - 11:07
Contact:

Re: Restricted Production

Post by MarvinH »

Hello Dave!

Setting attributes to expressions require a specific statement, being SetExprAtt, see Help for more info! Further you use the Uniform distribution, which is a continuous distribution. I think you should use the discrete counterpart of it, being dUniform.

Try the following code:

Code: Select all

Bernoulli(
 50,
 SetExprAtt([CreationTrigger], [Setlabel([Destination], dUniform(1,2),i)], In(1, c)),
 SetExprAtt([CreationTrigger], [Setlabel([Destination], dUniform(3,4),i)], In(1, c))
)
Regards,

Marvin
Post Reply