Optimization subject to TIME/ Time as subscript?

Use this forum to post Vensim related questions.
Post Reply
bgencer1
Junior Member
Posts: 10
Joined: Fri Jul 14, 2017 10:46 am
Vensim version: DSS

Optimization subject to TIME/ Time as subscript?

Post by bgencer1 »

Hello,

I try to optimize a variable which is subject to time by using tomfid's following advice:

"TimeVec : (t1-t11)
IndicatedHiring[TimeVec] = 1,3,2,5,2, ...
Hiring = VECTOR LOOKUP(IndicatedHiring[t1],time,INITIAL TIME,FINAL TIME,0)

You then optimize to find the points of IndicatedHiring[TimeVec]."

I get an error message saying "No usable constant name.". What does it mean, why do I get it and what should I do?

Thanks for your help.
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: Optimization subject to TIME/ Time as subscript?

Post by tomfid »

We'd have to see your optimization control files (vpd & voc). I'd guess that you have a parameter in your voc that is not a constant.
bgencer1
Junior Member
Posts: 10
Joined: Fri Jul 14, 2017 10:46 am
Vensim version: DSS

Re: Optimization subject to TIME/ Time as subscript?

Post by bgencer1 »

Hello,

vpd & voc files are attached. I can also send you my model by e-mail.
Attachments
EXP Model V3.vpd
(21 Bytes) Downloaded 169 times
EXP Model V3.voc
(297 Bytes) Downloaded 166 times
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Optimization subject to TIME/ Time as subscript?

Post by Administrator »

The VOC (Vensim optimization control) only has one constant listed (IPABGG). You need to modify this to include the IndicatedHiring[TimeVec] constant as well.

This can be done via the opimization wizard (the "Choose optimization" part of the 2nd dialog, the one with the optimizer, random type etc settings).
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
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Optimization subject to TIME/ Time as subscript?

Post by Administrator »

The file should look something like

Code: Select all

:OPTIMIZER=Powell
:SENSITIVITY=Off
:MULTIPLE_START=RRandom
:RANDOM_NUMER=Default
:OUTPUT_LEVEL=On
:TRACE=Off
:MAX_ITERATIONS=1000
:RESTART_MAX=0
:PASS_LIMIT=2
:FRACTIONAL_TOLERANCE=0.01
:TOLERANCE_MULTIPLIER=21
:ABSOLUTE_TOLERANCE=1
:SCALE_ABSOLUTE=1
:VECTOR_POINTS=25
0<=IndicatedHiring[t1]<=1
0<=IndicatedHiring[t2]<=1
0<=IndicatedHiring[t3]<=1
0<=IndicatedHiring[t4]<=1
0<=IndicatedHiring[t5]<=1
0<=IndicatedHiring[t6]<=1
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
Post Reply