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

Classes

struct  building_information
 
struct  commodity_profit_holder
 
struct  commodity_set
 
struct  construction_status
 
struct  full_construction_province
 
struct  full_construction_state
 
struct  global_economy_state
 
struct  nation_enriched_float
 
struct  new_factory
 
struct  profit_distribution
 
struct  rgo_workers_breakdown
 
struct  small_commodity_set
 
struct  trade_and_tariff
 
struct  trade_breakdown_item
 
struct  trade_volume_data_detailed
 
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 ,
  trade
}
 
enum  commodity_production_type { primary , derivative , both }
 
enum class  worker_effect : uint8_t { none = 0 , input , output , throughput }
 

Functions

float pop_min_wage_factor (sys::state &state, dcon::nation_id n)
 
template<typename T >
ve::fp_vector ve_pop_min_wage_factor (sys::state &state, T n)
 
template<typename T >
ve::fp_vector ve_artisan_min_wage (sys::state &state, T markets)
 
template<typename T >
ve::fp_vector ve_farmer_min_wage (sys::state &state, T markets, ve::fp_vector min_wage_factor)
 
template<typename T >
ve::fp_vector unskilled_labor_supply_multiplier (sys::state &state, T markets)
 
template<typename T >
ve::fp_vector skilled_labor_supply_multiplier (sys::state &state, T markets)
 
float unskilled_labor_supply_multiplier (sys::state &state, dcon::market_id markets)
 
float skilled_labor_supply_multiplier (sys::state &state, dcon::market_id markets)
 
template<typename T >
ve::fp_vector ve_laborer_min_wage (sys::state &state, T markets, ve::fp_vector min_wage_factor)
 
float farmer_min_wage (sys::state &state, dcon::market_id m, float min_wage_factor)
 
float laborer_min_wage (sys::state &state, dcon::market_id m, float min_wage_factor)
 
float expected_savings_per_capita (sys::state &state)
 
void sanity_check (sys::state &state)
 
float price (sys::state const &state, dcon::state_instance_id s, dcon::commodity_id c)
 
float price (sys::state const &state, dcon::nation_id s, dcon::commodity_id c)
 
float price (sys::state &state, dcon::commodity_id c)
 
template<typename T >
ve::fp_vector ve_price (sys::state const &state, T s, dcon::commodity_id c)
 
float price (sys::state const &state, dcon::market_id s, dcon::commodity_id c)
 
float supply (sys::state &state, dcon::market_id s, dcon::commodity_id c)
 
float supply (sys::state &state, dcon::nation_id s, dcon::commodity_id c)
 
float domestic_trade_volume (sys::state &state, dcon::nation_id s, dcon::commodity_id c)
 
float supply (sys::state &state, dcon::commodity_id c)
 
float demand (sys::state &state, dcon::market_id s, dcon::commodity_id c)
 
float demand (sys::state &state, dcon::nation_id s, dcon::commodity_id c)
 
float demand (sys::state &state, dcon::commodity_id c)
 
float consumption (sys::state &state, dcon::market_id s, dcon::commodity_id c)
 
float consumption (sys::state &state, dcon::nation_id s, dcon::commodity_id c)
 
float consumption (sys::state &state, dcon::commodity_id c)
 
float market_pool (sys::state &state, dcon::market_id s, dcon::commodity_id c)
 
float market_pool (sys::state &state, dcon::nation_id s, dcon::commodity_id c)
 
float market_pool (sys::state &state, dcon::commodity_id c)
 
float demand_satisfaction (sys::state &state, dcon::market_id s, dcon::commodity_id c)
 
float demand_satisfaction (sys::state &state, dcon::nation_id s, dcon::commodity_id c)
 
float demand_satisfaction (sys::state &state, dcon::commodity_id c)
 
float average_capitalists_luxury_cost (sys::state &state, dcon::nation_id s)
 
float export_volume (sys::state &state, dcon::market_id s, dcon::commodity_id c)
 
float export_volume (sys::state &state, dcon::nation_id s, dcon::commodity_id c)
 
trade_volume_data_detailed export_volume_detailed (sys::state &state, dcon::nation_id s, dcon::commodity_id c)
 
float import_volume (sys::state &state, dcon::market_id s, dcon::commodity_id c)
 
float import_volume (sys::state &state, dcon::nation_id s, dcon::commodity_id c)
 
trade_volume_data_detailed import_volume_detailed (sys::state &state, dcon::nation_id s, dcon::commodity_id c)
 
void register_demand (sys::state &state, dcon::market_id s, dcon::commodity_id commodity_type, float amount, economy_reason reason)
 
template<typename T >
void register_demand (sys::state &state, T s, dcon::commodity_id commodity_type, ve::fp_vector amount, economy_reason reason)
 
template<typename T >
void register_intermediate_demand (sys::state &state, T s, dcon::commodity_id c, ve::fp_vector amount, economy_reason reason)
 
void register_construction_demand (sys::state &state, dcon::market_id s, dcon::commodity_id commodity_type, float amount)
 
void register_domestic_supply (sys::state &state, dcon::market_id s, dcon::commodity_id commodity_type, float amount, economy_reason reason)
 
void register_foreign_supply (sys::state &state, dcon::market_id s, dcon::commodity_id commodity_type, float amount, economy_reason reason)
 
template<typename T >
void register_domestic_supply (sys::state &state, T s, dcon::commodity_id commodity_type, ve::fp_vector 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::market_id n)
 
float gdp_adjusted (sys::state &state, dcon::market_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)
 
std::vector< dcon::factory_type_id > commodity_get_factory_types_as_output (sys::state const &state, dcon::commodity_id output_good)
 
bool has_factory (sys::state const &state, dcon::state_instance_id si)
 
void initialize_artisan_distribution (sys::state &state)
 
bool valid_need (sys::state &state, dcon::nation_id n, dcon::commodity_id c)
 
template<typename T >
ve::mask_vector valid_need (sys::state &state, T n, dcon::commodity_id c)
 
bool valid_life_need (sys::state &state, dcon::nation_id n, dcon::commodity_id c)
 
bool valid_everyday_need (sys::state &state, dcon::nation_id n, dcon::commodity_id c)
 
bool valid_luxury_need (sys::state &state, dcon::nation_id n, dcon::commodity_id c)
 
void initialize_needs_weights (sys::state &state, dcon::market_id n)
 
float need_weight (sys::state &state, dcon::market_id n, dcon::commodity_id c)
 
void rebalance_needs_weights (sys::state &state, dcon::market_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)
 
template<typename T >
auto artisan_input_multiplier (sys::state &state, T nations)
 
template<typename T >
auto artisan_output_multiplier (sys::state &state, T nations)
 
template<typename T >
auto artisan_throughput_multiplier (sys::state &state, T nations)
 
template<typename T , typename S >
ve::fp_vector base_artisan_profit (sys::state &state, T markets, S nations, dcon::commodity_id c)
 
float base_artisan_profit (sys::state &state, dcon::market_id market, dcon::commodity_id c)
 
template<typename T >
ve::mask_vector ve_valid_artisan_good (sys::state &state, T nations, dcon::commodity_id cid)
 
bool valid_artisan_good (sys::state &state, dcon::nation_id nations, dcon::commodity_id cid)
 
float pseudo_exp_for_negative (float f)
 
ve::fp_vector ve_pseudo_exp_for_negative (ve::fp_vector f)
 
template<typename T , typename S >
void adjust_artisan_balance (sys::state &state, T markets, S nations)
 
void initialize (sys::state &state)
 
float sphere_leader_share_factor (sys::state &state, dcon::nation_id sphere_leader, dcon::nation_id sphere_member)
 
float effective_tariff_import_rate (sys::state &state, dcon::nation_id n)
 
float effective_tariff_export_rate (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)
 
template<typename T >
ve::fp_vector ve_adjusted_subsistence_score (sys::state &state, T 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 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 const &state, dcon::market_id m, dcon::factory_type_id fac_type)
 
float factory_input_total_cost (sys::state const &state, dcon::market_id m, dcon::factory_type_id fac_type)
 
float factory_min_e_input_available (sys::state const &state, dcon::market_id m, dcon::factory_type_id fac_type)
 
float factory_e_input_total_cost (sys::state const &state, dcon::market_id m, dcon::factory_type_id fac_type)
 
float priority_multiplier (sys::state const &state, dcon::factory_type_id fac_type, dcon::nation_id n)
 
float nation_factory_input_multiplier (sys::state const &state, dcon::factory_type_id fac_type, dcon::nation_id n)
 
float nation_factory_output_multiplier (sys::state const &state, dcon::factory_type_id fac_type, dcon::nation_id n)
 
float factory_input_multiplier (sys::state const &state, dcon::factory_id fac, dcon::nation_id n, dcon::province_id p, dcon::state_instance_id s)
 
float factory_throughput_multiplier (sys::state const &state, dcon::factory_type_id fac_type, dcon::nation_id n, dcon::province_id p, dcon::state_instance_id s)
 
float factory_output_multiplier_no_secondary_workers (sys::state const &state, dcon::factory_id fac, dcon::nation_id n, dcon::province_id p)
 
float factory_output_multiplier (sys::state const &state, dcon::factory_id fac, dcon::nation_id n, dcon::market_id m, dcon::province_id p)
 
float factory_max_production_scale_non_modified (sys::state const &state, dcon::factory_fat_id fac)
 
float factory_max_production_scale (sys::state const &state, dcon::factory_id fac, float mobilization_impact, bool occupied)
 
float factory_desired_raw_profit (dcon::factory_id fac, float spendings)
 
void update_single_factory_consumption (sys::state &state, dcon::factory_id f, dcon::province_id p, dcon::state_instance_id s, dcon::market_id m, dcon::nation_id n, float mobilization_impact, bool occupied)
 
void update_single_factory_production (sys::state &state, dcon::factory_id f, dcon::market_id m, dcon::nation_id n)
 
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::market_id m, 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::market_id m, dcon::nation_id n, dcon::commodity_id c)
 
float convex_function (float x)
 
void update_province_rgo_employment (sys::state &state, dcon::province_id p, dcon::market_id m, dcon::nation_id n, float mobilization_impact, float expected_min_wage)
 
void update_province_rgo_production (sys::state &state, dcon::province_id p, dcon::market_id m, dcon::nation_id n)
 
template<typename T , typename S , typename U >
void update_artisan_consumption (sys::state &state, T markets, S nations, U states, ve::fp_vector expected_min_wage, ve::fp_vector mobilization_impact)
 
template<typename T >
void update_market_artisan_production (sys::state &state, T markets)
 
float global_non_factory_construction_time_modifier (sys::state &state)
 
float global_factory_construction_time_modifier (sys::state &state)
 
float estimate_construction_spending_from_budget (sys::state &state, dcon::nation_id n, float current_budget)
 
float estimate_construction_spending (sys::state &state, dcon::nation_id n)
 
float estimate_private_construction_spendings (sys::state &state, dcon::nation_id nid)
 
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, ve::vectorizable_buffer< float, dcon::nation_id > &invention_count)
 
void advance_construction (sys::state &state, dcon::nation_id n)
 
profit_distribution distribute_factory_profit (sys::state const &state, dcon::state_instance_const_fat_id s, float total_profit)
 
void emulate_construction_demand (sys::state &state, dcon::nation_id n)
 
std::vector< full_construction_stateestimate_private_investment_upgrade (sys::state &state, dcon::nation_id nid)
 
std::vector< full_construction_stateestimate_private_investment_construct (sys::state &state, dcon::nation_id nid, bool craved)
 
std::vector< full_construction_provinceestimate_private_investment_province (sys::state &state, dcon::nation_id nid)
 
void run_private_investment (sys::state &state)
 
void daily_update (sys::state &state, bool presimulation, float presimulation_stage)
 
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::market_id m, dcon::factory_type_id factory_type)
 
float factory_type_output_cost (sys::state &state, dcon::nation_id n, dcon::market_id m, dcon::factory_type_id factory_type)
 
float factory_type_input_cost (sys::state &state, dcon::nation_id n, dcon::market_id m, 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 nation_total_exports (sys::state &state, dcon::nation_id n)
 
float pop_income (sys::state &state, dcon::pop_id p)
 
trade_and_tariff explain_trade_route_commodity (sys::state &state, dcon::trade_route_id trade_route, dcon::commodity_id cid)
 
std::vector< trade_breakdown_itemexplain_national_tariff (sys::state &state, dcon::nation_id n, bool import_flag, bool export_flag)
 
float estimate_gold_income (sys::state &state, dcon::nation_id n)
 
float estimate_tariff_import_income (sys::state &state, dcon::nation_id n)
 
float estimate_tariff_export_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_diplomatic_income (sys::state &state, dcon::nation_id n)
 
float estimate_diplomatic_expenses (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_war_subsidies (sys::state &state, dcon::nation_fat_id target, dcon::nation_fat_id source)
 
float estimate_subject_payments_paid (sys::state &state, dcon::nation_id n)
 
float estimate_subject_payments_received (sys::state &state, dcon::nation_id o)
 
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)
 
command::budget_settings_data budget_minimums (sys::state &state, dcon::nation_id n)
 
command::budget_settings_data budget_maximums (sys::state &state, dcon::nation_id n)
 
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)
 
float estimate_investment_pool_daily_loss (sys::state &state, dcon::nation_id n)
 
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)
 
ve::fp_vector price (sys::state const &state, ve::tagged_vector< dcon::market_id > s, dcon::commodity_id c)
 
float rgo_full_production_quantity (sys::state const &state, dcon::nation_id n, dcon::province_id p, dcon::commodity_id c)
 
ve::fp_vector base_artisan_profit (sys::state &state, ve::tagged_vector< dcon::market_id > markets, ve::tagged_vector< dcon::nation_id > nations, 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 auto utility_decay_p = 0.998f
 
constexpr auto current_profits_weight_p
 
constexpr auto short_term_profits_weight_p
 
constexpr auto mid_term_profits_weight_p
 
constexpr auto long_term_profits_weight_p
 
constexpr auto utility_decay_n = 0.998f
 
constexpr auto current_profits_weight_n
 
constexpr auto short_term_profits_weight_n
 
constexpr auto mid_term_profits_weight_n
 
constexpr auto long_term_profits_weight_n
 
constexpr auto utility_decay_trade = 0.1f
 
constexpr auto current_profits_weight_trade
 
constexpr auto short_term_profits_weight_trade
 
constexpr auto mid_term_profits_weight_trade
 
constexpr auto long_term_profits_weight_trade
 
constexpr float ln_2 = 0.30103f
 
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
 
const float courage = 1.0f
 
const float days_prepaid = 5.f
 
constexpr float subsistence_factor = 15.0f
 
constexpr float subsistence_score_life = 30.0f
 
constexpr float subsistence_score_everyday = 30.0f
 
constexpr float subsistence_score_total = subsistence_score_life + subsistence_score_everyday
 
constexpr float payouts_spending_multiplier = 10.f
 
constexpr float secondary_employment_output_bonus = 3.f
 
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 price_speed_mod = 0.001f
 
constexpr float price_rigging = 0.015f
 
constexpr float production_throughput_multiplier = 2.f
 
constexpr float stockpile_to_supply = 0.1f
 
constexpr float stockpile_spoilage = 0.15f
 
constexpr float stockpile_expected_spending_per_commodity = 1000.f
 
constexpr float merchant_cut_foreign = 0.05f
 
constexpr float merchant_cut_domestic = 0.001f
 
constexpr float rgo_owners_cut = 0.2f
 
constexpr float factory_owners_cut = 0.5f
 
constexpr float factory_sworkers_cut = 0.4f
 
constexpr float factory_pworkers_cut = 0.1f
 
constexpr float factory_workers_cut = factory_sworkers_cut + factory_pworkers_cut
 
constexpr float aristocrats_greed = 0.5f
 
constexpr float artisans_greed = 0.001f
 
constexpr float primary_greed = 2.f
 
constexpr float secondary_greed = 20.f
 

Enumeration Type Documentation

◆ commodity_production_type

Enumerator
primary 
derivative 
both 

Definition at line 9 of file economy.hpp.

◆ economy_reason

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

Definition at line 119 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 108 of file economy.hpp.

Function Documentation

◆ 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 8399 of file economy.cpp.

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

◆ adjust_artisan_balance()

template<typename T , typename S >
void economy::adjust_artisan_balance ( sys::state state,
markets,
nations 
)

Definition at line 1372 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 1852 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 4544 of file economy.cpp.

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

◆ artisan_input_multiplier()

template<typename T >
auto economy::artisan_input_multiplier ( sys::state state,
nations 
)

Definition at line 1205 of file economy.cpp.

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

◆ artisan_output_multiplier()

template<typename T >
auto economy::artisan_output_multiplier ( sys::state state,
nations 
)

Definition at line 1221 of file economy.cpp.

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

◆ artisan_throughput_multiplier()

template<typename T >
auto economy::artisan_throughput_multiplier ( sys::state state,
nations 
)

Definition at line 1237 of file economy.cpp.

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

◆ average_capitalists_luxury_cost()

float economy::average_capitalists_luxury_cost ( sys::state state,
dcon::nation_id  s 
)

Definition at line 432 of file economy.cpp.

Here is the call graph for this function:

◆ base_artisan_profit() [1/3]

float economy::base_artisan_profit ( sys::state state,
dcon::market_id  market,
dcon::commodity_id  c 
)

Definition at line 1273 of file economy.cpp.

Here is the call graph for this function:

◆ base_artisan_profit() [2/3]

template<typename T , typename S >
ve::fp_vector economy::base_artisan_profit ( sys::state state,
markets,
nations,
dcon::commodity_id  c 
)

Definition at line 1249 of file economy.cpp.

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

◆ base_artisan_profit() [3/3]

ve::fp_vector economy::base_artisan_profit ( sys::state state,
ve::tagged_vector< dcon::market_id >  markets,
ve::tagged_vector< dcon::nation_id >  nations,
dcon::commodity_id  c 
)

◆ bound_budget_settings()

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

Definition at line 8812 of file economy.cpp.

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

◆ budget_maximums()

command::budget_settings_data economy::budget_maximums ( sys::state state,
dcon::nation_id  n 
)

Definition at line 8745 of file economy.cpp.

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

◆ budget_minimums()

command::budget_settings_data economy::budget_minimums ( sys::state state,
dcon::nation_id  n 
)

Definition at line 8703 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 794 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 867 of file economy.cpp.

◆ commodity_get_factory_types_as_output()

std::vector< dcon::factory_type_id > economy::commodity_get_factory_types_as_output ( sys::state const &  state,
dcon::commodity_id  output_good 
)

Definition at line 883 of file economy.cpp.

Here is the caller graph for this function:

◆ consumption() [1/3]

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

Definition at line 348 of file economy.cpp.

◆ consumption() [2/3]

float economy::consumption ( sys::state state,
dcon::market_id  s,
dcon::commodity_id  c 
)

Definition at line 325 of file economy.cpp.

Here is the caller graph for this function:

◆ consumption() [3/3]

float economy::consumption ( sys::state state,
dcon::nation_id  s,
dcon::commodity_id  c 
)

Definition at line 332 of file economy.cpp.

◆ 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 1065 of file economy.cpp.

◆ convex_function()

float economy::convex_function ( float  x)

Definition at line 2780 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  presimulation,
float  presimulation_stage 
)

Definition at line 5363 of file economy.cpp.

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

◆ demand() [1/3]

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

Definition at line 305 of file economy.cpp.

◆ demand() [2/3]

float economy::demand ( sys::state state,
dcon::market_id  s,
dcon::commodity_id  c 
)

Definition at line 283 of file economy.cpp.

Here is the caller graph for this function:

◆ demand() [3/3]

float economy::demand ( sys::state state,
dcon::nation_id  s,
dcon::commodity_id  c 
)

Definition at line 290 of file economy.cpp.

◆ demand_satisfaction() [1/3]

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

Definition at line 419 of file economy.cpp.

Here is the call graph for this function:

◆ demand_satisfaction() [2/3]

float economy::demand_satisfaction ( sys::state state,
dcon::market_id  s,
dcon::commodity_id  c 
)

Definition at line 395 of file economy.cpp.

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

◆ demand_satisfaction() [3/3]

float economy::demand_satisfaction ( sys::state state,
dcon::nation_id  s,
dcon::commodity_id  c 
)

Definition at line 407 of file economy.cpp.

Here is the call graph for this function:

◆ desired_needs_spending()

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

Definition at line 111 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  total_profit 
)

Definition at line 4747 of file economy.cpp.

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

◆ domestic_trade_volume()

float economy::domestic_trade_volume ( sys::state state,
dcon::nation_id  s,
dcon::commodity_id  c 
)

Definition at line 230 of file economy.cpp.

◆ effective_tariff_export_rate()

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

Definition at line 1742 of file economy.cpp.

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

◆ effective_tariff_import_rate()

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

Definition at line 1737 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 4805 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 3692 of file economy.cpp.

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

◆ estimate_construction_spending_from_budget()

float economy::estimate_construction_spending_from_budget ( sys::state state,
dcon::nation_id  n,
float  current_budget 
)

Definition at line 3433 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 8660 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 8126 of file economy.cpp.

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

◆ estimate_diplomatic_expenses()

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

Definition at line 8138 of file economy.cpp.

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

◆ estimate_diplomatic_income()

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

Definition at line 8132 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 8147 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 7942 of file economy.cpp.

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

◆ estimate_investment_pool_daily_loss()

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

Definition at line 8970 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 8177 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 8194 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 4041 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 8023 of file economy.cpp.

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

◆ estimate_private_construction_spendings()

float economy::estimate_private_construction_spendings ( sys::state state,
dcon::nation_id  nid 
)

Definition at line 3701 of file economy.cpp.

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

◆ estimate_private_investment_construct()

std::vector< full_construction_state > economy::estimate_private_investment_construct ( sys::state state,
dcon::nation_id  nid,
bool  craved 
)

Definition at line 5051 of file economy.cpp.

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

◆ estimate_private_investment_province()

std::vector< full_construction_province > economy::estimate_private_investment_province ( sys::state state,
dcon::nation_id  nid 
)

Definition at line 5205 of file economy.cpp.

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

◆ estimate_private_investment_upgrade()

std::vector< full_construction_state > economy::estimate_private_investment_upgrade ( sys::state state,
dcon::nation_id  nid 
)

Definition at line 4943 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 8081 of file economy.cpp.

Here is the call graph for this function:
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 8109 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 7990 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 4016 of file economy.cpp.

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

◆ estimate_subject_payments_paid()

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

Definition at line 8218 of file economy.cpp.

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

◆ estimate_subject_payments_received()

float economy::estimate_subject_payments_received ( sys::state state,
dcon::nation_id  o 
)

Definition at line 8242 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 8067 of file economy.cpp.

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

◆ estimate_tariff_export_income()

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

Definition at line 7974 of file economy.cpp.

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

◆ estimate_tariff_import_income()

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

Definition at line 7958 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 8054 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_fat_id  target,
dcon::nation_fat_id  source 
)

Definition at line 8210 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 8071 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 8097 of file economy.cpp.

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

◆ expected_savings_per_capita()

float economy::expected_savings_per_capita ( sys::state state)

Definition at line 123 of file economy.cpp.

Here is the caller graph for this function:

◆ explain_national_tariff()

std::vector< trade_breakdown_item > economy::explain_national_tariff ( sys::state state,
dcon::nation_id  n,
bool  import_flag,
bool  export_flag 
)

Definition at line 7883 of file economy.cpp.

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

◆ explain_trade_route_commodity()

trade_and_tariff economy::explain_trade_route_commodity ( sys::state state,
dcon::trade_route_id  trade_route,
dcon::commodity_id  cid 
)

Definition at line 7765 of file economy.cpp.

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

◆ export_volume() [1/2]

float economy::export_volume ( sys::state state,
dcon::market_id  s,
dcon::commodity_id  c 
)

Definition at line 470 of file economy.cpp.

◆ export_volume() [2/2]

float economy::export_volume ( sys::state state,
dcon::nation_id  s,
dcon::commodity_id  c 
)

Definition at line 477 of file economy.cpp.

◆ export_volume_detailed()

trade_volume_data_detailed economy::export_volume_detailed ( sys::state state,
dcon::nation_id  s,
dcon::commodity_id  c 
)

Definition at line 492 of file economy.cpp.

Here is the caller graph for this function:

◆ factory_desired_raw_profit()

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

Definition at line 2408 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 const &  state,
dcon::market_id  m,
dcon::factory_type_id  fac_type 
)

Definition at line 2294 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 const &  state,
dcon::factory_id  fac,
dcon::nation_id  n,
dcon::province_id  p,
dcon::state_instance_id  s 
)

Definition at line 2329 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 const &  state,
dcon::market_id  m,
dcon::factory_type_id  fac_type 
)

Definition at line 2263 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 1892 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 2007 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 const &  state,
dcon::factory_id  fac,
float  mobilization_impact,
bool  occupied 
)

Definition at line 2400 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 const &  state,
dcon::factory_fat_id  fac 
)

Definition at line 2395 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 const &  state,
dcon::market_id  m,
dcon::factory_type_id  fac_type 
)

Definition at line 2276 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 const &  state,
dcon::market_id  m,
dcon::factory_type_id  fac_type 
)

Definition at line 2242 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 const &  state,
dcon::factory_id  fac,
dcon::nation_id  n,
dcon::market_id  m,
dcon::province_id  p 
)

Definition at line 2386 of file economy.cpp.

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

◆ factory_output_multiplier_no_secondary_workers()

float economy::factory_output_multiplier_no_secondary_workers ( sys::state const &  state,
dcon::factory_id  fac,
dcon::nation_id  n,
dcon::province_id  p 
)

Definition at line 2376 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 2011 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 1885 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 2020 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 const &  state,
dcon::factory_type_id  fac_type,
dcon::nation_id  n,
dcon::province_id  p,
dcon::state_instance_id  s 
)

Definition at line 2362 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 2029 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::market_id  m,
dcon::factory_type_id  factory_type 
)

Definition at line 7559 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::market_id  m,
dcon::factory_type_id  factory_type 
)

Definition at line 7591 of file economy.cpp.

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

◆ factory_type_output_cost()

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

Definition at line 7578 of file economy.cpp.

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

◆ factory_upgrade()

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

Definition at line 8286 of file economy.cpp.

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

◆ farmer_min_wage()

float economy::farmer_min_wage ( sys::state state,
dcon::market_id  m,
float  min_wage_factor 
)

Definition at line 65 of file economy.cpp.

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 4067 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 3832 of file economy.cpp.

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

◆ gdp_adjusted() [1/2]

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

Definition at line 846 of file economy.cpp.

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

◆ gdp_adjusted() [2/2]

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

Definition at line 852 of file economy.cpp.

Here is the call graph for this function:

◆ get_province_immigrator_modifier()

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

Definition at line 8919 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 8915 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 3183 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 877 of file economy.cpp.

◆ global_non_factory_construction_time_modifier()

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

Definition at line 3164 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 8923 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 7524 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 1166 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 895 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::market_id  n 
)

Definition at line 841 of file economy.cpp.

Here is the caller graph for this function:

◆ import_volume() [1/2]

float economy::import_volume ( sys::state state,
dcon::market_id  s,
dcon::commodity_id  c 
)

Definition at line 578 of file economy.cpp.

Here is the caller graph for this function:

◆ import_volume() [2/2]

float economy::import_volume ( sys::state state,
dcon::nation_id  s,
dcon::commodity_id  c 
)

Definition at line 585 of file economy.cpp.

◆ import_volume_detailed()

trade_volume_data_detailed economy::import_volume_detailed ( sys::state state,
dcon::nation_id  s,
dcon::commodity_id  c 
)

Definition at line 599 of file economy.cpp.

Here is the caller graph for this function:

◆ initialize()

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

Definition at line 1483 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 913 of file economy.cpp.

Here is the caller graph for this function:

◆ initialize_needs_weights()

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

Definition at line 972 of file economy.cpp.

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

◆ interest_payment()

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

Definition at line 808 of file economy.cpp.

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 1180 of file economy.cpp.

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

◆ laborer_min_wage()

float economy::laborer_min_wage ( sys::state state,
dcon::market_id  m,
float  min_wage_factor 
)

Definition at line 70 of file economy.cpp.

Here is the caller graph for this function:

◆ market_pool() [1/3]

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

Definition at line 383 of file economy.cpp.

◆ market_pool() [2/3]

float economy::market_pool ( sys::state state,
dcon::market_id  s,
dcon::commodity_id  c 
)

Definition at line 360 of file economy.cpp.

Here is the caller graph for this function:

◆ market_pool() [3/3]

float economy::market_pool ( sys::state state,
dcon::nation_id  s,
dcon::commodity_id  c 
)

Definition at line 367 of file economy.cpp.

◆ max_loan()

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

Definition at line 816 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 832 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 825 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 7608 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 const &  state,
dcon::factory_type_id  fac_type,
dcon::nation_id  n 
)

Definition at line 2313 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 const &  state,
dcon::factory_type_id  fac_type,
dcon::nation_id  n 
)

Definition at line 2322 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 1190 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 1186 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 7688 of file economy.cpp.

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

◆ nation_total_exports()

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

Definition at line 7729 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 7712 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::market_id  n,
dcon::commodity_id  c 
)

Definition at line 1001 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 7746 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 16 of file economy.cpp.

Here is the caller graph for this function:

◆ populate_army_consumption()

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

Definition at line 3042 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 3190 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 3099 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 3767 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 1151 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 836 of file economy.cpp.

◆ previous_price_record_index()

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

Definition at line 828 of file economy.cpp.

◆ price() [1/5]

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

Definition at line 179 of file economy.cpp.

Here is the call graph for this function:

◆ price() [2/5]

float economy::price ( sys::state const &  state,
dcon::market_id  s,
dcon::commodity_id  c 
)

Definition at line 202 of file economy.cpp.

◆ price() [3/5]

float economy::price ( sys::state const &  state,
dcon::nation_id  s,
dcon::commodity_id  c 
)

Definition at line 155 of file economy.cpp.

Here is the call graph for this function:

◆ price() [4/5]

float economy::price ( sys::state const &  state,
dcon::state_instance_id  s,
dcon::commodity_id  c 
)

Definition at line 150 of file economy.cpp.

Here is the caller graph for this function:

◆ price() [5/5]

ve::fp_vector economy::price ( sys::state const &  state,
ve::tagged_vector< dcon::market_id >  s,
dcon::commodity_id  c 
)

◆ priority_multiplier()

float economy::priority_multiplier ( sys::state const &  state,
dcon::factory_type_id  fac_type,
dcon::nation_id  n 
)

Definition at line 2308 of file economy.cpp.

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

◆ province_building_construction()

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

Definition at line 8268 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 73 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 57 of file economy.hpp.

Here is the caller graph for this function:

◆ prune_factories()

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

Definition at line 8876 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 1327 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::market_id  n 
)

Definition at line 1005 of file economy.cpp.

Here is the call graph for this function:

◆ regenerate_unsaved_values()

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

Definition at line 7485 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::market_id  s,
dcon::commodity_id  commodity_type,
float  amount 
)

Definition at line 745 of file economy.cpp.

Here is the caller graph for this function:

◆ register_demand() [1/2]

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

Definition at line 687 of file economy.cpp.

Here is the caller graph for this function:

◆ register_demand() [2/2]

template<typename T >
void economy::register_demand ( sys::state state,
s,
dcon::commodity_id  commodity_type,
ve::fp_vector  amount,
economy_reason  reason 
)

Definition at line 700 of file economy.cpp.

Here is the call graph for this function:

◆ register_domestic_supply() [1/2]

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

Definition at line 750 of file economy.cpp.

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

◆ register_domestic_supply() [2/2]

template<typename T >
void economy::register_domestic_supply ( sys::state state,
s,
dcon::commodity_id  commodity_type,
ve::fp_vector  amount,
economy_reason  reason 
)

Definition at line 772 of file economy.cpp.

Here is the call graph for this function:

◆ register_foreign_supply()

void economy::register_foreign_supply ( sys::state state,
dcon::market_id  s,
dcon::commodity_id  commodity_type,
float  amount,
economy_reason  reason 
)

Definition at line 761 of file economy.cpp.

◆ register_intermediate_demand()

template<typename T >
void economy::register_intermediate_demand ( sys::state state,
s,
dcon::commodity_id  c,
ve::fp_vector  amount,
economy_reason  reason 
)

Definition at line 725 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 8426 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::market_id  m,
dcon::nation_id  n,
float  min_wage,
float  total_relevant_population 
)

Definition at line 2698 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 1780 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 2187 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::market_id  m,
dcon::nation_id  n,
dcon::commodity_id  c 
)

Definition at line 2764 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 2228 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 1822 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 2682 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 1802 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 1814 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 1826 of file economy.cpp.

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

◆ run_private_investment()

void economy::run_private_investment ( sys::state state)

Definition at line 5286 of file economy.cpp.

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

◆ sanity_check()

void economy::sanity_check ( sys::state state)

Definition at line 136 of file economy.cpp.

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 1888 of file economy.cpp.

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

◆ skilled_labor_supply_multiplier() [1/2]

float economy::skilled_labor_supply_multiplier ( sys::state state,
dcon::market_id  markets 
)

Definition at line 53 of file economy.cpp.

◆ skilled_labor_supply_multiplier() [2/2]

template<typename T >
ve::fp_vector economy::skilled_labor_supply_multiplier ( sys::state state,
markets 
)

Definition at line 42 of file economy.cpp.

◆ 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 1714 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 8315 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 8328 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 8347 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 872 of file economy.cpp.

◆ subsistence_max_pseudoemployment()

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

Definition at line 1810 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 1775 of file economy.cpp.

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

◆ supply() [1/3]

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

Definition at line 271 of file economy.cpp.

◆ supply() [2/3]

float economy::supply ( sys::state state,
dcon::market_id  s,
dcon::commodity_id  c 
)

Definition at line 206 of file economy.cpp.

Here is the caller graph for this function:

◆ supply() [3/3]

float economy::supply ( sys::state state,
dcon::nation_id  s,
dcon::commodity_id  c 
)

Definition at line 213 of file economy.cpp.

◆ 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 8669 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 8362 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 8381 of file economy.cpp.

Here is the call graph for this function:

◆ unskilled_labor_supply_multiplier() [1/2]

float economy::unskilled_labor_supply_multiplier ( sys::state state,
dcon::market_id  markets 
)

Definition at line 48 of file economy.cpp.

◆ unskilled_labor_supply_multiplier() [2/2]

template<typename T >
ve::fp_vector economy::unskilled_labor_supply_multiplier ( sys::state state,
markets 
)

Definition at line 36 of file economy.cpp.

◆ update_artisan_consumption()

template<typename T , typename S , typename U >
void economy::update_artisan_consumption ( sys::state state,
markets,
nations,
states,
ve::fp_vector  expected_min_wage,
ve::fp_vector  mobilization_impact 
)

Definition at line 2914 of file economy.cpp.

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

◆ update_factory_employment()

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

Definition at line 2044 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 1748 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 1868 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 1834 of file economy.cpp.

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

◆ update_market_artisan_production()

template<typename T >
void economy::update_market_artisan_production ( sys::state state,
markets 
)

Definition at line 3033 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 4083 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,
ve::vectorizable_buffer< float, dcon::nation_id > &  invention_count 
)

Definition at line 4188 of file economy.cpp.

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

◆ update_province_rgo_employment()

void economy::update_province_rgo_employment ( sys::state state,
dcon::province_id  p,
dcon::market_id  m,
dcon::nation_id  n,
float  mobilization_impact,
float  expected_min_wage 
)

Definition at line 2785 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::market_id  m,
dcon::nation_id  n 
)

Definition at line 2873 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 1901 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::province_id  p,
dcon::state_instance_id  s,
dcon::market_id  m,
dcon::nation_id  n,
float  mobilization_impact,
bool  occupied 
)

Definition at line 2412 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::market_id  m,
dcon::nation_id  n 
)

Definition at line 2640 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  nations,
dcon::commodity_id  cid 
)

Definition at line 1312 of file economy.cpp.

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

◆ valid_everyday_need()

bool economy::valid_everyday_need ( sys::state state,
dcon::nation_id  n,
dcon::commodity_id  c 
)

Definition at line 957 of file economy.cpp.

Here is the caller graph for this function:

◆ valid_life_need()

bool economy::valid_life_need ( sys::state state,
dcon::nation_id  n,
dcon::commodity_id  c 
)

Definition at line 950 of file economy.cpp.

Here is the caller graph for this function:

◆ valid_luxury_need()

bool economy::valid_luxury_need ( sys::state state,
dcon::nation_id  n,
dcon::commodity_id  c 
)

Definition at line 964 of file economy.cpp.

Here is the caller graph for this function:

◆ valid_need() [1/2]

bool economy::valid_need ( sys::state state,
dcon::nation_id  n,
dcon::commodity_id  c 
)

Definition at line 938 of file economy.cpp.

Here is the caller graph for this function:

◆ valid_need() [2/2]

template<typename T >
ve::mask_vector economy::valid_need ( sys::state state,
n,
dcon::commodity_id  c 
)

Definition at line 944 of file economy.cpp.

◆ ve_adjusted_subsistence_score()

template<typename T >
ve::fp_vector economy::ve_adjusted_subsistence_score ( sys::state state,
p 
)

Definition at line 1859 of file economy.cpp.

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

◆ ve_artisan_min_wage()

template<typename T >
ve::fp_vector economy::ve_artisan_min_wage ( sys::state state,
markets 
)

Definition at line 24 of file economy.cpp.

Here is the caller graph for this function:

◆ ve_farmer_min_wage()

template<typename T >
ve::fp_vector economy::ve_farmer_min_wage ( sys::state state,
markets,
ve::fp_vector  min_wage_factor 
)

Definition at line 30 of file economy.cpp.

◆ ve_laborer_min_wage()

template<typename T >
ve::fp_vector economy::ve_laborer_min_wage ( sys::state state,
markets,
ve::fp_vector  min_wage_factor 
)

Definition at line 60 of file economy.cpp.

◆ ve_pop_min_wage_factor()

template<typename T >
ve::fp_vector economy::ve_pop_min_wage_factor ( sys::state state,
n 
)

Definition at line 20 of file economy.cpp.

Here is the caller graph for this function:

◆ ve_price()

template<typename T >
ve::fp_vector economy::ve_price ( sys::state const &  state,
s,
dcon::commodity_id  c 
)

Definition at line 198 of file economy.cpp.

Here is the caller graph for this function:

◆ ve_pseudo_exp_for_negative()

ve::fp_vector economy::ve_pseudo_exp_for_negative ( ve::fp_vector  f)

Definition at line 1346 of file economy.cpp.

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

◆ ve_valid_artisan_good()

template<typename T >
ve::mask_vector economy::ve_valid_artisan_good ( sys::state state,
nations,
dcon::commodity_id  cid 
)

Definition at line 1300 of file economy.cpp.

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

Variable Documentation

◆ aristocrats_greed

constexpr float economy::aristocrats_greed = 0.5f
inlineconstexpr

Definition at line 149 of file economy.hpp.

◆ artisans_greed

constexpr float economy::artisans_greed = 0.001f
inlineconstexpr

Definition at line 150 of file economy.hpp.

◆ courage

const float economy::courage = 1.0f
inline

Definition at line 4939 of file economy.cpp.

◆ current_profits_weight_n

constexpr auto economy::current_profits_weight_n
inlineconstexpr
Initial value:
=
constexpr auto utility_decay_n
Definition: economy.cpp:91

Definition at line 92 of file economy.cpp.

◆ current_profits_weight_p

constexpr auto economy::current_profits_weight_p
inlineconstexpr
Initial value:
=
constexpr auto utility_decay_p
Definition: economy.cpp:76

Definition at line 77 of file economy.cpp.

◆ current_profits_weight_trade

constexpr auto economy::current_profits_weight_trade
inlineconstexpr
Initial value:
=
constexpr auto utility_decay_trade
Definition: economy.cpp:105

Definition at line 106 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 3171 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 3155 of file economy.cpp.

◆ day_1_derivative_factory

constexpr float economy::day_1_derivative_factory = -0.01f
inlineconstexpr

Definition at line 3173 of file economy.cpp.

◆ day_1_derivative_non_factory

constexpr float economy::day_1_derivative_non_factory = -0.2f
inlineconstexpr

Definition at line 3157 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 3172 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 3156 of file economy.cpp.

◆ days_prepaid

const float economy::days_prepaid = 5.f
inline

Definition at line 4940 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 3175 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 3159 of file economy.cpp.

◆ factory_closed_threshold

constexpr float economy::factory_closed_threshold = 0.0001f
inlineconstexpr

Definition at line 125 of file economy.hpp.

◆ factory_owners_cut

constexpr float economy::factory_owners_cut = 0.5f
inlineconstexpr

Definition at line 145 of file economy.hpp.

◆ factory_pworkers_cut

constexpr float economy::factory_pworkers_cut = 0.1f
inlineconstexpr

Definition at line 147 of file economy.hpp.

◆ factory_sworkers_cut

constexpr float economy::factory_sworkers_cut = 0.4f
inlineconstexpr

Definition at line 146 of file economy.hpp.

◆ factory_workers_cut

constexpr float economy::factory_workers_cut = factory_sworkers_cut + factory_pworkers_cut
inlineconstexpr

Definition at line 148 of file economy.hpp.

◆ gdp_history_length

constexpr uint32_t economy::gdp_history_length = 128
inlineconstexpr

Definition at line 127 of file economy.hpp.

◆ ln_2

constexpr float economy::ln_2 = 0.30103f
inlineconstexpr

Definition at line 1324 of file economy.cpp.

◆ long_term_profits_weight_n

constexpr auto economy::long_term_profits_weight_n
inlineconstexpr
Initial value:
=
/ (1.f - utility_decay_n)
constexpr auto current_profits_weight_n
Definition: economy.cpp:92
constexpr auto mid_term_profits_weight_n
Definition: economy.cpp:98
constexpr auto short_term_profits_weight_n
Definition: economy.cpp:95

Definition at line 101 of file economy.cpp.

◆ long_term_profits_weight_p

constexpr auto economy::long_term_profits_weight_p
inlineconstexpr
Initial value:
=
/ (1.f - utility_decay_p)
constexpr auto mid_term_profits_weight_p
Definition: economy.cpp:83
constexpr auto current_profits_weight_p
Definition: economy.cpp:77
constexpr auto short_term_profits_weight_p
Definition: economy.cpp:80

Definition at line 86 of file economy.cpp.

◆ long_term_profits_weight_trade

constexpr auto economy::long_term_profits_weight_trade
inlineconstexpr
Initial value:
=
/ (1.f - utility_decay_trade)
constexpr auto current_profits_weight_trade
Definition: economy.cpp:106
constexpr auto short_term_profits_weight_trade
Definition: economy.cpp:109
constexpr auto mid_term_profits_weight_trade
Definition: economy.cpp:112

Definition at line 115 of file economy.cpp.

◆ max_building_types

constexpr int32_t economy::max_building_types = 5
inlineconstexpr

Definition at line 579 of file constants.hpp.

◆ merchant_cut_domestic

constexpr float economy::merchant_cut_domestic = 0.001f
inlineconstexpr

Definition at line 139 of file economy.hpp.

◆ merchant_cut_foreign

constexpr float economy::merchant_cut_foreign = 0.05f
inlineconstexpr

Definition at line 138 of file economy.hpp.

◆ mid_term_profits_weight_n

constexpr auto economy::mid_term_profits_weight_n
inlineconstexpr
Initial value:
=
/ (1.f - utility_decay_n)

Definition at line 98 of file economy.cpp.

◆ mid_term_profits_weight_p

constexpr auto economy::mid_term_profits_weight_p
inlineconstexpr
Initial value:
=
/ (1.f - utility_decay_p)

Definition at line 83 of file economy.cpp.

◆ mid_term_profits_weight_trade

constexpr auto economy::mid_term_profits_weight_trade
inlineconstexpr
Initial value:
=
/ (1.f - utility_decay_trade)

Definition at line 112 of file economy.cpp.

◆ payouts_spending_multiplier

constexpr float economy::payouts_spending_multiplier = 10.f
inlineconstexpr

Definition at line 119 of file economy.hpp.

◆ price_history_length

constexpr uint32_t economy::price_history_length = 256
inlineconstexpr

Definition at line 126 of file economy.hpp.

◆ price_rigging

constexpr float economy::price_rigging = 0.015f
inlineconstexpr

Definition at line 129 of file economy.hpp.

◆ price_speed_mod

constexpr float economy::price_speed_mod = 0.001f
inlineconstexpr

Definition at line 128 of file economy.hpp.

◆ primary_greed

constexpr float economy::primary_greed = 2.f
inlineconstexpr

Definition at line 151 of file economy.hpp.

◆ production_scale_delta

constexpr float economy::production_scale_delta = 0.1f
inlineconstexpr

Definition at line 124 of file economy.hpp.

◆ production_throughput_multiplier

constexpr float economy::production_throughput_multiplier = 2.f
inlineconstexpr

Definition at line 130 of file economy.hpp.

◆ rgo_owners_cut

constexpr float economy::rgo_owners_cut = 0.2f
inlineconstexpr

Definition at line 144 of file economy.hpp.

◆ secondary_employment_output_bonus

constexpr float economy::secondary_employment_output_bonus = 3.f
inlineconstexpr

Definition at line 122 of file economy.hpp.

◆ secondary_greed

constexpr float economy::secondary_greed = 20.f
inlineconstexpr

Definition at line 152 of file economy.hpp.

◆ shift_factory

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

Definition at line 3176 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 3160 of file economy.cpp.

◆ short_term_profits_weight_n

constexpr auto economy::short_term_profits_weight_n
inlineconstexpr
Initial value:

Definition at line 95 of file economy.cpp.

◆ short_term_profits_weight_p

constexpr auto economy::short_term_profits_weight_p
inlineconstexpr
Initial value:

Definition at line 80 of file economy.cpp.

◆ short_term_profits_weight_trade

constexpr auto economy::short_term_profits_weight_trade
inlineconstexpr
Initial value:

Definition at line 109 of file economy.cpp.

◆ slope_factory

constexpr float economy::slope_factory = diff_factory * shift_factory
inlineconstexpr

Definition at line 3177 of file economy.cpp.

◆ slope_non_factory

constexpr float economy::slope_non_factory = diff_non_factory * shift_non_factory
inlineconstexpr

Definition at line 3161 of file economy.cpp.

◆ stockpile_expected_spending_per_commodity

constexpr float economy::stockpile_expected_spending_per_commodity = 1000.f
inlineconstexpr

Definition at line 135 of file economy.hpp.

◆ stockpile_spoilage

constexpr float economy::stockpile_spoilage = 0.15f
inlineconstexpr

Definition at line 134 of file economy.hpp.

◆ stockpile_to_supply

constexpr float economy::stockpile_to_supply = 0.1f
inlineconstexpr

Definition at line 133 of file economy.hpp.

◆ subsistence_factor

constexpr float economy::subsistence_factor = 15.0f
inlineconstexpr

Definition at line 91 of file economy.hpp.

◆ subsistence_score_everyday

constexpr float economy::subsistence_score_everyday = 30.0f
inlineconstexpr

Definition at line 93 of file economy.hpp.

◆ subsistence_score_life

constexpr float economy::subsistence_score_life = 30.0f
inlineconstexpr

Definition at line 92 of file economy.hpp.

◆ subsistence_score_total

constexpr float economy::subsistence_score_total = subsistence_score_life + subsistence_score_everyday
inlineconstexpr

Definition at line 94 of file economy.hpp.

◆ utility_decay_n

constexpr auto economy::utility_decay_n = 0.998f
inlineconstexpr

Definition at line 91 of file economy.cpp.

◆ utility_decay_p

constexpr auto economy::utility_decay_p = 0.998f
inlineconstexpr

Definition at line 76 of file economy.cpp.

◆ utility_decay_trade

constexpr auto economy::utility_decay_trade = 0.1f
inlineconstexpr

Definition at line 105 of file economy.cpp.