Get Auxiliary Value At Specific Time

Use this forum to post Vensim related questions.
Post Reply
calon
Junior Member
Posts: 2
Joined: Thu Oct 16, 2014 7:59 pm
Vensim version: PRO

Get Auxiliary Value At Specific Time

Post by calon »

Dear,

I'm working on a project system dynamics for my course on system dynamics, so I'm relatively new to this modelling world.

We are working on a project on solar systems and trying to create some very basic policy recommendations.
So far we have been modelling the technological progress on the technology itself and want to use data from this run in a model on return on investment.

So we want to model the life time of different "generation" solar systems based on the technological specifications at different times.
Basically we want to use the obtained data from the submodel to calculate the time it takes for the system to break even.

With the technological specification of a system we determine the cost price of a kWh energy during the systems lifetime.
This changes as technology advanced, but for calculating the return on investment of a certain system type we need the fixed cost price at the given time.

Generating the graphs for the technological specifications wasn't a problem at all, but creating constants which are equal to a point of this graphs on a specific time is. We threw together a stock flow which gets a pulse at a specified time. This works but contaminates the model, so we're wondering if there's a better solution for this problem.

I'm a student at Delft University of Technology following an introductory course on system dynamics.
So far I'm really liking the course, so I'm really eager to learn more on this subject.

I really hope someone can help us out.
Many thanks in advance.


Sincerely,
Calon
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: Get Auxiliary Value At Specific Time

Post by Administrator »

Can you use the table tool to get the value you need?

Or if you need it during a simulation, SAMPLE IF TRUE might do what you need.
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
calon
Junior Member
Posts: 2
Joined: Thu Oct 16, 2014 7:59 pm
Vensim version: PRO

Re: Get Auxiliary Value At Specific Time

Post by calon »

Sample if True did the trick!
Sample if True (Time = Initial Time + 5, Value, 0)

Thank you very much!
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: Get Auxiliary Value At Specific Time

Post by tomfid »

A small word of caution:

A formulation that tests for Time = Value can fail unexpectedly due to roundoff error, especially when TIME STEP is not a power of 2.

To protect against this, you can check against Value <= Time < Value + TIME STEP, or use the PULSE function with width TIME STEP as your event switch, e.g. PULSE( Time+Offset, TIME STEP ).

Also, you should make the 5 in your equation an explicit parameter, so that (a) units balance even with strict testing, and (b) it's visible and exposed to sensitivity analysis or other experiments.
Post Reply