API¶
Settings¶
The following variables can be set in ptg.py, note that some of them have to match the indices in the input csv files.
- year_start, the year when the first facility was constructed in Germany
- duration, time until maximum capacity is installed
- cap_max, target maximum installed capacity in GWel
- share_sector, dictionary with the shares of cap_max per sector
- sector_sizes, dictionary with the sizes of the facilities in different sectors in MWel
- debt_share, share of debts in financing
- debt_interest_rate, interest rate for debts
- debt_term, runtime of debts
- income_tax, income tax rate
- upper_bound upper bound for investors expectation
- lower_bound, lowewr bound for investors expectations
- supportive, whether the political decisions are supportive
- det_weigt, dictionary for the determinants weights
- lower_bound_rate, lower growth rate (without political support)
Modules¶
-
class
Inve2st_cars.modules.DataBase.DataBase(dbname, host, user, password)¶ Bases:
objectBase class for Postgresql Database
-
execute_query(query)¶ Method for executing Postgresql query.
- query: str
- SQL Query
- r: str
- SQL Query Result
-
-
class
Inve2st_cars.modules.Queries.Query¶ Bases:
objectThis Class contains methods which help in generating SQL queries for various purposes in the Investment_Options Class.
-
query_applications(c_investment_options_description, c_application_characteristics_validity_time_pk, c_application_description, c_application_characteristics_scenario_pk, c_regions_name)¶ Query applications
- c_investment_options_description: str
- Investment option description
- c_application_characteristics_validity_time_pk: str
- Application characteristics validity time
- c_application_description: str
- Application Description
- c_application_characteristics_scenario_pk: str
- application characteristics scenario
- c_regions_name: str
- Regions Name
SQL string
-
query_applications_characteristics(c_investment_options_description, start_year, end_year, c_application_description, c_application_characteristics_scenario_pk, c_regions_name, tb_application_characteristic_types_description)¶ Query Application Characteristics Parameters ———- c_investment_options_description: str
Investment options description- start_year: str
- Start year
- end_year: str
- End year
- c_application_description: str
- Application description
- c_application_characteristics_scenario_pk: str
- Application characteristic scenario
- c_regions_name: str
- Regions Name
- tb_application_characteristic_types_description: str
- Application characteristic types description
SQL string
-
query_applications_characteristics_opts(c_investment_options_description, start_year, end_year, c_application_description, c_regions_name, tb_application_characteristic_types_description)¶ - c_investment_options_description: str
- Investment options description
- start_year: str
- Start year
- end_year: str
- End year
- c_application_description: str
- Application description
- c_regions_name: str
- Regions name
- tb_application_characteristic_types_description: str
- Application characteristic types description
SQL string
-
query_applications_demand(c_investment_options_description, start_year, end_year, c_application_description, c_application_characteristics_scenario_pk, c_regions_name, tb_application_characteristic_types_description)¶ - c_investment_options_description: str
- Investment options description
- start_year: str
- Start year
- end_year: str
- End year
- c_application_description: str
- Application description
- c_application_characteristics_scenario_pk: str
- Application characteristics scenario
- c_regions_name: str
- Regions name
- tb_application_characteristic_types_description: str
- Application characteristic types description
SQL string
-
query_applications_demand_opts(c_investment_options_description, start_year, end_year, c_application_description, c_regions_name, tb_application_characteristic_types_description)¶ - c_investment_options_description: str
- Investment options description
- start_year: str
- Start year
- end_year: str
- End year
- c_application_description: str
- Application description
- c_regions_name: str
- Regions name
- tb_application_characteristic_types_description: str
- Application characteristic types description
SQL string
-
query_applications_size(c_investment_options_description, starting_year, c_application_description, c_application_characteristics_scenario_pk, c_regions_name, tb_application_characteristic_types_description)¶ - c_investment_options_description: str
- Investment options description
- starting_year: str
- Starting year
- c_application_description: str
- Application description
- c_application_characteristics_scenario_pk: str
- Application characteristic scenario
- c_regions_name: str
- Regions name
- tb_application_characteristic_types_description: str
- Application characteristic types
SQL string
-
query_attribute_level_per_year(investment_option, attribute_sceanrio)¶
-
query_attribute_level_putility(investment_option, value_resolution)¶
-
query_attributes(investment_option)¶
-
query_car_stock_scenario(investment_option, car_stock_scenario_ID)¶
-
query_car_target_system(investment_option, car_target_system_scenario)¶
-
query_car_target_value(investment_option, car_target_scenario)¶
-
query_consumer_prices(c_investment_options_description, c_consumertype_description, c_consumption_prices_scenario, start_year, end_year)¶ - c_investment_options_description: str
- Investment options description
- c_consumertype_description: str
- Consumer type desciption
- c_consumption_prices_scenario: str
- Consumer prices scenario
- start_year: str
- Start year
- end_year: str
- End year
SQL string
-
query_consumer_prices_opts(c_investment_options_description, c_consumertype_description, start_year, end_year)¶ - c_investment_options_description: str
- Investment options description
- c_consumertype_description: str
- Consumer type description
- start_year: str
- Start year
- end_year: str
- End year
SQL string
-
query_consumer_prices_yearly_avg(c_investment_options_description, c_consumertype_description, c_consumption_prices_scenario, start_year, end_year)¶ - c_investment_options_description: str
- Investment options description
- c_consumertype_description: str
- Consumer type description
- c_consumption_prices_scenario: str
- Consumption prices scenario
- start_year: str
- Start year
- end_year: str
- End year
SQL string
-
query_discrete_attributes(investment_option)¶
-
query_economic_parameters(c_investment_options_description, c_regions_name, c_economic_parameter_validity_time, c_economic_parameter_scenario_pk)¶ - c_investment_options_description: str
- Investment options description
- c_regions_name: str
- Regions name
- c_economic_parameter_validity_time: str
- Economic parameter validity time
- c_economic_parameter_scenario_pk: str
- Economic parameter scenario
SQL string
-
query_economic_parameters_2(c_investment_options_description, c_regions_name, starting_year, c_economic_parameter_scenario_pk, c_economic_parameter_description)¶ - c_investment_options_description: str
- Investment options description
- c_regions_name: str
- Regions name
- starting_year: str
- Starting year
- c_economic_parameter_scenario_pk: str
- Economic parameter scenario
- c_economic_parameter_description: str
- Economic parameter description
SQL string
-
query_economic_parameters_economic_lifetime(c_investment_options_description, c_regions_name, starting_year, c_economic_parameter_scenario_pk, c_economic_parameter_description)¶ - c_investment_options_description: str
- Investment options description
- c_regions_name: str
- regions name
- starting_year: str
- starting year
- c_economic_parameter_scenario_pk: str
- Economic parameter scenario
- c_economic_parameter_description: str
- Economic parameter description
SQL string
-
query_economic_parameters_economic_lifetime_opts(c_investment_options_description, c_regions_name, starting_year, c_economic_parameter_description)¶ - c_investment_options_description: str
- Investment options description
- c_regions_name: str
- Regions name
- starting_year: str
- Starting year
- c_economic_parameter_description: str
- economic parameter description
SQL string
-
query_emissions_electricity_mix(specific_emissions_electricity_mix_scenario)¶
-
query_financial_parameters(c_investors_description, c_financial_parameter_scenario_pk, c_regions_name, c_financial_parameter_types_description, starting_year)¶ - c_investors_description: str
- Investors description
- c_financial_parameter_scenario_pk: str
- Financial parameter scenario
- c_regions_name: str
- Regions name
- c_financial_parameter_types_description: str
- Financial parameter types description
- starting_year: str
- Starting year
SQL string
-
query_financial_parameters_opts(c_investors_description, c_regions_name, c_financial_parameter_types_description, starting_year)¶ - c_investors_description: str
- Investors description
- c_regions_name: str
- Regions name
- c_financial_parameter_types_description: str
- Financial parameter types description
- starting_year: str
- Starting year
SQL string
-
query_historical_annual_installations()¶ SQL string
-
query_historical_annual_installations_main(c_investment_options_description, c_application_description, c_regions_name)¶ - c_investment_options_description: str
- Investment options description
- c_application_description: str
- Application description
- c_regions_name: str
- Regions name
SQL string
-
query_historical_annual_installations_pv()¶ SQL string
-
query_historical_annual_installations_sub(c_regions_name, c_application_description, tec)¶ - c_regions_name: str
- Regions name
- c_application_description: str
- Application description
- tec: str
- technology
SQL string
-
query_importances(investment_option, aggregation_level)¶
-
query_investment_costs(c_economic_parameter_description, c_investment_options_description, c_regions_name, c_economic_parameter_validity_time, c_economic_parameter_scenario_pk)¶ - c_economic_parameter_description: str
- Economic parameter description
- c_investment_options_description: str
- Investment options description
- c_regions_name: str
- Regions name
- c_economic_parameter_validity_time: str
- Economic parameter validity time
- c_economic_parameter_scenario_pk: str
- Economic parameter scenario
SQL string
-
query_investment_option_alternatives(investment_option)¶
-
query_market_phases()¶ SQL string
-
query_meteological_data()¶
-
query_nominal_rate(start_year)¶ - start_year: str
- Start year
SQL string
-
query_political_incentives(c_investment_options_description, c_application_description, c_political_instrument_scenario, tb_political_instrument_types_description)¶ - c_investment_options_description: str
- Investment options description
- c_application_description: str
- Application description
- c_political_instrument_scenario: str
- Political Instrument scenario
- tb_political_instrument_types_description: str
- Political instrument types description
SQL string
-
query_political_incentives_opt(c_investment_options_description, c_application_description, tb_political_instrument_types_description)¶ - c_investment_options_description: str
- Investment options description
- c_application_description: str
- Application description
- tb_political_instrument_types_description: str
- Political instrument types description
SQL string
-
query_potential(c_technology_pfk)¶ - c_technology_pfk: str
- technology primary key
SQL string
-
query_specific_consumption(investment_option, specific_consumption_scenario)¶
-
query_specific_emissions(investment_option, specific_emissions_scenario)¶
-
query_stoc_init_year(investment_option, year)¶
-
query_stock_scenario(c_application_description, c_investment_options_description, c_regions_name)¶ - c_application_description: str
- Application description
- c_investment_options_description: str
- Investment options description
- c_regions_name: str
- Regions name
SQL string
-
query_sub_group(main, sub, investment_option)¶
-
query_technical_lifetime(c_investment_options_description, c_technical_characteristics_types_description, c_technology_characteristics_validity_period_pk)¶ - c_investment_options_description: str
- Investment options description
- c_technical_characteristics_types_description: str
- Technical characteristics types description
- c_technology_characteristics_validity_period_pk: str
- Technology characteristics validity period
SQL string
-
query_technologies_name(tec_pk)¶
-
query_technology_relation(c_investment_options_description)¶ - c_investment_options_description: str
- Investment options description
SQL string
-
query_total_car_stock(investment_option)¶
-
query_total_car_stock_w_registration_year(investment_option)¶
-
query_utility_energy_transition()¶
-
query_utility_grid_independence()¶
-
query_utility_none_option(investment_option, value_resolution)¶
-
-
Inve2st_ptg.modules.save_data.prepare_data(sector_data)¶ Summation of the sectors capacity to get the overall data :param sector_data: sector data :return: overall capacity
-
Inve2st_ptg.modules.save_data.save_data(sector_data)¶ This function saves the relevant data as csv to results folder :param sector_data: sector data :return: