Modeling the incoming of ships problem

All topics specific to modeling questions in Enterprise Dynamics
DennisvLankeren
Posts: 21
Joined: Monday 23 April, 2012 - 15:20

Modeling the incoming of ships problem

Post by DennisvLankeren »

Hello ED community,

I have a question about a model i am making concerning incoming ships. I want to model a factory in which products are delivered by ships, these ships get "splitted" into batches which are transported via a conveyer to a silo. This silo is only used for the unloading of ships and is not used for inventory. For this different silo's in the process are used.

Within the factory there are specific inventory silo's for each product. Whenever the factory need a product for assembly, these inventories are used and should therefore always be filled with products. Next to the silo's in the factory there are a couple of silo's which are purely used for storage of product. These are not dedicated, so every product can enter each silo, however 2 products can never mix within the process. So a product can only enter a silo in which the same product is present or an empty silo.

Additionally, each product has different cycle times/arrival times/batch size etc. So using product name codes or labels these specific information is added in the model.

What i want to model is ships arriving in my process. So a ship comes in and goes into a queue. If it is first in the queue it can start unloading so i put a server which splits the product up in a certain batch size. Next the products are transported via a conveyer into the first silo. There the model has to make a choice, either ship the product directly into the factory, or if the factory silo is (too) full ship it to the storage silo's. This i also managed to do. But then comes the tricky part on which my question is based,

The factory can only do one thing at a time. So either it is unloading a ship, or it is transporting products from the storage silo's to the specific factory silo's.
Whenever there are no ships waiting in the queue, the factory should start to transport products from the outside storages to the product specific silo's in the factory. This should be done based on the lowest level factory silo of that moment. So the system has to check:
a. Are there no ships waiting
b. Which factory silo is lowest
c. Which storage silo contains a product which is the same as the factory silo.
d. open the channel for that product so the factory silo gets topped up
e. reevaluate which is now the lowest factory silo and fill that one etc. etc.

Whenever a ship will enter again, the transportation between storage - factory has to be closed again and the ship will be unloaded first.

I know this is a long and quite difficult problem, but i really hope someone can help me. Ive tried several things but i cant seem to get my system working. Especially the problem is that a product keeps in the overdraaien server causing it to let no other products through.

I have a simple version of the model so you can look at it. I think that also is better understandable than the text i wrote above.

If there are other comments or question (if my problem is not that clear :mrgreen: ) i would love to hear them to, since i want to maken this system work in the best way possible.

Thank you all in advance,
Dennis
Attachments
communitymodel.mod
(66.5 KiB) Downloaded 387 times
Josie
Posts: 31
Joined: Friday 30 December, 2011 - 09:40

Re: Modeling the incoming of ships problem

Post by Josie »

Dear Dennis,
To answer you questions one by one:
a. Are there no ships waiting
link the central channel of ship's queue to the second input channel of the factory atom, and use "content(in(2,c)) = 0" to check whether no ship is waiting

b. Which factory silo is lowest
c. Which storage silo contains a product which is the same as the factory silo.
b, c and e, you can use

Code: Select all

IndexMin( 
 nroc(AnimAtom),
 if(
  Or(
      comparetext(name(first(AnimAtom)),name(out(count,AnimAtom))),
      comparetext(out(count,AnimAtom), [overslag])
   ),
  content(out(count,AnimAtom))
 )
)
d. open the channel for that product so the factory silo gets topped up
What you have done using the ocReady is good.
e. reevaluate which is now the lowest factory silo and fill that one etc. etc.

Another point, in Overdraaien, the input strategy should be specified, otherwise the first input channel will always has higher priority. This atom has busy rate only as 0.1%, it should not be the reason that your model blocked.


Anything more, welcome to ask.

KR
Josie
Last edited by Josie on Tuesday 24 April, 2012 - 09:24, edited 1 time in total.
DennisvLankeren
Posts: 21
Joined: Monday 23 April, 2012 - 15:20

Re: Modeling the incoming of ships problem

Post by DennisvLankeren »

Dear Josie,

Thank you for your fast reply, i hope the explanation was not too cryptic.

I will try at once to get the code working. For the "there are no ships waiting" part there is a similair code in the condition control. Would it be better to delete this condition control and link the queue of waiting ships directly to the second channel of the factory or is the current system also ok.

The code to check the index i will try right now. I think it is exactly what i am looking for so fingers crossed.

About the other point you mentionted, that there should be an input strategy, i know this but first i had a terrible long code here to define which channel to open or not based on the names of product and channels between silo's. I deleted it because it was not working at all. What code should i then use as an input strategy? I only want to open the channels of product needed by the factory silo's and not all channels.

thank you in advance,
Dennis
DennisvLankeren
Posts: 21
Joined: Monday 23 April, 2012 - 15:20

Re: Modeling the incoming of ships problem

Post by DennisvLankeren »

another quick question, where should i put the

Code: Select all

IndexMin( 
 nroc(c),
 if(
  Or(
      comparetext(name(first(c)),name(out(count,c))),
      name(out(count,c)) = [overslag]
   ),
  content(out(count,c))
)
)
in the model? I understand basically what it does but cant seem to get it rigtht.
Most of the model is working except the part where the overdraaien atom is opened and the right channels are opened so the needed silo's get topped up.

If have have that part working im almost there.
Josie
Posts: 31
Joined: Friday 30 December, 2011 - 09:40

Re: Modeling the incoming of ships problem

Post by Josie »

Dear Dennis,
If I understand you correctly, this is a solution in the InStrategy for the Atom Overdraaien:
1, Evaluate the contents of the factory silo, and sort them and record down the sequence in table of Overdraaien
2, check the first lowest silo in the table, find whether there are products stored in storage, if yes, open input channel of that specific storage silo; if not, check the second lowest factory silo from the table, and do the same thing as above.

Remember to set the table size of Overdraaien in Atom Editor.

For the ship's queue, if nothing else should be consider other than the queue's content, directly linking the central channel is better. Of control block works as well.

good luck!

KR,
Josie
DennisvLankeren
Posts: 21
Joined: Monday 23 April, 2012 - 15:20

Re: Modeling the incoming of ships problem

Post by DennisvLankeren »

Well that sounds like exactly what i want to do. However i never worked with the table function, so i dont really know how to implement this. I managed to get some other parts working by your information so thank you already.

I have used a code like this in the input strategy of overdraaien.

Code: Select all

do(
if(ocready(out(1,c)),
case(
whichistrue(
 comparetext(name(in(5,c)),[Product1]),
 comparetext(name(in(4,c)),[Product1]),
 comparetext(name(in(3,c)),[Product1]),
 comparetext(name(in(2,c)),[Product1]),
 comparetext(name(in(1,c)),[Product1])
),
openic(5,c),
openic(4,c),
openic(3,c),
openic(2,c),
openic(1,c)
)),
if(ocready(out(2,c)),
case(
whichistrue(
 comparetext(name(in(5,c)),[Product2]),
 comparetext(name(in(4,c)),[Product2]),
 comparetext(name(in(3,c)),[Product2]),
 comparetext(name(in(2,c)),[Product2]),
 comparetext(name(in(1,c)),[Product2])
),
openic(5,c),
openic(4,c),
openic(3,c),
openic(2,c),
openic(1,c)
)),
if(ocready(out(3,c)),
case(
whichistrue(
 comparetext(name(in(5,c)),[Product3]),
 comparetext(name(in(4,c)),[Product3]),
 comparetext(name(in(3,c)),[Product3]),
 comparetext(name(in(2,c)),[Product3]),
 comparetext(name(in(1,c)),[Product3])
),
openic(5,c),
openic(4,c),
openic(3,c),
openic(2,c),
openic(1,c)
)),
)
i tried to use this to check wether the ic of a factory silo was open and if so search a matching storage and open that channel. However this was not working. I also tried combinations with content of factory silo <xxx then. but this didnt work as well.

Additionally the code does not seek for the lowest storage level of the same product which is also needed.

Working with a table would make this all possible? But how should i implement that into my system. I am fairly new to ED so i dont have that much experience yet.

Can you possible put an example in ED for met to look at?

thank you in advance,
Dennis
Josie
Posts: 31
Joined: Friday 30 December, 2011 - 09:40

Re: Modeling the incoming of ships problem

Post by Josie »

Dear Dennis,

fuction "compareText" is fine, but a better way is to use attributes or labels, so that the codes become a bit concise and easy to read.
Under what condition do you want to send products from storage to factory silo? by comparing the contents of factory silo and have the lowest topped up or only check which factory silo has a opened channel then send specific product to it?

best regards,
Josie
DennisvLankeren
Posts: 21
Joined: Monday 23 April, 2012 - 15:20

Re: Modeling the incoming of ships problem

Post by DennisvLankeren »

Dear Josie,

I will look into using labels for better readability later. thank you for the tip.

The condition i want to use for topping up is basically simple.
I want to put levels on the factory silo on which they will open channel 2 for overdraaien. Basically the overdraaien atom then needs to check:
1.which factory silo's have their channeld open.
2. Which of these silo's has the lowest content.
3. which storage silo's contain the same product.
4. which of these storage silo's has the lowest content level,
and the channel for that silo. then whenever the factory silo is full again or the storage silo becomes empty. Reevaluate and open the next channel until a ship comes in.

This is the first part i want to make. If you can help me get it right this far that would be super.

thank you in advance,
Dennis
DennisvLankeren
Posts: 21
Joined: Monday 23 April, 2012 - 15:20

Re: Modeling the incoming of ships problem

Post by DennisvLankeren »

Dear Josie,

Are you still looking into my problem? I am still trying to get everything working, but cant manage to get that small part working.

thank you,
Dennis
Josie
Posts: 31
Joined: Friday 30 December, 2011 - 09:40

Re: Modeling the incoming of ships problem

Post by Josie »

Dear Dennis,
I am working on it. hope to give you a result this afternoon.

KR
Josie
Post Reply