This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
howtos:toolcoding:mapex2 [2011/06/13 21:45] chris.strashok created |
howtos:toolcoding:mapex2 [2011/06/13 22:13] (current) chris.strashok |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Full Matrix Mapping - Element mapping example supporting tool script code ====== | ====== Full Matrix Mapping - Element mapping example supporting tool script code ====== | ||
+ | ===== source data from one element to another ===== | ||
<code> | <code> | ||
Line 16: | Line 17: | ||
local fuelEm_DB[fTypeDB,em] = create (; dim=fuelType_DB, dim=emission, \ | local fuelEm_DB[fTypeDB,em] = create (; dim=fuelType_DB, dim=emission, \ | ||
- | dataFormat="odometer", \ | + | dataFormat="odometer", \ |
- | delimiter=",", \ | + | delimiter=",", \ |
- | firstLine=2, firstCol=2, \ | + | firstLine=2, firstCol=2, \ |
- | ignoreExtraLines=on, \ | + | ignoreExtraLines=on, \ |
- | ignoreExtraCols=on, \ | + | ignoreExtraCols=on, \ |
- | file=$fullFileName) | + | file=$fullFileName) |
+ | |||
+ | localinformant fuelType_model[] = create (; object=set, \ (note what is in this informant instead of showing the code to construct it) | ||
+ | desc="fuel types in the simulation model", \ | ||
+ | elemName1="Gasoline", \ | ||
+ | elemName2="Diesel", \ | ||
+ | elemName3="IFO") | ||
</code> | </code> | ||
+ | ===== source data from one element to many elements in the model with and without splits ===== | ||
+ | |||
+ | <code> | ||
+ | localinformant fuelType_DB[] = create (; object=set, delimiter=",", \ | ||
+ | allowDuplicate=on, \ | ||
+ | elemNamesFromColNum=1, firstLine=2, \ | ||
+ | lastLine=4, \ | ||
+ | file=$fullFileName) | ||
+ | |||
+ | localinformant emission[] = create (; object=set, delimiter=",", \ | ||
+ | allowDuplicate=on, \ | ||
+ | elemNamesFromLineNum=1, firstCol=2, \ | ||
+ | lastCol=4, \ | ||
+ | file=$fullFileName) | ||
+ | |||
+ | local fuelEm_DB[fTypeDB,em] = create (; dim=fuelType_DB, dim=emission, \ | ||
+ | dataFormat="odometer", \ | ||
+ | delimiter=",", \ | ||
+ | firstLine=2, firstCol=2, \ | ||
+ | ignoreExtraLines=on, \ | ||
+ | ignoreExtraCols=on, \ | ||
+ | file=$fullFileName) | ||
+ | |||
+ | localinformant fuelType_model[] = create (; object=set, \ (note what is in this informant instead of showing the code to construct it) | ||
+ | desc="fuel types in the simulation model", \ | ||
+ | elemName1="Gasoline", \ | ||
+ | elemName2="Diesel", \ | ||
+ | elemName3="IFO", \ | ||
+ | elemName4="HFO") | ||
+ | </code> |