Dispatcher not working with 5 outputs

All topics on the Atoms in any Enterprise Dynamics Library.
Post Reply
Pirkule
Posts: 9
Joined: Sunday 16 February, 2014 - 10:58

Dispatcher not working with 5 outputs

Post by Pirkule »

Hi,

I have a small problem in my model with dispatcher atom.
In my model there is 1 Source atom, queue after the source, advanced transporter with destinator and dispatcher, 5 Queue atoms where products should be transported.
I'm using Label "destination" in source atom's trigger on exit to define where products should go.
Now everything works fine as long as i'm using "destination" value below 5, products go to Queues 1-4 as they should.
When using "destination" value 5 and trying to send products to Queue5 (which is connected via dispatchers output channel 5) model doesn't work anymore , products seems to go to channels 1-4 regardles of label "destination" value.
Same thing goes if i try to use any values higher than 4 with equal amount of destination queues.

I attached a small model to demonstrate this problem.
I'm working with a bigger model where i need to use more than 5 outputchannels with dispatcher and this problem is making me crazy as i dont see any reason why it shouldn't work.

I'm using my schools ED program as i'm doing my Bachelor's Thesis on a subject of simulation.
Program's version is 8.0 (Revision 1613).
Is this any known bug with this program's version? Or am I just doing something wrong?

Thanks in advance and regards,
Mikko
Attachments
Dispatcher_WTF.mod
(22.2 KiB) Downloaded 308 times
Pirkule
Posts: 9
Joined: Sunday 16 February, 2014 - 10:58

Re: Dispatcher not working with 5 outputs

Post by Pirkule »

Oops! Some typos....

I ment with "Queue5 (which is connected via dispatchers output channel 5)" that queue5 is connected to destinator's output channel 5.
and....
destination value is not defined in source's trigger on exit but on queue's after it.

I didn't find any reference to this problem/bug from forum or ED's release notes.

Hjelp!!
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: Dispatcher not working with 5 outputs

Post by marlies »

Hi,

This is indeed a bug in the standard code of this sendto statement. You can solve the problem doing the following:

- click the small square button that becomes visible when you click the arrow down fo the sendto statement.
- Replace the following code that you'll see there:

Code: Select all

if(ddb([destination],rank(1,c))<=0,1,min(ddb([destination],rank(1,c)),nroc(c)))
- by this code:

Code: Select all

if(ddb([destination],rank(1,c))<=0,1,min(ddb([destination],rank(1,c)),nroc(out(1,c))))
The old code is checking the nr of outputchannels of c (which is the transporter), but that should be out(1,c) (the destinator).

Regards, Marlies
Pirkule
Posts: 9
Joined: Sunday 16 February, 2014 - 10:58

Re: Dispatcher not working with 5 outputs

Post by Pirkule »

Hi marlies,

Thanks for your reply. That solved my problem! It didn't occur me at all to check the code behind that sendto statement. That should have been the obviuos place to look at as the transporter had only 4 outputs channel and error was accuring after the fifth channel was activated. Better to start looking for where my brain's turn on button is :oops:

Thanks again!

Regards,
Mikko
Post Reply