Conditional distribution over the servers
Conditional distribution over the servers
Hey,
I was wondering if someone is able to help me with a problem that i came a cross.
What i want to do i is give all incoming customers who enter the Queue give them a number random number between 0 and 30.
All customers have 10 or less products go to cashregister1 and all other customers who have more then 10 products go to cashregisters 2 to 10. Anyone that can help me with this problem?
I was wondering if someone is able to help me with a problem that i came a cross.
What i want to do i is give all incoming customers who enter the Queue give them a number random number between 0 and 30.
All customers have 10 or less products go to cashregister1 and all other customers who have more then 10 products go to cashregisters 2 to 10. Anyone that can help me with this problem?
Re: Conditional distribution over the servers
Hi,
What you need to do is set a label when you create the products (e.g. exittrigger of the source). In the attached example model I assigned a value uniformly distributed from 1-30. But you could also use an empirical distribution (category tools) when the distribution is not uniform.
In the queues you use the label to determine where the products should go. For the label <=10 to channel 1. For the other values to e.g. a random open channel.
I implemented this in the sendto statements of the different queues in the attached model.
Success, Marlies
What you need to do is set a label when you create the products (e.g. exittrigger of the source). In the attached example model I assigned a value uniformly distributed from 1-30. But you could also use an empirical distribution (category tools) when the distribution is not uniform.
In the queues you use the label to determine where the products should go. For the label <=10 to channel 1. For the other values to e.g. a random open channel.
I implemented this in the sendto statements of the different queues in the attached model.
Success, Marlies
- Attachments
-
- 20130124_Cashregister.mod
- (23 KiB) Downloaded 374 times
Re: Conditional distribution over the servers
Thanks alot for the quick response.
This is helped me alot!
This is helped me alot!
Re: Conditional distribution over the servers
Any chance u could also help me out with the following.
the cash registers need to only open when a certain amount of people are in queue 0-3 in one cash register
4-6 the second cash registers opens etc.
And if the amount of customers reduces the cash registers close again.
the cash registers need to only open when a certain amount of people are in queue 0-3 in one cash register
4-6 the second cash registers opens etc.
And if the amount of customers reduces the cash registers close again.
Re: Conditional distribution over the servers
Hi,
You can check the contents of the queue and decide about the channel/queue to use depending on the content.
For example in the common queue you would like to check the content of the queue connected to the 1st output channel, the 4Dscript to do that would be:
So, you will need to write some calculation to decide how many cash registers are in use.
Regards, Marlies
You can check the contents of the queue and decide about the channel/queue to use depending on the content.
For example in the common queue you would like to check the content of the queue connected to the 1st output channel, the 4Dscript to do that would be:
Code: Select all
content(out(1,c))
Regards, Marlies
Re: Conditional distribution over the servers
Found i use a attribute for say if open or not
thank u
thank u
- HarryBunnik
- Posts: 362
- Joined: Monday 07 February, 2011 - 11:22
Re: Conditional distribution over the servers
Hello Zola,
Can you clarify your question a bit? I'm afraid that I'm not sure what you want to ask.
Cheers,
Harry
Can you clarify your question a bit? I'm afraid that I'm not sure what you want to ask.
Cheers,
Harry