Page 1 of 1
Need help on sensitivity analysis of allocation priority
Posted: Sat Nov 20, 2010 8:26 pm
by krreddi
Hi,
I am trying do a sensitivity analysis using external file. So I have a text file in tab delimited with all the values of the changing variables. I have successfully done for normal auxiliary variables but I am having problems with changing priorities. I am using the allocate available function to allocate resources and I want to change the allocation priority via the values in the file.
My question how can we change the allocation priority from tab delimited text file? What is the format we need to use? For your information I am attaching the test files.
Posted: Sun Nov 21, 2010 9:44 am
by Administrator
Open up the Vensim help system, and click on the Reference Manual. Chapter 9 deals with getting data into your model (there is a section dedicated to "Tab delimited and spreadsheet data").
You can store the data in tab files (but need to import them to .VDF type files), or just link to the data within a spreadsheet.
Tony.
Posted: Sun Nov 21, 2010 10:39 am
by bob@vensim.com
You will need to specify the subscripts you want to change explicitly as in
Test Var1[One] Test Var1[Two] Flow res Allocation Priority[One,ppriority] Allocation Priority[One,ppriority] Allocation Priority[Two,ppriority
10 2 10 1 2 1
8 5 12 1 1 1
and so on
Posted: Sun Nov 21, 2010 3:24 pm
by krreddi
Bob,
I have used tab delimited file for sensitivity analysis successfully but for this case where I am trying to change the allocation priority I am getting error and of course I have no idea how to save the allocation priority value.
In normal case we have "Allocation Priority[One,pprofile]" as "1,2,4,0" where 2 represents the allocation priority. But, how can we represent this in a tab delimited file?. Please see the contents of the file and error I am getting below. The simulation file is attached in the previous mail.
Thanks
Krishna
-------------------------
Tab Delimited File content
Test Var1[One] Test Var1[Two] Flow res Allocation Priority[One,pprofile] Allocation Priority[Two,pprofile]
10 2 10 2 1
8 5 12 1 2
------------------
Error
ERROR: Bad constant - Test Var1[One] - in file Allocation Test Data Set 1.txt.
ERROR: Bad constant - Test Var1[Two] - in file Allocation Test Data Set 1.txt.
ERROR: Bad constant - Allocation Priority[One,pprofile] - in file Allocation Test Data Set 1.txt.
ERROR: Bad constant - Allocation Priority[Two,pprofile] - in file Allocation Test Data Set 1.txt.
Posted: Mon Nov 22, 2010 10:24 am
by bob@vensim.com
Look at my previous reply. You can not use a subscript range in the sensitivity control file, only subscript constants. So you will need to specify each element of Allocation Priority in a separate column. Since you have one and two that will require a total of 8 columns. If you only want to change priority (and not type, width or extra) you can just use the two entries. Allocation Priority[One,ppriority] and Allocation Priority[Two,ppriority].
Posted: Mon Nov 22, 2010 4:31 pm
by krreddi
Thanks Bob. I have missed the detail in your previous mail. It is working now.