bad lookup initializing delay

Use this forum to post Vensim related questions.
Post Reply
Baschwitz
Junior Member
Posts: 9
Joined: Mon May 18, 2020 8:48 am
Vensim version: DSS

bad lookup initializing delay

Post by Baschwitz »

Hello,

I am using the delay conveyor function to exit units from a stock precisely each year.
I have two error messages:
bad lookup initializing delay
floating point error

Are these two errors related

Sometimes when I start a run it even crashes Vensim which closes suddenly and then the file closes each time it is reopened.

Thank you for your help,
AB
Attachments
bad init.mdl
(7.18 KiB) Downloaded 221 times
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: bad lookup initializing delay

Post by Administrator »

It looks like there is a bug with the :EXCEPT: statements, I'm looking into it now.

In the meantime, you can use the attached model and CIN file to do what you need to. I've put the lookup table into the CIN file, to use it, you click Model->Simulate and on the changes tab, click "Load changes from" and select the CIN file.
Attachments
bad init.mdl
(6.79 KiB) Downloaded 243 times
lookups.cin
(666 Bytes) Downloaded 232 times
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
Baschwitz
Junior Member
Posts: 9
Joined: Mon May 18, 2020 8:48 am
Vensim version: DSS

Re: bad lookup initializing delay

Post by Baschwitz »

Hello,
Thank you for your quick answer. I will look at your proposal. I don't know the CIN files...
Did you have time to look further where there is a bug?

Thanks,
AB
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: bad lookup initializing delay

Post by Administrator »

There is a bug here, but it's not something we can fix quickly. It's related to the :EXCEPT: statements for the lookups.

CIN files are easy to use and are good for keeping input data separate from the model. They are plain text and contain a list of constants/lookups to use in the model.
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
Baschwitz
Junior Member
Posts: 9
Joined: Mon May 18, 2020 8:48 am
Vensim version: DSS

Re: bad lookup initializing delay

Post by Baschwitz »

I'm new to VENSIM and I'm having a really hard time with data management.
How do you create a CIN file?
And would it be possible to initialize the conveyor with information year by year rather than like this:
(2010,0),(2021,0),(2021,1),(2022,1),
(2022,6),(2023,6),(2023,5),(2024,5),
(2024,3),(2026,3),(2026,1),(2030,1),
(2030,0),(2050,0))

Thanks,
AB
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: bad lookup initializing delay

Post by Administrator »

CIN files are plain text, you can create them with any text editor (including Vensim).

Click File->Edit text and that will get you started.

Regarding initialisation, you can do it year by year. To create the sample CIN file, all I did was copy/paste the values from your model.
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
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: bad lookup initializing delay

Post by tomfid »

Baschwitz
Junior Member
Posts: 9
Joined: Mon May 18, 2020 8:48 am
Vensim version: DSS

Re: bad lookup initializing delay

Post by Baschwitz »

Hello,
I've made a bit of progress on the issue of CIN files and the initialisation of lookups. However, when I change Something in the CIN and then Simulate and "load changes from" it does'nt take the changes into account. What am I doing wrong?
Thanks in advance,
Anne
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: bad lookup initializing delay

Post by Administrator »

Can you detail step by step what you are doing? CIN files work fine for me.
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
Baschwitz
Junior Member
Posts: 9
Joined: Mon May 18, 2020 8:48 am
Vensim version: DSS

Re: bad lookup initializing delay

Post by Baschwitz »

Hello,
I had finally succeeded in initializing my lookup (before I did not do correctly to choose the file in "simulation control") but now when I want to edit file to see the lookups.CIN file it suddenly closes VENSIM. And I didn't do anything new except install the new version of VENSIM ... Can you help me?
Can you also explain to me how to present this data more simply with data for each time step.
Thanks in advance, Anne
Attachments
lookups 06-30.cin
(596 Bytes) Downloaded 222 times
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: bad lookup initializing delay

Post by Administrator »

Are you on Windows or Mac? And what is the exact version of Vensim you are using?

>> Can you also explain to me how to present this data more simply with data for each time step.
The format of the data is hopefully fairly easy to follow. For example, if I wanted an additional point in the lookup below at time = 2010.5,

change
PROFIL D'ARRÊT OU DE PROLONGEMENT DE L'EXISTANT[GENII 1450](
(2010,0),(2039,0),(2039,1),(2043,1),(2043,0),(2050,0))

to
PROFIL D'ARRÊT OU DE PROLONGEMENT DE L'EXISTANT[GENII 1450](
(2010,0),(2010.5,1),(2039,0),(2039,1),(2043,1),(2043,0),(2050,0))
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
Baschwitz
Junior Member
Posts: 9
Joined: Mon May 18, 2020 8:48 am
Vensim version: DSS

Re: bad lookup initializing delay

Post by Baschwitz »

Hello,I am on Windows. Last week I have installed the latest version 8.1.0 of the Vensim DSS.

For me, since I have lots of datas to enter to initialise the conveyors (18 subscripts over 40 years) it would be easier just to take them from an excel file with one line the time and one line the datas.

Thanks in advance,
Anne
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: bad lookup initializing delay

Post by Administrator »

Are you using the new GUI? If yes, can you try Tools->Switch back to old sketch, hopefully the text editor will now work.

How long do things stay on the conveyor? You only need to initialize the conveyor for this period. 40 years does seem like a long conveyor. But I don't know what you are attempting to build a model of.
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
Baschwitz
Junior Member
Posts: 9
Joined: Mon May 18, 2020 8:48 am
Vensim version: DSS

Re: bad lookup initializing delay

Post by Baschwitz »

What is the new GUI?
No, I think I am with the old one since it says "switch to new sketch (beta)
The text editor doesn't work in the old or new version.

I am modelling the energy sector and some power plants have 40 years of lifetime.

Anne
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: bad lookup initializing delay

Post by Administrator »

I'm getting version 8.1.1 ready at the moment, that should fix the text editor problems.

>> I am modelling the energy sector and some power plants have 40 years of lifetime.
ok. Do you really need the conveyor to be 40 years long?
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
Baschwitz
Junior Member
Posts: 9
Joined: Mon May 18, 2020 8:48 am
Vensim version: DSS

Re: bad lookup initializing delay

Post by Baschwitz »

OK for the new version. But I have the impression of always falling on the bugs of Vensim...

Regarding the question of the conveyors, I do not understand what you are saying. If I want the power plant to remain in the conveyor for the duration of its lifespan, the lifespan has to be 40 years. I must therefore distribute the initial units over the 40 years, musn't I?

Besides I have another question: in the attached file I modeled more simply the lookup. But as a result, I don't have exactly integer numbers of power plants that are shut down every year. It looks like it interpolates the datas and takes the mid-year value? But that's not what I want. I want to keep integer numbers of power plants.

Thanks,
Anne
Attachments
hgf.mdl
(4.05 KiB) Downloaded 202 times
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: bad lookup initializing delay

Post by tomfid »

I generally avoid conveyors, because the discrete lifetime implied is not realistic for most capital goods. Early or delayed retirement is common. A third order delay is often sufficient to capture the distribution.

A conveyor is more realistic for something like mortgages or bonds, which have a fixed lifetime, though even then, aggregation may inject enough diversity into the lifetime for this not to matter.
Baschwitz
Junior Member
Posts: 9
Joined: Mon May 18, 2020 8:48 am
Vensim version: DSS

Re: bad lookup initializing delay

Post by Baschwitz »

what you are explaining may work when the number of units is large. In my model these are energy production plants that I install and uninstall. They must be whole numbers and not half factories. And they have specific lifespans.

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

Re: bad lookup initializing delay

Post by tomfid »

Makes sense. Because the number of units is small, it might be simpler to have an array of individual units, rather than using conveyors. Then each unit can easily have a unique retirement date, and that date can be changed if there's a retrofit, accident, etc.
Post Reply