I have been thinking on how to do a particular task using Vensim Pro for some days.
I have a schedule of power plants to be constructed in an excel file. But before I want to construct a plant, I want to evaluate the market price ( a variable that I have already determined). If the price is higher than the plant marginal price (a constant), I want to get the first power plants in the schedule. I know how to do it if I need to do it just once. But I want to repeat this cycle again when the next market price is higher than the plant marginal price where I would take the second power plant in the list.
Do you know how I can do this? Thanks
taking data from excel - one by one
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
I think we need a little more information ...
All GET XLS information is loaded at the beginning of a run. Why would the cell for a particular plant's information change? Is excel updating plant information dynamically?
Tom
All GET XLS information is loaded at the beginning of a run. Why would the cell for a particular plant's information change? Is excel updating plant information dynamically?
Tom
/*
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
*/
Actually I want the variable in Vensim that takes the data from Excel to be updated as the model runs. For example, first it takes the data from cell E1 and perform some task then take data from cell E2 and repeat the process till all the Excel data has been taken. My specific problem is I have a list in Excel with the plant name and its corresponding LRMC,capacity etc. When the market price> LRMC[Plant 1], I want to get the capacity [Plant 1] for my computation. Then when the market price> LRMC[Plant 2], I want to take the capacity[Plant 2] and so on. I hope my description is OK now.
Vensim seems to allow only taking data from one cell or a set of data with corresponding time.
I know how to do this using other programming language where I can assign counters and update a variable in a loop but not sure how I can do this with Vensim. That is why I am considering using VB. Will that be possible? TQ
Vensim seems to allow only taking data from one cell or a set of data with corresponding time.
I know how to do this using other programming language where I can assign counters and update a variable in a loop but not sure how I can do this with Vensim. That is why I am considering using VB. Will that be possible? TQ
OK ... now I understand. I think you want something like the attached model.
It builds plants in discrete increments, when market price > plant cost. In the case of a tie (two plants with same cost), both get built at the same time. If you don't want that, you could probably use VECTOR SORT to order plants and select one at a time.
Note that this model has no notion of demand, or construction underway, and thus might do silly things that a real plant construction decision would avoid.
It builds plants in discrete increments, when market price > plant cost. In the case of a tie (two plants with same cost), both get built at the same time. If you don't want that, you could probably use VECTOR SORT to order plants and select one at a time.
Note that this model has no notion of demand, or construction underway, and thus might do silly things that a real plant construction decision would avoid.
- Attachments
-
- PlantCapac.mdl
- (3.71 KiB) Downloaded 857 times
/*
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
*/