Page 1 of 1

switches between exel data and endogeneous data

Posted: Mon Jan 14, 2008 8:52 am
by mayean
Hi,

I want to built a model, that consists of only one stock with an inflow. Inflow should grow for 5 time steps with1/time step. From time step 5-10 the model should take the last stock value, import it into an Exel sheet, where some numeric operation happens (say every value times 3). At time step 10 I would like the model to take the last value computed in the Exel sheet and let the inflow grow again with 1/time step till time 30.
As I am a beginner in Vensim, I have no Idea how to do that, and would really appreciate every help.

Greetings

[Edited on 1-14-2008 by mayean]

[Edited on 1-14-2008 by mayean]

[Edited on 1-14-2008 by mayean]

Posted: Mon Jan 14, 2008 9:08 am
by LAUJJL
Hi

Being a beginner in Vensim, it is better for you to express what you want to do, in Excel.
Each column representing a time step.
Then post the excel sheet, and it will be easy for anyone to translate it into Vensim.
Regards.
JJ

Posted: Mon Jan 14, 2008 9:46 am
by mayean
I posted the exel sheet, maybe I should express in a better manner what I want.
The general problem is that I want Vensim to take data for a period of time from exel. Before and after this time period I want the model to compute the inflow endogenous in the model.

Thanks for the reply!!

Posted: Mon Jan 14, 2008 10:22 am
by Administrator
>> import it into an Exel sheet, where some numeric operation
>> happens (say every value times 3).

This can be done, but you need to program it using external functions (build a custom DLL with the code to push/pull individual values from Excel).

It is possible that the calculation you want to do in Excel is easily replicated in Vensim, but you will have to give us some more information to help you (the example spreadsheet does not give much away).

Tony.

Posted: Mon Jan 14, 2008 3:10 pm
by mayean
Thank you Tony,

that sounds like a pretty difficult task, but gave me important hints for further research!

Posted: Mon Jan 14, 2008 4:17 pm
by LAUJJL
Hi

The excel sheet does not explain what you want to do.
You can express your calculations, using VBA if you know how to use it.
Regards.
JJ