The second simulation involves seasonal fluctuation of customers:
RRR(t) = RRRini + 100*sin(2*pi*time/52);
Simulate the model across 120 weeks, and plot on one graph the incoming orders and the production flow in the factory and on a second graph the levels of goods in retail, distribution, and the factory as functions of time: