CYCLUS
Loading...
Searching...
No Matches
region_cost.cycpp.h
Go to the documentation of this file.
1
/// This includes the required header to add regional costs to archetypes.
2
/// One should only need to:
3
/// - '#include "toolkit/region_cost.cycpp.h"' in the header of the
4
/// archetype class (as private)
5
/// - Add `InitEconParameters()` to `EnterNotify()` in the cc file of the
6
/// archetype class.
7
8
/// How to add parameters to this file:
9
/// 1. Add the pragma. A default value MUST be added to ensure backwards
10
/// compatibility.
11
/// 2. Edit the unordered_map called "econ_params"
12
/// i. add the desired parameter to the array {"name", value}
13
/// ii. the value of the pair should be the variable name exactly
14
/// 3. Add "std::vector<int> cycpp_shape_<param_name> = {0};" to the end of the
15
/// file with the other ones, reaplcing <param_name> with the name you put
16
/// in the econ_params array (again, must match exactly).
17
18
// clang-format off
19
#pragma cyclus var { \
20
"default": 0.0, \
21
"uilabel": "Corporate Income Tax Rate as decimal", \
22
"range": [0.0, 1.0], \
23
"doc": "Income Tax Rate for all facilities belonging to this region as decimal (1% --> 0.01)", \
24
"units": "Dimensionless" \
25
}
26
double
corporate_income_tax_rate
;
27
// clang-format on
28
29
// Must be done in a function so that we can access the user-defined values
30
std::unordered_map<std::string, double>
GenerateParamList
()
const
{
31
std::unordered_map<std::string, double> econ_params{
32
{
"corporate_income_tax_rate"
,
corporate_income_tax_rate
}};
33
34
return
econ_params;
35
}
36
37
// Required for compilation but not added by the cycpp preprocessor. Do not
38
// remove. Must be one for each variable.
39
std::vector<int>
cycpp_shape_corporate_income_tax_rate
= {0};
cycpp_shape_corporate_income_tax_rate
std::vector< int > cycpp_shape_corporate_income_tax_rate
Definition
institution_cost.cycpp.h:92
corporate_income_tax_rate
double corporate_income_tax_rate
Definition
institution_cost.cycpp.h:35
GenerateParamList
std::unordered_map< std::string, double > GenerateParamList() const
Definition
region_cost.cycpp.h:30
src
toolkit
region_cost.cycpp.h
Generated by
1.13.2