CYCLUS
Loading...
Searching...
No Matches
institution_cost.cycpp.h
Go to the documentation of this file.
1/// This includes the required header to add institution costs to archetypes.
2/// One should only need to:
3/// - '#include "toolkit/institution_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": "Minimum acceptable rate of return", \
22 "range": [0.0, 1.0], \
23 "doc": "Minimum acceptable rate of return for the institution", \
24 "units": "Dimensionless" \
25 }
27
28#pragma cyclus var { \
29 "default": 0.0, \
30 "uilabel": "Corporate Income Tax Rate", \
31 "range": [0.0, 1.0], \
32 "doc": "Corporate income tax rate as decimal (1% --> 0.01)", \
33 "units": "Dimensionless" \
34 }
36
37#pragma cyclus var { \
38 "default": 0.0, \
39 "uilabel": "Bond-holder's Expected Rate of Return", \
40 "range": [0.0, 1.0], \
41 "doc": "Expected rate of return for bond holders as decimal (1% --> 0.01)", \
42 "units": "Dimensionless" \
43 }
45
46#pragma cyclus var { \
47 "default": 0.0, \
48 "uilabel": "Fraction of Initial Investment from Bonds", \
49 "range": [0.0, 1.0], \
50 "doc": "Fraction of initial investment financed through bonds as decimal (1% --> 0.01)", \
51 "units": "Dimensionless" \
52 }
54
55#pragma cyclus var { \
56 "default": 0.0, \
57 "uilabel": "Share-holder's Expected Rate of Return", \
58 "range": [0.0, 1.0], \
59 "doc": "Expected rate of return for share holders as decimal (1% --> 0.01)", \
60 "units": "Dimensionless" \
61 }
63
64#pragma cyclus var { \
65 "default": 0.0, \
66 "uilabel": "Fraction of Initial Investment from Private Capital", \
67 "range": [0.0, 1.0], \
68 "doc": "Fraction of initial investment financed through private capital as decimal (1% --> 0.01)", \
69 "units": "Dimensionless" \
70 }
72// clang-format on
73
74// Must be done in a function so that we can access the user-defined values
75std::unordered_map<std::string, double> GenerateParamList() const {
76 std::unordered_map<std::string, double> econ_params {
77 {"minimum_acceptable_return_rate", minimum_acceptable_return_rate},
78 {"corporate_income_tax_rate", corporate_income_tax_rate},
79 {"bond_holders_rate_of_return", bond_holders_rate_of_return},
80 {"fraction_bond_financing", fraction_bond_financing},
81 {"share_holders_rate_of_return", share_holders_rate_of_return},
82 {"fraction_private_capital", fraction_private_capital}
83 };
84
85 return econ_params;
86}
87
88
89// Required for compilation but not added by the cycpp preprocessor. Do not
90// remove. Must be one for each variable.
double minimum_acceptable_return_rate
This includes the required header to add institution costs to archetypes.
std::vector< int > cycpp_shape_fraction_bond_financing
std::vector< int > cycpp_shape_minimum_acceptable_return_rate
std::vector< int > cycpp_shape_share_holders_rate_of_return
double fraction_private_capital
double share_holders_rate_of_return
std::vector< int > cycpp_shape_fraction_private_capital
double bond_holders_rate_of_return
std::unordered_map< std::string, double > GenerateParamList() const
double fraction_bond_financing
std::vector< int > cycpp_shape_bond_holders_rate_of_return
std::vector< int > cycpp_shape_corporate_income_tax_rate
double corporate_income_tax_rate