A look up function was made for "EVs Average Mileage per KWh" where the miles increases every year so in the first year we have assumed an average driver will drive 50,000 km and in the 2nd year it will be 100,000 km and so on.
I want the mileages to increase every year so I used the funtion <year> with MODULO (year,1) and connected it to "Cost of EVs Opertion" that includes this formula (EVs Price Per KWh*(EVs Average Mileage per KWh(Yearly))
But it is giving me incorrect results.... For example for the first year it increases exponentially then decrease ...and I dont know how to fix it
MODULO function problem
MODULO function problem
- Attachments
-
- EDITEDfinalOneDYN.mdl
- (11.83 KiB) Downloaded 195 times
Re: MODULO function problem
Why are you using MODULO? Seems like it would only make sense if your time step were much smaller than a year. As is, it just oscillates from 0 to 0.5 because your time step is 0.5. It appears that you could simply use "time" directly.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: MODULO function problem
Thaank you for your reply but the time step is actually 1 but I guess I inputted 0.5 by mistake. However, if I kept it 1 then I will have a constant value for "Cost of EVs Opertion which does not make sense because it has to change every year
Re: MODULO function problem
Right. MODULO is behaving correctly. Any integer modulo 1 is 0. Any lookup given a constant input will have a constant output.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: MODULO function problem
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: MODULO function problem
Okay, so maybe am using MODULO in the wrong way because what am trying to do is change the EVs Average Mileage per KWh every year using look up function ....but how to demonstrate this without using MODULO ? Thank you
[(0,0)-(50,2e+08)],(0,50000),(1,100000),(2,150000),(3,200000),(4,250000),(5,300000),(6,350000),(7,400000),(8,450000),(9,500000),(10,550000),(11,600000),(12,650000),(13,700000),(14,750000),(15,800000),(16,850000),(17,900000),(18,950000),(19,1e+06),(20,1.5e+06),(21,2e+06),(22,2.5e+06)
[(0,0)-(50,2e+08)],(0,50000),(1,100000),(2,150000),(3,200000),(4,250000),(5,300000),(6,350000),(7,400000),(8,450000),(9,500000),(10,550000),(11,600000),(12,650000),(13,700000),(14,750000),(15,800000),(16,850000),(17,900000),(18,950000),(19,1e+06),(20,1.5e+06),(21,2e+06),(22,2.5e+06)
Re: MODULO function problem
Just use mylookup(time).
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/