Project Alice
Loading...
Searching...
No Matches
economy Namespace Reference

Classes

struct  building_information
 
struct  commodity_profit_holder
 
struct  commodity_set
 
struct  construction_status
 
struct  global_economy_state
 
struct  new_factory
 
struct  profit_distribution
 
struct  rgo_workers_breakdown
 
struct  small_commodity_set
 
struct  upgraded_factory
 

Enumerations

enum class  province_building_type : uint8_t {
  railroad , fort , naval_base , bank ,
  university , last , factory , province_selector ,
  province_immigrator
}
 
enum class  economy_reason {
  pop , factory , rgo , artisan ,
  construction , nation , stockpile , overseas_penalty
}
 
enum  commodity_production_type { primary , derivative , both }
 
enum class  worker_effect : uint8_t { none = 0 , input , output , throughput }
 

Functions

void register_demand (sys::state &state, dcon::nation_id n, dcon::commodity_id commodity_type, float amount, economy_reason reason)
 
void register_intermediate_demand (sys::state &state, dcon::nation_id n, dcon::commodity_id commodity_type, float amount, economy_reason reason)
 
void register_construction_demand (sys::state &state, dcon::nation_id n, dcon::commodity_id commodity_type, float amount)
 
void register_domestic_supply (sys::state &state, dcon::nation_id n, dcon::commodity_id commodity_type, float amount, economy_reason reason)
 
template void for_each_new_factory< std::function< void(new_factory)> > (sys::state &, dcon::state_instance_id, std::function< void(new_factory)> &&)
 
template void for_each_upgraded_factory< std::function< void(upgraded_factory)> > (sys::state &, dcon::state_instance_id, std::function< void(upgraded_factory)> &&)
 
bool can_take_loans (sys::state &state, dcon::nation_id n)
 
float interest_payment (sys::state &state, dcon::nation_id n)
 
float max_loan (sys::state &state, dcon::nation_id n)
 
int32_t most_recent_price_record_index (sys::state &state)
 
int32_t previous_price_record_index (sys::state &state)
 
int32_t most_recent_gdp_record_index (sys::state &state)
 
int32_t previous_gdp_record_index (sys::state &state)
 
float ideal_pound_conversion_rate (sys::state &state, dcon::nation_id n)
 
float gdp_adjusted (sys::state &state, dcon::nation_id n)
 
float full_spending_cost (sys::state &state, dcon::nation_id n)
 
void populate_army_consumption (sys::state &state)
 
void populate_navy_consumption (sys::state &state)
 
void populate_construction_consumption (sys::state &state)
 
float commodity_daily_production_amount (sys::state &state, dcon::commodity_id c)
 
float stockpile_commodity_daily_increase (sys::state &state, dcon::commodity_id c, dcon::nation_id n)
 
float global_market_commodity_daily_increase (sys::state &state, dcon::commodity_id c)
 
bool has_factory (sys::state const &state, dcon::state_instance_id si)
 
void initialize_artisan_distribution (sys::state &state)
 
void initialize_needs_weights (sys::state &state, dcon::nation_id n)
 
float need_weight (sys::state &state, dcon::nation_id n, dcon::commodity_id c)
 
void rebalance_needs_weights (sys::state &state, dcon::nation_id n)
 
void convert_commodities_into_ingredients (sys::state &state, std::vector< float > &buffer_commodities, std::vector< float > &buffer_ingredients, std::vector< float > &buffer_weights)
 
void presimulate (sys::state &state)
 
bool has_building (sys::state const &state, dcon::state_instance_id si, dcon::factory_type_id fac)
 
bool is_bankrupt_debtor_to (sys::state &state, dcon::nation_id debt_holder, dcon::nation_id debtor)
 
bool nation_is_constructing_factories (sys::state &state, dcon::nation_id n)
 
bool nation_has_closed_factories (sys::state &state, dcon::nation_id n)
 
float base_artisan_profit (sys::state &state, dcon::nation_id n, dcon::commodity_id c)
 
float artisan_scale_limit (sys::state &state, dcon::nation_id n, dcon::commodity_id c)
 
bool valid_artisan_good (sys::state &state, dcon::nation_id n, dcon::commodity_id cid)
 
float pseudo_exp_for_negative (float f)
 
float get_artisans_multiplier (sys::state &state, dcon::nation_id n)
 
float max_artisan_score (sys::state &state, dcon::nation_id n, float multiplier)
 
float total_artisan_exp_score (sys::state &state, dcon::nation_id n, float multiplier, float max_score)
 
float get_artisan_distribution_fast (sys::state &state, dcon::nation_id n, dcon::commodity_id c, float max_score, float total_score, float multiplier)
 
float get_artisan_distribution_slow (sys::state &state, dcon::nation_id n, dcon::commodity_id c)
 
void adjust_artisan_balance (sys::state &state, dcon::nation_id n)
 
void initialize (sys::state &state)
 
float sphere_leader_share_factor (sys::state &state, dcon::nation_id sphere_leader, dcon::nation_id sphere_member)
 
void absorb_sphere_member_production (sys::state &state, dcon::nation_id n)
 
void give_sphere_leader_production (sys::state &state, dcon::nation_id n)
 
float effective_tariff_rate (sys::state &state, dcon::nation_id n)
 
float global_market_price_multiplier (sys::state &state, dcon::nation_id n)
 
void update_factory_triggered_modifiers (sys::state &state)
 
float subsistence_size (sys::state const &state, dcon::province_id p)
 
float rgo_effective_size (sys::state const &state, dcon::nation_id n, dcon::province_id p, dcon::commodity_id c)
 
float rgo_total_effective_size (sys::state &state, dcon::nation_id n, dcon::province_id p)
 
float subsistence_max_pseudoemployment (sys::state &state, dcon::nation_id n, dcon::province_id p)
 
float rgo_total_employment (sys::state &state, dcon::nation_id n, dcon::province_id p)
 
float rgo_max_employment (sys::state &state, dcon::nation_id n, dcon::province_id p, dcon::commodity_id c)
 
float rgo_total_max_employment (sys::state &state, dcon::nation_id n, dcon::province_id p)
 
void update_local_subsistence_factor (sys::state &state)
 
float adjusted_subsistence_score (sys::state &state, dcon::province_id p)
 
void update_land_ownership (sys::state &state)
 
int32_t factory_priority (sys::state const &state, dcon::factory_id f)
 
void set_factory_priority (sys::state &state, dcon::factory_id f, int32_t priority)
 
bool factory_is_profitable (sys::state const &state, dcon::factory_id f)
 
void update_rgo_employment (sys::state &state)
 
float factory_max_employment (sys::state const &state, dcon::factory_id f)
 
float factory_primary_employment (sys::state const &state, dcon::factory_id f)
 
float factory_secondary_employment (sys::state const &state, dcon::factory_id f)
 
float factory_total_employment (sys::state const &state, dcon::factory_id f)
 
void update_factory_employment (sys::state &state)
 
float factory_full_production_quantity (sys::state const &state, dcon::factory_id f, dcon::nation_id n, float mobilization_impact)
 
float rgo_efficiency (sys::state &state, dcon::nation_id n, dcon::province_id p, dcon::commodity_id c)
 
float rgo_full_production_quantity (sys::state &state, dcon::nation_id n, dcon::province_id p, dcon::commodity_id c)
 
float factory_min_input_available (sys::state &state, dcon::nation_id n, dcon::factory_type_fat_id fac_type)
 
float factory_input_total_cost (sys::state &state, dcon::nation_id n, dcon::factory_type_fat_id fac_type)
 
float factory_min_e_input_available (sys::state &state, dcon::nation_id n, dcon::factory_type_fat_id fac_type)
 
float factory_e_input_total_cost (sys::state &state, dcon::nation_id n, dcon::factory_type_fat_id fac_type)
 
float nation_factory_input_multiplier (sys::state &state, dcon::nation_id n)
 
float nation_factory_output_multiplier (sys::state &state, dcon::factory_type_id fac_type, dcon::nation_id n)
 
float factory_input_multiplier (sys::state &state, dcon::factory_fat_id fac, dcon::nation_id n, dcon::province_id p, dcon::state_instance_id s)
 
float factory_throughput_multiplier (sys::state &state, dcon::factory_type_fat_id fac_type, dcon::nation_id n, dcon::province_id p, dcon::state_instance_id s)
 
float factory_output_multiplier (sys::state &state, dcon::factory_fat_id fac, dcon::nation_id n, dcon::province_id p)
 
float factory_max_production_scale_non_modified (sys::state &state, dcon::factory_fat_id fac)
 
float factory_max_production_scale (sys::state &state, dcon::factory_fat_id fac, float mobilization_impact, bool occupied)
 
float update_factory_scale (sys::state &state, dcon::factory_fat_id fac, float max_production_scale, float raw_profit, float desired_raw_profit)
 
float factory_desired_raw_profit (dcon::factory_fat_id fac, float spendings)
 
void update_single_factory_consumption (sys::state &state, dcon::factory_id f, dcon::nation_id n, dcon::province_id p, dcon::state_instance_id s, float mobilization_impact, float expected_min_wage, bool occupied)
 
void update_single_factory_production (sys::state &state, dcon::factory_id f, dcon::nation_id n, float expected_min_wage)
 
rgo_workers_breakdown rgo_relevant_population (sys::state &state, dcon::province_id p, dcon::nation_id n)
 
float rgo_desired_worker_norm_profit (sys::state &state, dcon::province_id p, dcon::nation_id n, float min_wage, float total_relevant_population)
 
float rgo_expected_worker_norm_profit (sys::state &state, dcon::province_id p, dcon::nation_id n, dcon::commodity_id c)
 
float convex_function (float x)
 
void update_province_rgo_consumption (sys::state &state, dcon::province_id p, dcon::nation_id n, float mobilization_impact, float expected_min_wage, bool occupied)
 
void update_province_rgo_production (sys::state &state, dcon::province_id p, dcon::nation_id n)
 
void update_national_artisan_consumption (sys::state &state, dcon::nation_id n, float expected_min_wage, float mobilization_impact)
 
void update_national_artisan_production (sys::state &state, dcon::nation_id n)
 
float global_non_factory_construction_time_modifier (sys::state &state)
 
float global_factory_construction_time_modifier (sys::state &state)
 
void populate_private_construction_consumption (sys::state &state)
 
float estimate_stockpile_filling_spending (sys::state &state, dcon::nation_id n)
 
float estimate_overseas_penalty_spending (sys::state &state, dcon::nation_id n)
 
float full_private_investment_cost (sys::state &state, dcon::nation_id n)
 
void update_national_consumption (sys::state &state, dcon::nation_id n, float spending_scale, float private_investment_scale)
 
void update_pop_consumption (sys::state &state, dcon::nation_id n, float base_demand, float invention_factor)
 
void populate_needs_costs (sys::state &state, dcon::nation_id n, float base_demand, float invention_factor)
 
void advance_construction (sys::state &state, dcon::nation_id n)
 
float pop_min_wage_factor (sys::state &state, dcon::nation_id n)
 
float pop_farmer_min_wage (sys::state &state, dcon::nation_id n, float min_wage_factor)
 
float pop_laborer_min_wage (sys::state &state, dcon::nation_id n, float min_wage_factor)
 
float pop_factory_min_wage (sys::state &state, dcon::nation_id n, float min_wage_factor)
 
void populate_effective_prices (sys::state &state, dcon::nation_id n)
 
profit_distribution distribute_factory_profit (sys::state const &state, dcon::state_instance_const_fat_id s, float min_wage, float total_profit)
 
void emulate_construction_demand (sys::state &state, dcon::nation_id n)
 
void daily_update (sys::state &state, bool initiate_buildings)
 
void regenerate_unsaved_values (sys::state &state)
 
float government_consumption (sys::state &state, dcon::nation_id n, dcon::commodity_id c)
 
float factory_type_build_cost (sys::state &state, dcon::nation_id n, dcon::factory_type_id factory_type)
 
float factory_type_output_cost (sys::state &state, dcon::nation_id n, dcon::factory_type_id factory_type)
 
float factory_type_input_cost (sys::state &state, dcon::nation_id n, dcon::factory_type_id factory_type)
 
float nation_factory_consumption (sys::state &state, dcon::nation_id n, dcon::commodity_id c)
 
float nation_pop_consumption (sys::state &state, dcon::nation_id n, dcon::commodity_id c)
 
float nation_total_imports (sys::state &state, dcon::nation_id n)
 
float pop_income (sys::state &state, dcon::pop_id p)
 
float estimate_gold_income (sys::state &state, dcon::nation_id n)
 
float estimate_tariff_income (sys::state &state, dcon::nation_id n)
 
float estimate_social_spending (sys::state &state, dcon::nation_id n)
 
float estimate_pop_payouts_by_income_type (sys::state &state, dcon::nation_id n, culture::income_type in)
 
float estimate_tax_income_by_strata (sys::state &state, dcon::nation_id n, culture::pop_strata ps)
 
float estimate_subsidy_spending (sys::state &state, dcon::nation_id n)
 
float estimate_war_subsidies_income (sys::state &state, dcon::nation_id n)
 
float estimate_reparations_income (sys::state &state, dcon::nation_id n)
 
float estimate_war_subsidies_spending (sys::state &state, dcon::nation_id n)
 
float estimate_reparations_spending (sys::state &state, dcon::nation_id n)
 
float estimate_diplomatic_balance (sys::state &state, dcon::nation_id n)
 
float estimate_domestic_investment (sys::state &state, dcon::nation_id n)
 
float estimate_land_spending (sys::state &state, dcon::nation_id n)
 
float estimate_naval_spending (sys::state &state, dcon::nation_id n)
 
float estimate_construction_spending (sys::state &state, dcon::nation_id n)
 
float estimate_war_subsidies (sys::state &state, dcon::nation_id n)
 
construction_status province_building_construction (sys::state &state, dcon::province_id p, province_building_type t)
 
construction_status factory_upgrade (sys::state &state, dcon::factory_id f)
 
bool state_contains_constructed_factory (sys::state &state, dcon::state_instance_id s, dcon::factory_type_id ft)
 
bool state_contains_factory (sys::state &state, dcon::state_instance_id s, dcon::factory_type_id ft)
 
int32_t state_factory_count (sys::state &state, dcon::state_instance_id sid, dcon::nation_id n)
 
float unit_construction_progress (sys::state &state, dcon::province_land_construction_id c)
 
float unit_construction_progress (sys::state &state, dcon::province_naval_construction_id c)
 
void add_factory_level_to_state (sys::state &state, dcon::state_instance_id s, dcon::factory_type_id t, bool is_upgrade)
 
void resolve_constructions (sys::state &state)
 
float estimate_daily_income (sys::state &state, dcon::nation_id n)
 
void try_add_factory_to_state (sys::state &state, dcon::state_instance_id s, dcon::factory_type_id t)
 
void bound_budget_settings (sys::state &state, dcon::nation_id n)
 
void prune_factories (sys::state &state)
 
dcon::modifier_id get_province_selector_modifier (sys::state &state)
 
dcon::modifier_id get_province_immigrator_modifier (sys::state &state)
 
void go_bankrupt (sys::state &state, dcon::nation_id n)
 
commodity_production_type get_commodity_production_type (sys::state &state, dcon::commodity_id c)
 
std::string_view province_building_type_get_name (economy::province_building_type v)
 
std::string_view province_building_type_get_level_text (economy::province_building_type v)
 
template<typename T >
auto desired_needs_spending (sys::state const &state, T pop_indices)
 
constexpr dcon::commodity_id money (0)
 
float rgo_full_production_quantity (sys::state const &state, dcon::nation_id n, dcon::province_id p, dcon::commodity_id c)
 
template<typename F >
void for_each_new_factory (sys::state &state, dcon::state_instance_id s, F &&func)
 
template<typename F >
void for_each_upgraded_factory (sys::state &state, dcon::state_instance_id s, F &&func)
 

Variables

constexpr int32_t max_building_types = 5
 
constexpr float ln_2 = 0.30103f
 
constexpr float artisan_baseline_score = 5.f
 
constexpr float day_1_build_time_modifier_non_factory = 2.f
 
constexpr float day_inf_build_time_modifier_non_factory = 0.5f
 
constexpr float day_1_derivative_non_factory = -0.2f
 
constexpr float diff_non_factory = day_1_build_time_modifier_non_factory - day_inf_build_time_modifier_non_factory
 
constexpr float shift_non_factory = - diff_non_factory / day_1_derivative_non_factory
 
constexpr float slope_non_factory = diff_non_factory * shift_non_factory
 
constexpr float day_1_build_time_modifier_factory = 0.9f
 
constexpr float day_inf_build_time_modifier_factory = 0.75f
 
constexpr float day_1_derivative_factory = -0.01f
 
constexpr float diff_factory = day_1_build_time_modifier_factory - day_inf_build_time_modifier_factory
 
constexpr float shift_factory = -diff_factory / day_1_derivative_factory
 
constexpr float slope_factory = diff_factory * shift_factory
 
constexpr float subsistence_factor = 15.0f
 
constexpr float subsistence_score_life = 30.0f
 
constexpr float subsistence_score_everyday = 50.0f
 
constexpr float subsistence_score_luxury = 80.0f
 
constexpr float subsistence_score_total = subsistence_score_life + subsistence_score_everyday + subsistence_score_luxury
 
constexpr float production_scale_delta = 0.1f
 
constexpr float factory_closed_threshold = 0.0001f
 
constexpr uint32_t price_history_length = 256
 
constexpr uint32_t gdp_history_length = 128
 
constexpr float rgo_owners_cut = 0.05f
 

Enumeration Type Documentation

◆ commodity_production_type

Enumerator
primary 
derivative 
both 

Definition at line 8 of file economy.hpp.

◆ economy_reason

enum class economy::economy_reason
strong
Enumerator
pop 
factory 
rgo 
artisan 
construction 
nation 
stockpile 
overseas_penalty 

Definition at line 15 of file economy.cpp.

◆ province_building_type

Enumerator
railroad 
fort 
naval_base 
bank 
university 
last 
factory 
province_selector 
province_immigrator 

Definition at line 578 of file constants.hpp.

◆ worker_effect

enum class economy::worker_effect : uint8_t
strong
Enumerator
none 
input 
output 
throughput 

Definition at line 110 of file economy.hpp.

Function Documentation

◆ absorb_sphere_member_production()

void economy::absorb_sphere_member_production ( sys::state state,
dcon::nation_id  n 
)

Definition at line 833 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_factory_level_to_state()

void economy::add_factory_level_to_state ( sys::state state,
dcon::state_instance_id  s,
dcon::factory_type_id  t,
bool  is_upgrade 
)

Definition at line 4963 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ adjust_artisan_balance()

void economy::adjust_artisan_balance ( sys::state state,
dcon::nation_id  n 
)

Definition at line 556 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ adjusted_subsistence_score()

float economy::adjusted_subsistence_score ( sys::state state,
dcon::province_id  p 
)

Definition at line 981 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ advance_construction()

void economy::advance_construction ( sys::state state,
dcon::nation_id  n 
)

Definition at line 2642 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ artisan_scale_limit()

float economy::artisan_scale_limit ( sys::state state,
dcon::nation_id  n,
dcon::commodity_id  c 
)

Definition at line 440 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ base_artisan_profit()

float economy::base_artisan_profit ( sys::state state,
dcon::nation_id  n,
dcon::commodity_id  c 
)

Definition at line 422 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bound_budget_settings()

void economy::bound_budget_settings ( sys::state state,
dcon::nation_id  n 
)

Definition at line 5271 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ can_take_loans()

bool economy::can_take_loans ( sys::state state,
dcon::nation_id  n 
)

Definition at line 48 of file economy.cpp.

Here is the caller graph for this function:

◆ commodity_daily_production_amount()

float economy::commodity_daily_production_amount ( sys::state state,
dcon::commodity_id  c 
)

Definition at line 114 of file economy.cpp.

Here is the caller graph for this function:

◆ convert_commodities_into_ingredients()

void economy::convert_commodities_into_ingredients ( sys::state state,
std::vector< float > &  buffer_commodities,
std::vector< float > &  buffer_ingredients,
std::vector< float > &  buffer_weights 
)

Definition at line 284 of file economy.cpp.

◆ convex_function()

float economy::convex_function ( float  x)

Definition at line 1808 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ daily_update()

void economy::daily_update ( sys::state state,
bool  initiate_buildings 
)

Definition at line 3070 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ desired_needs_spending()

template<typename T >
auto economy::desired_needs_spending ( sys::state const &  state,
pop_indices 
)

Definition at line 113 of file economy.hpp.

Here is the caller graph for this function:

◆ distribute_factory_profit()

profit_distribution economy::distribute_factory_profit ( sys::state const &  state,
dcon::state_instance_const_fat_id  s,
float  min_wage,
float  total_profit 
)

Definition at line 2905 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ effective_tariff_rate()

float economy::effective_tariff_rate ( sys::state state,
dcon::nation_id  n 
)

Definition at line 860 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emulate_construction_demand()

void economy::emulate_construction_demand ( sys::state state,
dcon::nation_id  n 
)

Definition at line 2949 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_construction_spending()

float economy::estimate_construction_spending ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4740 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_daily_income()

float economy::estimate_daily_income ( sys::state state,
dcon::nation_id  n 
)

Definition at line 5228 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_diplomatic_balance()

float economy::estimate_diplomatic_balance ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4700 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_domestic_investment()

float economy::estimate_domestic_investment ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4706 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_gold_income()

float economy::estimate_gold_income ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4558 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_land_spending()

float economy::estimate_land_spending ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4720 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_naval_spending()

float economy::estimate_naval_spending ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4730 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_overseas_penalty_spending()

float economy::estimate_overseas_penalty_spending ( sys::state state,
dcon::nation_id  n 
)

Definition at line 2354 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_pop_payouts_by_income_type()

float economy::estimate_pop_payouts_by_income_type ( sys::state state,
dcon::nation_id  n,
culture::income_type  in 
)

Definition at line 4602 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_reparations_income()

float economy::estimate_reparations_income ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4655 of file economy.cpp.

Here is the caller graph for this function:

◆ estimate_reparations_spending()

float economy::estimate_reparations_spending ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4683 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_social_spending()

float economy::estimate_social_spending ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4576 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_stockpile_filling_spending()

float economy::estimate_stockpile_filling_spending ( sys::state state,
dcon::nation_id  n 
)

Definition at line 2339 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_subsidy_spending()

float economy::estimate_subsidy_spending ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4641 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_tariff_income()

float economy::estimate_tariff_income ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4572 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_tax_income_by_strata()

float economy::estimate_tax_income_by_strata ( sys::state state,
dcon::nation_id  n,
culture::pop_strata  ps 
)

Definition at line 4629 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_war_subsidies()

float economy::estimate_war_subsidies ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4827 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_war_subsidies_income()

float economy::estimate_war_subsidies_income ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4645 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_war_subsidies_spending()

float economy::estimate_war_subsidies_spending ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4671 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory_desired_raw_profit()

float economy::factory_desired_raw_profit ( dcon::factory_fat_id  fac,
float  spendings 
)

Definition at line 1533 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory_e_input_total_cost()

float economy::factory_e_input_total_cost ( sys::state state,
dcon::nation_id  n,
dcon::factory_type_fat_id  fac_type 
)

Definition at line 1408 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory_full_production_quantity()

float economy::factory_full_production_quantity ( sys::state const &  state,
dcon::factory_id  f,
dcon::nation_id  n,
float  mobilization_impact 
)

Definition at line 1274 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory_input_multiplier()

float economy::factory_input_multiplier ( sys::state state,
dcon::factory_fat_id  fac,
dcon::nation_id  n,
dcon::province_id  p,
dcon::state_instance_id  s 
)

Definition at line 1436 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory_input_total_cost()

float economy::factory_input_total_cost ( sys::state state,
dcon::nation_id  n,
dcon::factory_type_fat_id  fac_type 
)

Definition at line 1377 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory_is_profitable()

bool economy::factory_is_profitable ( sys::state const &  state,
dcon::factory_id  f 
)

Definition at line 1011 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory_max_employment()

float economy::factory_max_employment ( sys::state const &  state,
dcon::factory_id  f 
)

Definition at line 1124 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory_max_production_scale()

float economy::factory_max_production_scale ( sys::state state,
dcon::factory_fat_id  fac,
float  mobilization_impact,
bool  occupied 
)

Definition at line 1487 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory_max_production_scale_non_modified()

float economy::factory_max_production_scale_non_modified ( sys::state state,
dcon::factory_fat_id  fac 
)

Definition at line 1482 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory_min_e_input_available()

float economy::factory_min_e_input_available ( sys::state state,
dcon::nation_id  n,
dcon::factory_type_fat_id  fac_type 
)

Definition at line 1390 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory_min_input_available()

float economy::factory_min_input_available ( sys::state state,
dcon::nation_id  n,
dcon::factory_type_fat_id  fac_type 
)

Definition at line 1356 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory_output_multiplier()

float economy::factory_output_multiplier ( sys::state state,
dcon::factory_fat_id  fac,
dcon::nation_id  n,
dcon::province_id  p 
)

Definition at line 1470 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory_primary_employment()

float economy::factory_primary_employment ( sys::state const &  state,
dcon::factory_id  f 
)

Definition at line 1128 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory_priority()

int32_t economy::factory_priority ( sys::state const &  state,
dcon::factory_id  f 
)

Definition at line 1004 of file economy.cpp.

Here is the caller graph for this function:

◆ factory_secondary_employment()

float economy::factory_secondary_employment ( sys::state const &  state,
dcon::factory_id  f 
)

Definition at line 1132 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory_throughput_multiplier()

float economy::factory_throughput_multiplier ( sys::state state,
dcon::factory_type_fat_id  fac_type,
dcon::nation_id  n,
dcon::province_id  p,
dcon::state_instance_id  s 
)

Definition at line 1463 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory_total_employment()

float economy::factory_total_employment ( sys::state const &  state,
dcon::factory_id  f 
)

Definition at line 1136 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory_type_build_cost()

float economy::factory_type_build_cost ( sys::state state,
dcon::nation_id  n,
dcon::factory_type_id  factory_type 
)

Definition at line 4396 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ factory_type_input_cost()

float economy::factory_type_input_cost ( sys::state state,
dcon::nation_id  n,
dcon::factory_type_id  factory_type 
)

Definition at line 4423 of file economy.cpp.

Here is the call graph for this function:

◆ factory_type_output_cost()

float economy::factory_type_output_cost ( sys::state state,
dcon::nation_id  n,
dcon::factory_type_id  factory_type 
)

Definition at line 4415 of file economy.cpp.

Here is the call graph for this function:

◆ factory_upgrade()

construction_status economy::factory_upgrade ( sys::state state,
dcon::factory_id  f 
)

Definition at line 4850 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ for_each_new_factory()

template<typename F >
void economy::for_each_new_factory ( sys::state state,
dcon::state_instance_id  s,
F &&  func 
)

Definition at line 7 of file economy_templates.hpp.

Here is the caller graph for this function:

◆ for_each_new_factory< std::function< void(new_factory)> >()

template void economy::for_each_new_factory< std::function< void(new_factory)> > ( sys::state ,
dcon::state_instance_id  ,
std::function< void(new_factory)> &&   
)

◆ for_each_upgraded_factory()

template<typename F >
void economy::for_each_upgraded_factory ( sys::state state,
dcon::state_instance_id  s,
F &&  func 
)

Definition at line 30 of file economy_templates.hpp.

◆ for_each_upgraded_factory< std::function< void(upgraded_factory)> >()

template void economy::for_each_upgraded_factory< std::function< void(upgraded_factory)> > ( sys::state ,
dcon::state_instance_id  ,
std::function< void(upgraded_factory)> &&   
)

◆ full_private_investment_cost()

float economy::full_private_investment_cost ( sys::state state,
dcon::nation_id  n 
)

Definition at line 2374 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ full_spending_cost()

float economy::full_spending_cost ( sys::state state,
dcon::nation_id  n 
)

Definition at line 2224 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gdp_adjusted()

float economy::gdp_adjusted ( sys::state state,
dcon::nation_id  n 
)

Definition at line 103 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_artisan_distribution_fast()

float economy::get_artisan_distribution_fast ( sys::state state,
dcon::nation_id  n,
dcon::commodity_id  c,
float  max_score,
float  total_score,
float  multiplier 
)

Definition at line 534 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_artisan_distribution_slow()

float economy::get_artisan_distribution_slow ( sys::state state,
dcon::nation_id  n,
dcon::commodity_id  c 
)

Definition at line 546 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_artisans_multiplier()

float economy::get_artisans_multiplier ( sys::state state,
dcon::nation_id  n 
)

Definition at line 489 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_commodity_production_type()

commodity_production_type economy::get_commodity_production_type ( sys::state state,
dcon::commodity_id  c 
)

Definition at line 5431 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_province_immigrator_modifier()

dcon::modifier_id economy::get_province_immigrator_modifier ( sys::state state)

Definition at line 5383 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_province_selector_modifier()

dcon::modifier_id economy::get_province_selector_modifier ( sys::state state)

Definition at line 5379 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ give_sphere_leader_production()

void economy::give_sphere_leader_production ( sys::state state,
dcon::nation_id  n 
)

Definition at line 848 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ global_factory_construction_time_modifier()

float economy::global_factory_construction_time_modifier ( sys::state state)

Definition at line 2060 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ global_market_commodity_daily_increase()

float economy::global_market_commodity_daily_increase ( sys::state state,
dcon::commodity_id  c 
)

Definition at line 123 of file economy.cpp.

Here is the caller graph for this function:

◆ global_market_price_multiplier()

float economy::global_market_price_multiplier ( sys::state state,
dcon::nation_id  n 
)

Definition at line 866 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ global_non_factory_construction_time_modifier()

float economy::global_non_factory_construction_time_modifier ( sys::state state)

Definition at line 2043 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ go_bankrupt()

void economy::go_bankrupt ( sys::state state,
dcon::nation_id  n 
)

Definition at line 5387 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ government_consumption()

float economy::government_consumption ( sys::state state,
dcon::nation_id  n,
dcon::commodity_id  c 
)

Definition at line 4380 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_building()

bool economy::has_building ( sys::state const &  state,
dcon::state_instance_id  si,
dcon::factory_type_id  fac 
)

Definition at line 384 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_factory()

bool economy::has_factory ( sys::state const &  state,
dcon::state_instance_id  si 
)

Definition at line 128 of file economy.cpp.

Here is the caller graph for this function:

◆ ideal_pound_conversion_rate()

float economy::ideal_pound_conversion_rate ( sys::state state,
dcon::nation_id  n 
)

Definition at line 98 of file economy.cpp.

Here is the caller graph for this function:

◆ initialize()

void economy::initialize ( sys::state state)

Definition at line 593 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize_artisan_distribution()

void economy::initialize_artisan_distribution ( sys::state state)

Definition at line 147 of file economy.cpp.

Here is the caller graph for this function:

◆ initialize_needs_weights()

void economy::initialize_needs_weights ( sys::state state,
dcon::nation_id  n 
)

Definition at line 166 of file economy.cpp.

◆ interest_payment()

float economy::interest_payment ( sys::state state,
dcon::nation_id  n 
)

Definition at line 62 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_bankrupt_debtor_to()

bool economy::is_bankrupt_debtor_to ( sys::state state,
dcon::nation_id  debt_holder,
dcon::nation_id  debtor 
)

Definition at line 398 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ max_artisan_score()

float economy::max_artisan_score ( sys::state state,
dcon::nation_id  n,
float  multiplier 
)

Definition at line 496 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ max_loan()

float economy::max_loan ( sys::state state,
dcon::nation_id  n 
)

Definition at line 73 of file economy.cpp.

Here is the caller graph for this function:

◆ money()

constexpr dcon::commodity_id economy::money ( )
inlineconstexpr
Here is the caller graph for this function:

◆ most_recent_gdp_record_index()

int32_t economy::most_recent_gdp_record_index ( sys::state state)

Definition at line 89 of file economy.cpp.

Here is the caller graph for this function:

◆ most_recent_price_record_index()

int32_t economy::most_recent_price_record_index ( sys::state state)

Definition at line 82 of file economy.cpp.

Here is the caller graph for this function:

◆ nation_factory_consumption()

float economy::nation_factory_consumption ( sys::state state,
dcon::nation_id  n,
dcon::commodity_id  c 
)

Definition at line 4435 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nation_factory_input_multiplier()

float economy::nation_factory_input_multiplier ( sys::state state,
dcon::nation_id  n 
)

Definition at line 1422 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nation_factory_output_multiplier()

float economy::nation_factory_output_multiplier ( sys::state state,
dcon::factory_type_id  fac_type,
dcon::nation_id  n 
)

Definition at line 1429 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nation_has_closed_factories()

bool economy::nation_has_closed_factories ( sys::state state,
dcon::nation_id  n 
)

Definition at line 408 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nation_is_constructing_factories()

bool economy::nation_is_constructing_factories ( sys::state state,
dcon::nation_id  n 
)

Definition at line 404 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nation_pop_consumption()

float economy::nation_pop_consumption ( sys::state state,
dcon::nation_id  n,
dcon::commodity_id  c 
)

Definition at line 4514 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nation_total_imports()

float economy::nation_total_imports ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4527 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ need_weight()

float economy::need_weight ( sys::state state,
dcon::nation_id  n,
dcon::commodity_id  c 
)

Definition at line 196 of file economy.cpp.

Here is the call graph for this function:

◆ pop_factory_min_wage()

float economy::pop_factory_min_wage ( sys::state state,
dcon::nation_id  n,
float  min_wage_factor 
)

Definition at line 2832 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pop_farmer_min_wage()

float economy::pop_farmer_min_wage ( sys::state state,
dcon::nation_id  n,
float  min_wage_factor 
)

Definition at line 2818 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pop_income()

float economy::pop_income ( sys::state state,
dcon::pop_id  p 
)

Definition at line 4539 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pop_laborer_min_wage()

float economy::pop_laborer_min_wage ( sys::state state,
dcon::nation_id  n,
float  min_wage_factor 
)

Definition at line 2825 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pop_min_wage_factor()

float economy::pop_min_wage_factor ( sys::state state,
dcon::nation_id  n 
)

Definition at line 2813 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ populate_army_consumption()

void economy::populate_army_consumption ( sys::state state)

Definition at line 1977 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ populate_construction_consumption()

void economy::populate_construction_consumption ( sys::state state)

Definition at line 2065 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ populate_effective_prices()

void economy::populate_effective_prices ( sys::state state,
dcon::nation_id  n 
)

Definition at line 2847 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ populate_navy_consumption()

void economy::populate_navy_consumption ( sys::state state)

Definition at line 2004 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ populate_needs_costs()

void economy::populate_needs_costs ( sys::state state,
dcon::nation_id  n,
float  base_demand,
float  invention_factor 
)

Definition at line 2592 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ populate_private_construction_consumption()

void economy::populate_private_construction_consumption ( sys::state state)

Definition at line 2174 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ presimulate()

void economy::presimulate ( sys::state state)

Definition at line 370 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ previous_gdp_record_index()

int32_t economy::previous_gdp_record_index ( sys::state state)

Definition at line 93 of file economy.cpp.

◆ previous_price_record_index()

int32_t economy::previous_price_record_index ( sys::state state)

Definition at line 85 of file economy.cpp.

◆ province_building_construction()

construction_status economy::province_building_construction ( sys::state state,
dcon::province_id  p,
province_building_type  t 
)

Definition at line 4832 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ province_building_type_get_level_text()

std::string_view economy::province_building_type_get_level_text ( economy::province_building_type  v)
inline

Definition at line 72 of file economy.hpp.

Here is the caller graph for this function:

◆ province_building_type_get_name()

std::string_view economy::province_building_type_get_name ( economy::province_building_type  v)
inline

Definition at line 56 of file economy.hpp.

Here is the caller graph for this function:

◆ prune_factories()

void economy::prune_factories ( sys::state state)

Definition at line 5340 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pseudo_exp_for_negative()

float economy::pseudo_exp_for_negative ( float  f)

Definition at line 470 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rebalance_needs_weights()

void economy::rebalance_needs_weights ( sys::state state,
dcon::nation_id  n 
)

Definition at line 200 of file economy.cpp.

◆ regenerate_unsaved_values()

void economy::regenerate_unsaved_values ( sys::state state)

Definition at line 4332 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ register_construction_demand()

void economy::register_construction_demand ( sys::state state,
dcon::nation_id  n,
dcon::commodity_id  commodity_type,
float  amount 
)

Definition at line 36 of file economy.cpp.

Here is the caller graph for this function:

◆ register_demand()

void economy::register_demand ( sys::state state,
dcon::nation_id  n,
dcon::commodity_id  commodity_type,
float  amount,
economy_reason  reason 
)

Definition at line 19 of file economy.cpp.

Here is the caller graph for this function:

◆ register_domestic_supply()

void economy::register_domestic_supply ( sys::state state,
dcon::nation_id  n,
dcon::commodity_id  commodity_type,
float  amount,
economy_reason  reason 
)

Definition at line 40 of file economy.cpp.

Here is the caller graph for this function:

◆ register_intermediate_demand()

void economy::register_intermediate_demand ( sys::state state,
dcon::nation_id  n,
dcon::commodity_id  commodity_type,
float  amount,
economy_reason  reason 
)

Definition at line 25 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resolve_constructions()

void economy::resolve_constructions ( sys::state state)

Definition at line 4990 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgo_desired_worker_norm_profit()

float economy::rgo_desired_worker_norm_profit ( sys::state state,
dcon::province_id  p,
dcon::nation_id  n,
float  min_wage,
float  total_relevant_population 
)

Definition at line 1743 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgo_effective_size()

float economy::rgo_effective_size ( sys::state const &  state,
dcon::nation_id  n,
dcon::province_id  p,
dcon::commodity_id  c 
)

Definition at line 909 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgo_efficiency()

float economy::rgo_efficiency ( sys::state state,
dcon::nation_id  n,
dcon::province_id  p,
dcon::commodity_id  c 
)

Definition at line 1301 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgo_expected_worker_norm_profit()

float economy::rgo_expected_worker_norm_profit ( sys::state state,
dcon::province_id  p,
dcon::nation_id  n,
dcon::commodity_id  c 
)

Definition at line 1793 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgo_full_production_quantity() [1/2]

float economy::rgo_full_production_quantity ( sys::state state,
dcon::nation_id  n,
dcon::province_id  p,
dcon::commodity_id  c 
)

Definition at line 1342 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgo_full_production_quantity() [2/2]

float economy::rgo_full_production_quantity ( sys::state const &  state,
dcon::nation_id  n,
dcon::province_id  p,
dcon::commodity_id  c 
)

◆ rgo_max_employment()

float economy::rgo_max_employment ( sys::state state,
dcon::nation_id  n,
dcon::province_id  p,
dcon::commodity_id  c 
)

Definition at line 951 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgo_relevant_population()

rgo_workers_breakdown economy::rgo_relevant_population ( sys::state state,
dcon::province_id  p,
dcon::nation_id  n 
)

Definition at line 1727 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgo_total_effective_size()

float economy::rgo_total_effective_size ( sys::state state,
dcon::nation_id  n,
dcon::province_id  p 
)

Definition at line 931 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgo_total_employment()

float economy::rgo_total_employment ( sys::state state,
dcon::nation_id  n,
dcon::province_id  p 
)

Definition at line 943 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rgo_total_max_employment()

float economy::rgo_total_max_employment ( sys::state state,
dcon::nation_id  n,
dcon::province_id  p 
)

Definition at line 955 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_factory_priority()

void economy::set_factory_priority ( sys::state state,
dcon::factory_id  f,
int32_t  priority 
)

Definition at line 1007 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sphere_leader_share_factor()

float economy::sphere_leader_share_factor ( sys::state state,
dcon::nation_id  sphere_leader,
dcon::nation_id  sphere_member 
)

Definition at line 810 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ state_contains_constructed_factory()

bool economy::state_contains_constructed_factory ( sys::state state,
dcon::state_instance_id  s,
dcon::factory_type_id  ft 
)

Definition at line 4879 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ state_contains_factory()

bool economy::state_contains_factory ( sys::state state,
dcon::state_instance_id  s,
dcon::factory_type_id  ft 
)

Definition at line 4892 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ state_factory_count()

int32_t economy::state_factory_count ( sys::state state,
dcon::state_instance_id  sid,
dcon::nation_id  n 
)

Definition at line 4911 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stockpile_commodity_daily_increase()

float economy::stockpile_commodity_daily_increase ( sys::state state,
dcon::commodity_id  c,
dcon::nation_id  n 
)

Definition at line 118 of file economy.cpp.

Here is the caller graph for this function:

◆ subsistence_max_pseudoemployment()

float economy::subsistence_max_pseudoemployment ( sys::state state,
dcon::nation_id  n,
dcon::province_id  p 
)

Definition at line 939 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ subsistence_size()

float economy::subsistence_size ( sys::state const &  state,
dcon::province_id  p 
)

Definition at line 904 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ total_artisan_exp_score()

float economy::total_artisan_exp_score ( sys::state state,
dcon::nation_id  n,
float  multiplier,
float  max_score 
)

Definition at line 516 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ try_add_factory_to_state()

void economy::try_add_factory_to_state ( sys::state state,
dcon::state_instance_id  s,
dcon::factory_type_id  t 
)

Definition at line 5237 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unit_construction_progress() [1/2]

float economy::unit_construction_progress ( sys::state state,
dcon::province_land_construction_id  c 
)

Definition at line 4926 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unit_construction_progress() [2/2]

float economy::unit_construction_progress ( sys::state state,
dcon::province_naval_construction_id  c 
)

Definition at line 4945 of file economy.cpp.

Here is the call graph for this function:

◆ update_factory_employment()

void economy::update_factory_employment ( sys::state state)

Definition at line 1143 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_factory_scale()

float economy::update_factory_scale ( sys::state state,
dcon::factory_fat_id  fac,
float  max_production_scale,
float  raw_profit,
float  desired_raw_profit 
)

Definition at line 1494 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_factory_triggered_modifiers()

void economy::update_factory_triggered_modifiers ( sys::state state)

Definition at line 877 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_land_ownership()

void economy::update_land_ownership ( sys::state state)

Definition at line 987 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_local_subsistence_factor()

void economy::update_local_subsistence_factor ( sys::state state)

Definition at line 963 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_national_artisan_consumption()

void economy::update_national_artisan_consumption ( sys::state state,
dcon::nation_id  n,
float  expected_min_wage,
float  mobilization_impact 
)

Definition at line 1878 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_national_artisan_production()

void economy::update_national_artisan_production ( sys::state state,
dcon::nation_id  n 
)

Definition at line 1946 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_national_consumption()

void economy::update_national_consumption ( sys::state state,
dcon::nation_id  n,
float  spending_scale,
float  private_investment_scale 
)

Definition at line 2384 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_pop_consumption()

void economy::update_pop_consumption ( sys::state state,
dcon::nation_id  n,
float  base_demand,
float  invention_factor 
)

Definition at line 2426 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_province_rgo_consumption()

void economy::update_province_rgo_consumption ( sys::state state,
dcon::province_id  p,
dcon::nation_id  n,
float  mobilization_impact,
float  expected_min_wage,
bool  occupied 
)

Definition at line 1812 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_province_rgo_production()

void economy::update_province_rgo_production ( sys::state state,
dcon::province_id  p,
dcon::nation_id  n 
)

Definition at line 1856 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_rgo_employment()

void economy::update_rgo_employment ( sys::state state)

Definition at line 1020 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_single_factory_consumption()

void economy::update_single_factory_consumption ( sys::state state,
dcon::factory_id  f,
dcon::nation_id  n,
dcon::province_id  p,
dcon::state_instance_id  s,
float  mobilization_impact,
float  expected_min_wage,
bool  occupied 
)

Definition at line 1537 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_single_factory_production()

void economy::update_single_factory_production ( sys::state state,
dcon::factory_id  f,
dcon::nation_id  n,
float  expected_min_wage 
)

Definition at line 1666 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ valid_artisan_good()

bool economy::valid_artisan_good ( sys::state state,
dcon::nation_id  n,
dcon::commodity_id  cid 
)

Definition at line 454 of file economy.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ artisan_baseline_score

constexpr float economy::artisan_baseline_score = 5.f
constexpr

Definition at line 494 of file economy.cpp.

◆ day_1_build_time_modifier_factory

constexpr float economy::day_1_build_time_modifier_factory = 0.9f
inlineconstexpr

Definition at line 2048 of file economy.cpp.

◆ day_1_build_time_modifier_non_factory

constexpr float economy::day_1_build_time_modifier_non_factory = 2.f
inlineconstexpr

Definition at line 2034 of file economy.cpp.

◆ day_1_derivative_factory

constexpr float economy::day_1_derivative_factory = -0.01f
inlineconstexpr

Definition at line 2050 of file economy.cpp.

◆ day_1_derivative_non_factory

constexpr float economy::day_1_derivative_non_factory = -0.2f
inlineconstexpr

Definition at line 2036 of file economy.cpp.

◆ day_inf_build_time_modifier_factory

constexpr float economy::day_inf_build_time_modifier_factory = 0.75f
inlineconstexpr

Definition at line 2049 of file economy.cpp.

◆ day_inf_build_time_modifier_non_factory

constexpr float economy::day_inf_build_time_modifier_non_factory = 0.5f
inlineconstexpr

Definition at line 2035 of file economy.cpp.

◆ diff_factory

constexpr float economy::diff_factory = day_1_build_time_modifier_factory - day_inf_build_time_modifier_factory
inlineconstexpr

Definition at line 2052 of file economy.cpp.

◆ diff_non_factory

constexpr float economy::diff_non_factory = day_1_build_time_modifier_non_factory - day_inf_build_time_modifier_non_factory
inlineconstexpr

Definition at line 2038 of file economy.cpp.

◆ factory_closed_threshold

constexpr float economy::factory_closed_threshold = 0.0001f
inlineconstexpr

Definition at line 121 of file economy.hpp.

◆ gdp_history_length

constexpr uint32_t economy::gdp_history_length = 128
inlineconstexpr

Definition at line 123 of file economy.hpp.

◆ ln_2

constexpr float economy::ln_2 = 0.30103f
inlineconstexpr

Definition at line 467 of file economy.cpp.

◆ max_building_types

constexpr int32_t economy::max_building_types = 5
inlineconstexpr

Definition at line 579 of file constants.hpp.

◆ price_history_length

constexpr uint32_t economy::price_history_length = 256
inlineconstexpr

Definition at line 122 of file economy.hpp.

◆ production_scale_delta

constexpr float economy::production_scale_delta = 0.1f
inlineconstexpr

Definition at line 120 of file economy.hpp.

◆ rgo_owners_cut

constexpr float economy::rgo_owners_cut = 0.05f
inlineconstexpr

Definition at line 124 of file economy.hpp.

◆ shift_factory

constexpr float economy::shift_factory = -diff_factory / day_1_derivative_factory
inlineconstexpr

Definition at line 2053 of file economy.cpp.

◆ shift_non_factory

constexpr float economy::shift_non_factory = - diff_non_factory / day_1_derivative_non_factory
inlineconstexpr

Definition at line 2039 of file economy.cpp.

◆ slope_factory

constexpr float economy::slope_factory = diff_factory * shift_factory
inlineconstexpr

Definition at line 2054 of file economy.cpp.

◆ slope_non_factory

constexpr float economy::slope_non_factory = diff_non_factory * shift_non_factory
inlineconstexpr

Definition at line 2040 of file economy.cpp.

◆ subsistence_factor

constexpr float economy::subsistence_factor = 15.0f
inlineconstexpr

Definition at line 92 of file economy.hpp.

◆ subsistence_score_everyday

constexpr float economy::subsistence_score_everyday = 50.0f
inlineconstexpr

Definition at line 94 of file economy.hpp.

◆ subsistence_score_life

constexpr float economy::subsistence_score_life = 30.0f
inlineconstexpr

Definition at line 93 of file economy.hpp.

◆ subsistence_score_luxury

constexpr float economy::subsistence_score_luxury = 80.0f
inlineconstexpr

Definition at line 95 of file economy.hpp.

◆ subsistence_score_total

constexpr float economy::subsistence_score_total = subsistence_score_life + subsistence_score_everyday + subsistence_score_luxury
inlineconstexpr

Definition at line 96 of file economy.hpp.