Discret function

Use this forum to post Vensim related questions.
Post Reply
morruu
Newbie
Posts: 1
Joined: Thu Mar 19, 2020 7:05 pm
Vensim version: DSS

Discret function

Post by morruu »

I have an Excel Sheet with information on tapping a furnace. The spreadsheet contains times (date, time) for the start of tapping and how long each bottling lasts.
What would be the best way to create a Vensim structure reads the spreadsheet and output 1 as long as a tapping is in progress and 0 when no tapping is in progress.

tomfid
Administrator
Posts: 2937
Joined: Wed May 24, 2006 4:54 am

Re: Discret function

Post by tomfid »

Not sure what tapping a furnace really means, but there are at least two options:

1. Create data (excel side) with 0 or 1 at every time step, representing whether tapping is underway, and just read that into a data variable.

2. Create data with 1 only at the times where tapping occurs, then change the data interpolation pattern to :RAW:. Then you can write and auxiliary that tests IF THEN ELSE( data = :NA:, 0, data ). That will fill in 0s anywhere there isn't a 1.

Either way, you could import as vdf or use GET XLS.

Post Reply