Page 1 of 1

Discret function

Posted: Thu Mar 19, 2020 8:25 pm
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.

Re: Discret function

Posted: Thu Mar 19, 2020 8:49 pm
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.