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.
Need help on sensitivity analysis of allocation priority
Need help on sensitivity analysis of allocation priority
- Attachments
-
- krreddi test files.zip
- (1.46 KiB) Downloaded 201 times
-
- Super Administrator
- Posts: 4592
- Joined: Wed Mar 05, 2003 3:10 am
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.
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.
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
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.
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.
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
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].