ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
FAQ Downloads Calendar Search Mark Forums Read

Q&A Using Flexsim and building models

Reply
 
Thread Tools Display Modes
  #1  
Old 03-11-2010
manuel fernandez's Avatar
manuel fernandez manuel fernandez is offline
Flexsim User
 
Join Date: Mar 2010
Location: Orense (Spain)
Posts: 4
Downloads: 0
Uploads: 0
Thanks: 2
Thanked 1 Time in 1 Post
Rep Power: 0
manuel fernandez is on a distinguished road
Smile 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.
Reply With Quote
  #2  
Old 03-11-2010
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 679
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

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.
Reply With Quote
The Following 4 Users Say Thank You to Steven Hamoen For This Useful Post:
Lars-Olof Leven (03-11-2010), manuel fernandez (03-11-2010), Tom David (03-11-2010), vivek dubey (07-18-2016)
  #3  
Old 03-11-2010
manuel fernandez's Avatar
manuel fernandez manuel fernandez is offline
Flexsim User
 
Join Date: Mar 2010
Location: Orense (Spain)
Posts: 4
Downloads: 0
Uploads: 0
Thanks: 2
Thanked 1 Time in 1 Post
Rep Power: 0
manuel fernandez is on a distinguished road
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT -6. The time now is 04:08 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.