Modeling the incoming of ships problem

All topics specific to modeling questions in Enterprise Dynamics
Josie
Posts: 31
Joined: Friday 30 December, 2011 - 09:40

Re: Modeling the incoming of ships problem

Post by Josie »

Dear Dennis,
You copied the codes from my example model to your own, but do not check every detail that might influence your model:
In the factory silo, you still "repeat(3, ... ", but there are really more than 3 factory silos in your improved model (8 now). The result is that you only check the first 3 factory silos in the table of Overdraaien and fill the content in the cell that does not belong to that factory silo at all...

Any more question about the sample model, please tell me. ;)

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

Re: Modeling the incoming of ships problem

Post by DennisvLankeren »

Hey there,

I found some more errors in the code which i managed to get rid off:

Code: Select all

do(
 repeat(
 [color=#FF0000] 8[/color],
  if(
   cell(count,1,in(3,c),1)=2,
   cell(count,2,in(3,c),1):=[color=#FF0000]content(c)/120[/color]
   )
 ),
 
 if(
 label([WaitingForInput], in(3,c))=1,
 createevent(0,in(3,c),3)
 ),
 if(content(c)<10,
 openic(4,c),closeic(4,c)
 )
)
The two red parts have been altered. The content wasnt updated correctly due to the first 8. This initially was a 3 but i forgot to update this according to the number of factory silo's.

The second part is to put the content level in percentage. The original code would top up the silo woith the lowest content, but since some factory silo's are used more and have more capacity they would only get topped up in a very loate stadium. EG gerst versus zonnepit is 318 tonnes verses 93 tonnes. The original code would keep filling zonnepit while it should be based on the lowest percentage in the silo.

In the new system i do keep getting a new error:
3661 Time: 1103606.08088504 Atom: Overdraaien (ID=243), OnOcReady>No atom currently selected: First()

I dont know why yet, so im gonna try to find this one.

Tank you all i advance,
Dennis
DennisvLankeren
Posts: 21
Joined: Monday 23 April, 2012 - 15:20

Re: Modeling the incoming of ships problem

Post by DennisvLankeren »

Ok its close to working perfect but i still have that one error.
Additionally, silo's can still become empty. This should never happen. I want something in the system that can check if a silo is dangerously low.

For instance if a factory silo is below lets say 20% content, the unloading of ships should stop (close silo 23 output) and the overdraaien atom should become active for lets say 15 min. This way it has time to fill up some of the factory silo again before it becomes empty.

If there is no product in storage, silo 23 can remain open and overdraaien should not do anything. In that case a truck with 30 tonnes should come in and deliver this amount right into the factory silo.

Can anybody show me how to do this in the model. I hope someone can help me quickly.

Thank you all ion advance.
KR,
Dennis
Attachments
scheepsaankomstcommunity2.mod
(283.93 KiB) Downloaded 351 times
Josie
Posts: 31
Joined: Friday 30 December, 2011 - 09:40

Re: Modeling the incoming of ships problem

Post by Josie »

Dear Dennis,
The cause for the error lies in silo 23, trigger on Exit.
just enable "openinput(in(2,c))", it does not make any sense, here now.
I want something in the system that can check if a silo is dangerously low.
Use the level triggers in Reservoir to implement these functions: when ever the silo is below the dangerous level, do something to the relevant Atom. Use out or in to refer the Atom that you want to manipulate.
And you can also use Global variable to control the flow by declaring it in Initialization using Dim

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

Re: Modeling the incoming of ships problem

Post by DennisvLankeren »

When you say remove that part of code, the overdraaien atom never gets opened again. Since overdraaien and silo 23 cont be opened together, whenever a product enters silo 23 overdraaien input is closed. If the content of 23 becomes <1 it should be opened again. What is wrong with that code?

I tried deleting it, but then overdraaien never gets openend.
DennisvLankeren
Posts: 21
Joined: Monday 23 April, 2012 - 15:20

Re: Modeling the incoming of ships problem

Post by DennisvLankeren »

Dear Josie,

I found the error you told me. You were right, again haha. I managed to get the truck system up an running. Some last ajustement and i think the system is working. When i have another question or when it is fully working i will post it to you.

thank you,

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

Re: Modeling the incoming of ships problem

Post by DennisvLankeren »

Dear Josie,

I have some other tricky questions for you. I have updated the model now completely and i think it is working as it should. However there are some things i do not understand or do not know if i did them the right way.

I have uploaded the last version of the model o please take a look at it.

1. I have added trucks that come in whenever there are no storage silo's filled with a needed product, and the factory silo is running low. This is managed in the condition controls above the main model. If there is a storage silo filled with the needed product, not a truck should come in, but overdraaien should become active and fill the silo. I used a createevent in the condition control to do this. Additionally i added a table atom which has the number of filled storage silo's with a specific product in them. These are updated whenever a product leaves silo23, or whenever a product leaves one of the storage silo's. Is this simulated correctly?

2. I have add a new big storage silo with infinite capacity. Since the incoming of ships is based on a negexp() value, it can happen all silo's are full when a product comes in. To avoid the system from crashing, i "dump" these resources into the big silo and they are trashed. The silo has no outgoing channel so the product are discarted into nothing. This does cause more trucks to be needed, but i dont know another way to avoid the system from crashing otherwise. Is this ok or do you have another better idea?

3. Since i deleted the close/openoutput on silo 23 on entry and on exit, overdraaien and inname can be active at the same time. This is not the case. Only one can be active at a specific time so either there is a ship unloading from silo 23 via inname, or overdraaien is active. How can i prevent that both are active at the same time without getting errors? I think it has someting to do with the code you have written for the input strategy, but can't find it.

4. The utility rate of inname and overdraaien should be aroun 100% combined (since one should always be active). when i run the current simulation the cummulation of these two is only around 60-70%. Is my thinking wrong or is there something in the system causing this to be lower?

Thats it for now.

I hope you have time to look at it today. Thank you for all the help already again.

I am looking forward to your reaction,

Kind regards,
Dennis
Attachments
scheepsaankomstcommunity4.mod
final model
(338.02 KiB) Downloaded 375 times
Josie
Posts: 31
Joined: Friday 30 December, 2011 - 09:40

Re: Modeling the incoming of ships problem

Post by Josie »

Dear Dennis,
I have put the your original model (version 2) here to show you the model actually runs without error.

Small changes in Initialization and silo 23. I use red comments to mark out what I altered.

good luck!

Josie
Attachments
scheepsaankomstcommunity2.mod
(285.92 KiB) Downloaded 366 times
Josie
Posts: 31
Joined: Friday 30 December, 2011 - 09:40

Re: Modeling the incoming of ships problem

Post by Josie »

Dear Dennis,

For the rest of your questions:
1. I have added trucks that come in whenever there are no storage silo's filled with a needed product, and the factory silo is running low. This is managed in the condition controls above the main model. If there is a storage silo filled with the needed product, not a truck should come in, but overdraaien should become active and fill the silo. I used a createevent in the condition control to do this. Additionally i added a table atom which has the number of filled storage silo's with a specific product in them. These are updated whenever a product leaves silo23, or whenever a product leaves one of the storage silo's. Is this simulated correctly? It sounds really good. But remember to check whether the "waitingforinput" Label is true everytime before createevent on Overdraaien.
2. I have add a new big storage silo with infinite capacity. Since the incoming of ships is based on a negexp() value, it can happen all silo's are full when a product comes in. To avoid the system from crashing, i "dump" these resources into the big silo and they are trashed. The silo has no outgoing channel so the product are discarted into nothing. This does cause more trucks to be needed, but i dont know another way to avoid the system from crashing otherwise. Is this ok or do you have another better idea? It is doable.
4. The utility rate of inname and overdraaien should be aroun 100% combined (since one should always be active). when i run the current simulation the cummulation of these two is only around 60-70%. Is my thinking wrong or is there something in the system causing this to be lower? How do you calculate the combined utility rate?
Hope you are doing fine.

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

Re: Modeling the incoming of ships problem

Post by DennisvLankeren »

Dear Josie,

The system is working completely now. Since the last help you provided it does exactly what it should, thank you very much.
For the combined utility rate i just added up the utility of overdraaien and inname but it doesnt match 100%. It does not really matter since i dont need to know the exact number here.

I have ran some experminets and although they take quite long due to all the code, they worked perfectly.

Thank you again for everythning,

Kind Regards,
Dennis
Post Reply