11-29-2014, 07:51 PM
Ah, I see. The pre-calculated table format is correct for this purpose. However, to use the data as objective functions, you need to specify it in the .rvi file. Below is the 5ZoneCostEst.rvi file in the example_2-rvx_E+v8.1\ folder in the jEPlus package:
You will need to fill in the !-user spreadsheet block with the relevant information. The "columns to extract" list should start from '3', which is the fourth column in the pre-calc table.
I can imagine if you have a large number of cases, this file will be quite difficult to compile. This is why we are ditching it for a more flexible Python solution, which will come with the next release of jEPlus+EA. For the time being, though, there is another (undocumented) trick you can use. The job_ids in the table can be regular expressions, which means you can use one row to cover multiple cases.
For example if you have 6 parameters (including the IDF model), a job_id should look like EP-0_0_0_0_0_0. If only parameter 2 and 3 make difference to your daysim results, you can write rows like these:
So the first row assign 2234.8 to all cases whose job_ids have 0 and 0 for the 2nd and the 3rd parameters, respectively. If you haven't used regular expression before, this can be a bit of learning curve; but it is a very powerful tools.
Yi
Code:
eplusout.mtr
eplusout.csv
Electricity:Facility
0
!-sqlite
! Output file name; Column headers; SQL command
ChillerCap; Chiller Nominal Capacity
ConsCost; Construction Cost
!-end sqlite
!-user spreadsheet
! Output file name; User spreadsheet file name; columns to extract (e.g. 3,5, 6, 7)
!-end user spreadsheet
!-objectives
! Name of the objective; unit; formula (c0,c1, c2... are columns in the result table generated from the statements above)
Electricity; kWh; c0/1000/3600
Chiller Capacity; kW; c1/1000
Construction Cost; $/m2; c2
!-end objectives
You will need to fill in the !-user spreadsheet block with the relevant information. The "columns to extract" list should start from '3', which is the fourth column in the pre-calc table.
I can imagine if you have a large number of cases, this file will be quite difficult to compile. This is why we are ditching it for a more flexible Python solution, which will come with the next release of jEPlus+EA. For the time being, though, there is another (undocumented) trick you can use. The job_ids in the table can be regular expressions, which means you can use one row to cover multiple cases.
For example if you have 6 parameters (including the IDF model), a job_id should look like EP-0_0_0_0_0_0. If only parameter 2 and 3 make difference to your daysim results, you can write rows like these:
Code:
Id,Job_Id,reserved,
0,EP-[0-9]+_0_0_[0-9]+_[0-9]+_[0-9]+,-,2234.8
1,EP-[0-9]+_0_1_[0-9]+_[0-9]+_[0-9]+,-,2101.8
2,EP-[0-9]+_0_2_[0-9]+_[0-9]+_[0-9]+,-,2058.6
3,EP-[0-9]+_1_0_[0-9]+_[0-9]+_[0-9]+,-,2188.7
...
So the first row assign 2234.8 to all cases whose job_ids have 0 and 0 for the 2nd and the 3rd parameters, respectively. If you haven't used regular expression before, this can be a bit of learning curve; but it is a very powerful tools.
Yi