Cancel
Showing results for 
Search instead for 
Did you mean: 

Loading of a train with MUs

Creator
Creator

Hi,

i´ve got the following problem in my simulation. I created a source, which produces a goods train and a source, which produces 20´ and 40´ containers. A reloading station should load the goods train with these containers. The problem now is that the maximum capacity of the train in my simulation sould be 100 TEU. A 20´ container is 1 TEU and a 40´container is 2 TEU. I already defined this in an user-defined attribute. So now I need to write a method, which includes the attributes and cause the train to drive as soon as the capacity of 100 TEU is reached. 

 

Right now the train is loaded per coincedence without the method and there can be scenarios, where the train is loaded with a capacity of 100 TEU +, because there is no difference between 20´and 40´containers.

 

Can somebody please help me to write the method, which includes the user-defined attributes and tells the train to start as soon as the capacity is reached.

 

Thanks in advance,

Lukas

27 REPLIES 27

Re: Loading of a train with MUs

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

can you post your model or a part of it?

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Loading of a train with MUs

Creator
Creator

Here it is :-).

Re: Loading of a train with MUs

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

before moving the container, you could check the train, if there is space for more container. If not --> reduce the capacity of the train. The TransferStation will check the capacity of the train after loading and release the train, if it is full (User Method of the Transferstation).

param i : integer
-- @ : waiting Target
-- ? : TransferStation

if i = 1 
	-- before starting the transfer to the TransferStation
	-- parts/target are ready	
	
elseif i = 2 
	-- before parts leaving the TransferStation	
	var t:table
	t.create	
	@.contentsList(t)
	if t.sumAttr({1,1}..{*,*},"TEU")+?.cont.TEU >=99 then
		--full with the next container
		@.xDim:=@.numMu+1--reduce the capacity of the train
	end
	
end

- the attribute of the container should be TEU (integer, value 1 or 2)

 

- the train is filled up to 100 or 99 TEU depend on the last container (if they arrive randomy), if you want to grant the filling up to 100 TEU, you need to block the container in blocks of 100 TEU, than you can change the value to >=100

- in reality you need to order the containers, the wagons can load either two 20 feet container or one 40 feet

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Loading of a train with MUs

Creator
Creator

Thanks in advance, looks really helpful! I will try it later.

Re: Loading of a train with MUs

Creator
Creator

The method works perfectly, thanks! I worked on the simulation the last days and there is antoher problem now. I calculated that I need 3 lanes for reloading and unloading with one straddle carrier each on the lane to re- and unload the train in time. Before I had one lane for re- and unloading and there was no problem, but after I adjusted the correct times in the simulation, it was clear I need 3 lanes each. 

 

The Problem now is that I need a method, which tells the Straddle Carrier to stay on their lane and to re- and unload the train on it as the straddle carrier did before on one lane. Can you help me?

 

I put the simulation in attachment for you (the one with 2 lanes and the new needed one with 6 lanes). I tried to open your attachment last time, but I couldn´t, because you´ve got a newer version of SimTalk than me. I work with SimTalk 2. Is it possible to save your version in this format, so I can open it?

 

Thanks in advance,

Lukas

Re: Loading of a train with MUs

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
the straddle carriers should load/unload the train in parallel?
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Loading of a train with MUs

Creator
Creator

Yes, otherwise they can´t load/unload the train in the set time.

Re: Loading of a train with MUs

Creator
Creator

Nevermind, I solved the problem. I had an error in reasoning there. One lane for loading and unloading is enough!

Re: Loading of a train with MUs

Creator
Creator

Hi Steffen,

 

as you can see in my simulation "2 lanes" everything works except from the import and export stock. If you simulate over a few days, the stock begins to grow too much (should be between 100-300 MUs). That´s because my straddle carriers need too much time for loading/unloading. The set times are realistic, so I can´t do anything about them. So I need 2 lanes for loading/unloading and as you mentioned before, the straddle carriers should load/unload in parallel. I also send you the simulation "4 lanes", where I tried to work on a second lane on the import side, but it doesn´t work as I wish. There is always just 1 straddle carrier loading/unloading and not both straddle carriers. Can you help me there, please?

 

Thanks in advance,

Lukas