For example, suppose I have a model that calculates properties of the urban layout of cities. Suppose I've made a version for Arizona, and my file structure looks like this:
Code: Select all
CitySim.mdl
CityFileList.csv
Cities/Phoenix.csv
Cities/Tuscon.csv
Cities/Flagstaff.csv
Code: Select all
Cities/Phoenix.csv,Cities/Tuscon.csv,Cities/Flagstaff.csv
I imagine this would require two variables. For example, imagine there were a Vensim command called GET DIRECT STRINGS, and it reads the file paths inside CityFileList.csv in as text strings. Based on the GET DIRECT SUBSCRIPTS syntax, it would be something like:
Code: Select all
City Files[city] = GET DIRECT STRINGS('CityFileList.csv',',','A1','C1')
Code: Select all
City Properties[city1] = GET DIRECT DATA(City Files[city1],',','1','B2')
City Properties[city2] = GET DIRECT DATA(City Files[city2],',','1','B2')
City Properties[city3] = GET DIRECT DATA(City Files[city3],',','1','B2')