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.
A small example on how to handle planed production, storage amount and demand and if storage amount is not enough to create a special order to satisfy this demand.
The storage and the amount of products in the storage is virtual which means it is just a label on the VisualTool which shows the amount. If there are a lot of different products in the system a GlobalVariable Array or a Global Table could be used.
The main code is in the OnEntry of the Sink. The important data are in Global Table GeneralData and Arrival Schedule on the Source.
The print into the output console and the screen messages can be switch off under Parameter in the Model Control GUI (Do not forget to press Apply!).
Attention:
Do not delete or rename the object Logo_FlexsimD, because otherwise the model will not work correctly. Also do not rename, delete or re-rank other objects.