ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
||||
|
||||
Demand Simulation
Hello everyone!
First of all I´d like to thank you for creating this forum, I have solved a lot of doubts here. I´m trying to simulate a simple supply chain with one supplier and one retailer.In order to simulate demand, I´m using a source like a way to create orders and I need it to follow a compound poisson distribution, that is, an exponetial interarrival time between orders and another distribution for the quantity of items in each order. There is an option called "batchprocessing" and I´m using it, but I´m not really sure if it is working like I want. This is part of the code: /**Batch Processing*/ /** \nReturn a time for a batch of products. The time will be evaluated once per batch.*/ /** \nItems per batch: */ int batchnumber = /**/normal(10,2,0)/**/; /** \nTime: */ double cycletime = /**/exponential(1,0.55,0)/**/; I´d like to know if someone could explain me how does this function work. I understand that you are specifying the time it takes the source to generate an amount of items, but if I change the batchnumber to an integer value like "100000000" it doesn´t change apparently. Sorry If this was already solved in another thread. I have used the search forum and I didn´t find something similar. Thanks and excuse my bad english. |
#2
|
||||
|
||||
I've taken a look at the complete code in the source and what it does is the following:
it samples a batchsize A and a cycletime B and then it starts producing products with an interarrival time of B until A products has left the source. BUT I think there is a bug. This rule works fine if you have a constant batch size but not if you use a sample because if you look in the rest of the code you see: if(fmod(getnodenum(stats_throughput(current)),batc hnumber) == 0) This line is meant to know when the batch is finished but this only works with fixed batch sizes. So please Flexsim Development put this on the bug list. Manuel, you could solve it by adding 2 labels similar to that of the cycletime. 1 label to store current batchsize and 1 label to store the target batchsize so that you know when the next batch change has to take place. |
The Following 4 Users Say Thank You to Steven Hamoen For This Useful Post: | ||
vivek dubey (07-18-2016) |
#3
|
||||
|
||||
Thanks a lot for the idea, Steven. I think it should work fine. I thought the cycletime was the time that the source would take to release the whole batch of items, instead of the time between items, so I was wrong.
|
Thread | Thread Starter | Forum | Replies | Last Post |
I would like the pick up from the rack in function of a variable demand rate... | mariogib | Q&A | 1 | 03-13-2009 10:53 PM |