Multi-crop SD model

Use this forum to post Vensim related questions.
Post Reply
geraldmashange
Junior Member
Posts: 8
Joined: Sat Oct 31, 2020 9:15 pm
Vensim version: PLE

Multi-crop SD model

Post by geraldmashange »

Hi,

I'm new to SD modeling. I'm trying to track the inventory of corn and wheat stored over a 12 month period. Each will be treated as a stock. The harvest times are different for each crop. Corn is harvested from September to October, and wheat is harvested from June to July.

I began with modeling corn. I assumed time 0 is September. The inflow to corn inventory must occur over two months. During these two months the outflow is very small if not non-existent. On the third month the outflow begins and is somewhat constant and its minimum occurs in month 12. How much flows out will be a function of demand for corn and the corn inventory available.

Problem 1:
I'm unable to make the corn inventory peak in time 2, then decay afterwards to its minimum in time 12. My current model attached is causing inventory to flatline. I tried including a delay.

Problem 2:
How can I include the model for wheat which begins accumulating wheat inventory in time 9 peaks after after 2 months, then decays, such that when I run the simulation I can see the evolution of both corn and wheat on the time=0 - time=12 scale?
Attachments
Corn Inventory Model.mdl
Corn Model
(3.46 KiB) Downloaded 142 times
Administrator
Super Administrator
Posts: 4589
Joined: Wed Mar 05, 2003 3:10 am

Re: Multi-crop SD model

Post by Administrator »

I'd start by putting units for all your parameters into the model and make sure it passes the units test. Any levels will probably be measured in "Bushels", any rates will be Bushels/month. Entering the units forces you to think about what you are actually calculating.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
geraldmashange
Junior Member
Posts: 8
Joined: Sat Oct 31, 2020 9:15 pm
Vensim version: PLE

Re: Multi-crop SD model

Post by geraldmashange »

I've made changes to the model I posted above. I'm focusing on one crop now. I have my new model simulating the growth of corn in time=3 and harvest beginning in time = 8. However, I'm unable to make the stock, "Grown Corn", non-negative. How can I make my "Harvesting" outflow drain the "Grown Corn" to zero?
Attachments
CornProduction.mdl
(2.77 KiB) Downloaded 153 times
Administrator
Super Administrator
Posts: 4589
Joined: Wed Mar 05, 2003 3:10 am

Re: Multi-crop SD model

Post by Administrator »

I've made a couple of changes to stop the level going negative.

I think you need to look again at the model though. I'm not an expert at all, I'd expect the process to be different from what you have. I'd expect the farmer to plant the corn (fairly quickly), after a delay it is ready for harvest, and then it is harvested. I've also uploaded a demo of this, the numbers in it are nonsense, but it shows you how I think things might work.

Hope this helps.
Attachments
demo.mdl
(3.54 KiB) Downloaded 145 times
CornProduction.mdl
(3.34 KiB) Downloaded 144 times
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
geraldmashange
Junior Member
Posts: 8
Joined: Sat Oct 31, 2020 9:15 pm
Vensim version: PLE

Re: Multi-crop SD model

Post by geraldmashange »

Administrator wrote: Sat Nov 14, 2020 7:12 am I've made a couple of changes to stop the level going negative.

I think you need to look again at the model though. I'm not an expert at all, I'd expect the process to be different from what you have. I'd expect the farmer to plant the corn (fairly quickly), after a delay it is ready for harvest, and then it is harvested. I've also uploaded a demo of this, the numbers in it are nonsense, but it shows you how I think things might work.

Hope this helps.
Thank you for the help. I like how your demo lays things out. I have a few questions about how I can adjust your model.
1. When the corn is planted at time=3, all the corn should be ready for harvest at time=8 since it takes 5 months for it to grow. When I adjust time for corn to mature to 5, the stock, corn ready for harvest, begins increasing at time = 8 and takes a month to reach the acres*yield value. I think it should be a vertical line at time= 8 instead. How could I make that change?
2. I believe farmers will have a constant rate of harvest, so if the corn ready for harvest is small, they should finish harvest quicker. How do I change the dynamics of rate corn harvested to do so but also ensure that corn ready for harvest is non-negative?
3. I'm slightly confused about the TIME STEP I should choose. My goal is to study corn production monthly. My understanding was that TIME STEP can cause rounding errors if I choose an inappropriate one. So is a TIME STEP of 1 correct here?
4. Lastly, is it possible to have the model regenerate the corn stocks? That is, since time=3 is March, am I able to have planting occur again at time=15 and have the system repeat itself again?
Administrator
Super Administrator
Posts: 4589
Joined: Wed Mar 05, 2003 3:10 am

Re: Multi-crop SD model

Post by Administrator »

geraldmashange wrote: Sat Nov 14, 2020 3:54 pm1. When the corn is planted at time=3, all the corn should be ready for harvest at time=8 since it takes 5 months for it to grow. When I adjust time for corn to mature to 5, the stock, corn ready for harvest, begins increasing at time = 8 and takes a month to reach the acres*yield value. I think it should be a vertical line at time= 8 instead. How could I make that change?
If you need finer detail on the timings, you will need to reduce the time step to more closely match your required level of detail. I think the time step is 1 month, so every decision/action will take at least this long.
geraldmashange wrote: Sat Nov 14, 2020 3:54 pm2. I believe farmers will have a constant rate of harvest, so if the corn ready for harvest is small, they should finish harvest quicker. How do I change the dynamics of rate corn harvested to do so but also ensure that corn ready for harvest is non-negative?
Change "MAXIMUM HARVEST RATE". The levels should not go below zero in the demo I created, look at the equation for "rate corn harvested", this has a check to take make sure the desired amount is removed from a stock, or everything in the stock which prevents it going negative.
geraldmashange wrote: Sat Nov 14, 2020 3:54 pm3. I'm slightly confused about the TIME STEP I should choose. My goal is to study corn production monthly. My understanding was that TIME STEP can cause rounding errors if I choose an inappropriate one. So is a TIME STEP of 1 correct here?
Use a time step such as 1/2, 1/4, 1/8, 1/16 etc. There is more info about time step at
http://www.vensim.com/documentation/ref_time_step.htm
geraldmashange wrote: Sat Nov 14, 2020 3:54 pm4. Lastly, is it possible to have the model regenerate the corn stocks? That is, since time=3 is March, am I able to have planting occur again at time=15 and have the system repeat itself again?
Yes. You can use a pulse function to generate things at a fixed repeating period, or maybe MODULO?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Post Reply