00001
00002
00003
00004
00005
00006
00007 #ifndef __OFINANCE_H
00008 #define __OFINANCE_H
00009
00010 #include <OFINANC2.H>
00011 #include <OHISTORY.H>
00012
00013
00014
00015 enum { REPORT_TYPE_COUNT = 4 };
00016 enum { REPORT_YEAR_COUNT = 4 };
00017 enum { REPORT_OPT_COUNT = 3 };
00018
00019 enum { REPORT_TYPE_REVENUE, REPORT_TYPE_BALANCE, REPORT_TYPE_OPTIMIZATION, REPORT_TYPE_DETAIL_REN, REPORT_TYPE_BUDGET_VS_ACTUAL};
00020 enum { REPORT_OPT_REVENUE, REPORT_OPT_FUNCTION, REPORT_OPT_FACULTY};
00021
00022 enum { REPORT_YEAR_THREE_YEARS, REPORT_YEAR_PREV, REPORT_YEAR_THIS, REPORT_YEAR_NEXT };
00023
00024 enum { POSITIVE = 1, NEGATIVE = -1, NO_SIGN = 0 };
00025
00026
00027
00028 #if(GAME_VERSION>=200)
00029 enum { ASSET_ITEM_COUNT = 7 };
00030 #else
00031 enum { ASSET_ITEM_COUNT = 6 };
00032 #endif
00033
00034 #if(GAME_VERSION>=200)
00035 enum {
00036 AC_OPERATING_RESERVE,
00037 AC_CAPITAL_RESERVE,
00038 AC_ENDOWMENT,
00039 AC_BUILDINGS,
00040 AC_RESIDENCE,
00041 AC_QUASI,
00042
00043 AC_ASSET_TOTAL,
00044 };
00045 #else
00046 enum {
00047 AC_OPERATING_RESERVE,
00048 AC_CAPITAL_RESERVE,
00049 AC_ENDOWMENT,
00050 AC_BUILDINGS,
00051 AC_RESIDENCE,
00052
00053 AC_ASSET_TOTAL,
00054 };
00055 #endif
00056
00057
00058
00059 enum { LIABILITY_ITEM_COUNT = 3 };
00060
00061 enum {
00062 AC_GENERAL_PLANT_DEBT,
00063 AC_RESIDENCE_HALL_DEBT,
00064
00065 AC_LIABILITY_TOTAL,
00066
00067 AC_BANK_BORROWING = 2,
00068 };
00069
00070
00071
00072 enum { REVENUE_ITEM_COUNT = 10 };
00073
00074 enum {
00075 AC_GROSS_TUITION_INCOME,
00076 AC_FINANCIAL_AID,
00077 AC_NET_TUITION_INCOME,
00078 AC_SPONSORED_RESEARCH_REVENUE,
00079 AC_GIFTS,
00080 AC_ENDOWMENT_SPENDING,
00081 AC_INTERCOLLEGIATE_ATHLETICS,
00082 AC_OTHER_OPERATING_INCOME,
00083 AC_INTEREST_EARNED_OR_PAID,
00084 AC_STATE_APPROPRIATION,
00085 };
00086
00087 enum {
00088 OPERATING_EXPENSE_ITEM_COUNT = 10,
00089 TOTAL_EXPENSE_ITEM_COUNT = OPERATING_EXPENSE_ITEM_COUNT + 2
00090 };
00091
00092
00093
00094 enum { EXPENSE_ITEM_COUNT = TOTAL_EXPENSE_ITEM_COUNT };
00095
00096 enum {
00097 AC_ACADEMIC_DEPARTMENTS,
00098 AC_SPONSORED_RESEARCH_EXPENSE,
00099 AC_LIBRARIES=2,
00100 AC_IT_RESOURCES=3,
00101 AC_STUDENT_LIFE,
00102 AC_ATHLETICS,
00103 AC_INST_ADVANCEMENT,
00104 AC_ADMINISTRATION_N_OTHER_OPERATING_EXPENSE,
00105 AC_OPERATIONS_AND_MAINTENANCE,
00106 AC_ENROLLMENT_MANAGEMENT,
00107 AC_SERVICE_ON_GENERAL_PLANT_DEBT,
00108 AC_TRANSFER_TO_CAPITAL_RESERVE,
00109 };
00110
00111
00112
00113 enum { STUDENT_POLICY_COUNT = 6 };
00114
00115 enum {
00116 PL_TRADITIONAL_UG,
00117 PL_NON_TRADITIONAL_UG,
00118 PL_MASTERS_PROFESSIONAL,
00119 PL_DOCTORAL,
00120 PL_DISTANCE_LEARN,
00121 PL_TOTAL,
00122 };
00123
00124
00125
00126 enum { REVENUE_POLICY_COUNT = 4 };
00127
00128 enum {
00129 PL_TUITION_RATE_GROWTH,
00130 PL_FINANCIAL_AID,
00131 PL_ENDOWMENT_SPENDING_RATE,
00132 PL_INDIRECT_COST_RATE,
00133 };
00134
00135
00136
00137 enum { EXPENSE_POLICY_COUNT = 5 };
00138
00139 enum {
00140 PL_FACULTY_SALARY_INCREASES,
00141 PL_STAFF_SALARY_INCREASES,
00142
00143 PL_BUDGET_ADJUSTMENT,
00144 PL_REAL_TRANSFER_TO_PLANT_GROWTH,
00145 PL_SURPLUS_DEFICIT,
00146 };
00147
00148
00149 enum { COST_RISE_POLICY_COUNT = 10 };
00150
00151 enum {
00152 PL_FACULTY_FTE,
00153 PL_NON_FACULTY_DEPARTMENTAL_EXPENSE,
00154 PL_LIBRARIES = 2,
00155 PL_INFO_TECH_RESOURCES = 3,
00156 PL_STUDENT_LIFE,
00157 PL_ATHLETICS,
00158 PL_INST_ADVANCEMENT,
00159 PL_ADMINISTRATION,
00160 PL_OPERATIONS_AND_MAINTENANCE,
00161 PL_ENROLLMENT_MANAGEMENT,
00162 };
00163
00164
00165
00166 enum {
00167 CONSIDER_NEXT_YEAR,
00168 ANNOUNCE_NEXT_YEAR,
00169 IMPLEMENT_NOW,
00170 };
00171
00172
00173
00177 struct RevenueItem {
00178 double direct;
00179 double indirect;
00180 double total;
00181 double percent;
00182 };
00183
00184
00185
00187 struct ExpenseItem {
00188 double faculty;
00189 double staff;
00190 double other;
00191 double total;
00192 double percent;
00193 };
00194
00195
00199
00200
00201 int continue_next_year;
00202
00203 int estimate_next_year;
00204 };
00205
00206
00207
00209 struct FinancePolicy {
00210
00211 double target_value;
00212 double lower_bound;
00213 double upper_bound;
00214 double import_weight;
00215 bool required_flag;
00216 double result_value;
00217
00218 char applied_flag;
00219
00220
00221
00222 double lower_limit;
00223 double upper_limit;
00224
00225
00226
00227 double last_target_value;
00228 double last_upper_bound;
00229 double last_lower_bound;
00230
00231 double last_import_weight;
00232 bool last_required_flag;
00233
00234
00235
00236
00237 char penalty_direction;
00238 int max_penalty1;
00239 int max_penalty2;
00240
00241 double penalty_multiplier1;
00242 double penalty_multiplier2;
00243
00244
00245
00246 void reset_change(bool resetAll=false);
00247 void bound_correction();
00248 void set_constraint_policy(int saveLast=1);
00249 void reset_constraint_policy();
00250 };
00251
00254 struct HiringPolicy {
00255 int upper_bound;
00256 float weight;
00257
00258 int target_value;
00259 int result_value;
00260
00261 int fac_count;
00262 float avg_salary;
00263 };
00264
00265
00266
00267
00269 struct RevenueItemChange {
00270
00271 RevenueItem change_last_year;
00272 RevenueItem change_next_year;
00273
00274
00275
00276 RevenueItem this_year;
00277 RevenueItem next_year;
00278
00279 RevenueItem last_month;
00280 RevenueItem year_to_date;
00281 RevenueItem change_budget_year;
00282 #if(GAME_VERSION>=200)
00283 RevenueItem month_start;
00284 #endif
00285 };
00286
00289 struct ExpenseItemChange {
00290
00291 ExpenseItem change_last_year;
00292 ExpenseItem change_next_year;
00293
00294
00295
00296 ExpenseItem this_year;
00297 ExpenseItem next_year;
00298
00299 ExpenseItem last_month;
00300 ExpenseItem year_to_date;
00301 ExpenseItem change_budget_year;
00302 #if(GAME_VERSION>=200)
00303 ExpenseItem month_start;
00304 #endif
00305 };
00306
00307
00310
00311 double surplus_deficit;
00312
00313
00314 double asset_array[ASSET_ITEM_COUNT];
00315 double liability_array[LIABILITY_ITEM_COUNT];
00316 };
00317
00318
00319
00324 class Finance {
00325 public:
00326
00327 char fiscal_year_start_month;
00328 char fiscal_year_end_month;
00329 int report_financial_recno;
00330
00331
00332
00333
00334 RevenueItem revenue_array[REVENUE_ITEM_COUNT];
00335 ExpenseItem expense_array[EXPENSE_ITEM_COUNT];
00336
00337 #if(GAME_VERSION>=200)
00338 ExpenseItem net_distance_learning_expense;
00339 float transfer_operating_reserve;
00340 float transfer_capital_reserve;
00341 float transfer_quasi;
00342
00343 float endowment_quasi_ratio;
00344 #endif
00345
00346 RevenueItem total_revenue;
00347 ExpenseItem total_operating_expense;
00348 ExpenseItem total_expense;
00349
00350
00351 RevenueItem budget_revenue_array[REVENUE_ITEM_COUNT];
00352 ExpenseItem budget_expense_array[EXPENSE_ITEM_COUNT];
00353
00354 RevenueItem budget_total_revenue;
00355 ExpenseItem budget_total_operating_expense;
00356 ExpenseItem budget_total_expense;
00357
00358
00359
00360 RevenueItemChange projected_revenue_array[REVENUE_ITEM_COUNT];
00361 ExpenseItemChange projected_expense_array[EXPENSE_ITEM_COUNT];
00362
00363 #if(GAME_VERSION>=200)
00364 ExpenseItemChange projected_net_distance_learning_expense;
00365 #endif
00366
00367 RevenueItemChange projected_total_revenue;
00368 ExpenseItemChange projected_total_operating_expense;
00369 ExpenseItemChange projected_total_expense;
00370
00371 YearReport this_year, next_year, last_year, budget_year;
00372
00373 #if(GAME_VERSION>=200)
00374 #else
00375 Stage1Revenue stage1_revenue[STAGE1_REVENUE_ITEM_COUNT];
00376 Stage1Expense stage1_expense[STAGE1_EXPENSE_ITEM_COUNT];
00377 Stage2Expense stage2_expense[STAGE2_EXPENSE_POLICY_COUNT];
00378 #endif
00379
00380 public:
00381
00382
00383 int tradU_target_student_intake;
00384 int nontradU_target_student_intake;
00385 int master_target_student_intake;
00386 int dl_target_student_intake;
00387
00388
00389 double smoothed_endowment_value;
00390
00391
00392 int tuition_rate;
00393 float get_research_overhead_rate();
00394
00395
00396
00397 HistoryData inflation_rate_hist;
00398 double base_short_term_debt_interest;
00399 double base_long_term_debt_interest;
00400
00401
00402 double state_appropriation_last2;
00403
00404
00405
00406
00407 double inflation_rate;
00408 double short_term_debt_interest;
00409 double long_term_debt_interest;
00410 double debt_fraction_repaid_annually;
00411 double family_income_growth;
00412 double construction_cost_growth;
00413
00414
00415
00416 double endowment_return;
00417 double sponsored_research_growth;
00418 double gifts_growth;
00419 double athletics_revenue_growth;
00420 double bank_debt_interest;
00421 double other_expense_growth;
00422 double other_income_growth;
00423 int building_life_for_calc_depreciation;
00424
00425 double prior_dept_fac_exp;
00426
00427 float state_appropriation_real_growth;
00428
00429 double last_month_SR_D;
00430 double last_month_SR_ID;
00431
00432
00433 char month_left;
00434 double total_faculty_salary;
00435
00436 int projected_total_research_expense_this_year;
00437 float academic_support_ratio;
00438
00439 #if(GAME_VERSION>=200)
00440
00441 long last_warn_bankrupt_date;
00442 #endif
00443
00444 double research_expense_fac_ratio;
00445 double research_expense_staff_ratio;
00446
00447
00448
00449 StudentPolicy student_policy_array[STUDENT_POLICY_COUNT];
00450 FinancePolicy revenue_policy_array[REVENUE_POLICY_COUNT];
00451 FinancePolicy expense_policy_array[EXPENSE_POLICY_COUNT];
00452 FinancePolicy cost_rise_policy_array[COST_RISE_POLICY_COUNT];
00453
00454
00455 HiringPolicy hiring_policy_array[MAX_DEPARTMENT];
00456
00457 int max_hires;
00458 int total_hires;
00459 float cost_limit;
00460
00461 void calc_max_hires();
00462
00463
00464 char current_report_mode;
00465
00466
00467 int report_type;
00468 int report_year;
00469 int report_opt;
00470 char report_is_expanded;
00471
00472
00473 #if(GAME_VERSION>=200)
00474
00475 double base_appropriation[2];
00476 double enroll_appropriation[2];
00477 double performance_appropriation[2];
00478 double education_quality_appropriation[2];
00479 double total_appropriation[2];
00480 double facility_reserve_appropriation[2];
00481
00482
00483 double initial_state_appropriation;
00484 double initial_base_appropriation;
00485 double initial_enrollment_appropriation;
00486 double initial_performance_appropriation;
00487 double initial_eq_appropriation;
00488 #endif
00489
00490
00491
00492
00493
00494 public:
00495 void init();
00496 void deinit();
00497
00498 int write_file(File* filePtr);
00499 int read_file(File* filePtr);
00500
00501 void init_data_pre_enroll();
00502 void init_data();
00503 void post_init_data();
00504 void process_budget();
00505
00506 bool pre_optimization_stage_3(bool init=false);
00507
00508 bool optimize_policy_1(bool init=false);
00509 bool optimize_policy_2();
00510 bool optimize_policy_3();
00511 void correct_surplus_deficit();
00512
00513 void next_day();
00514
00515
00516 void next_month();
00517 void new_fiscal_year_report();
00518
00519
00520
00521 void disp_report_main(int refreshFlag, int dispReport=1, char* reportTitle=NULL);
00522 void report_detect(int detectReport=1);
00523
00524
00525 #if(GAME_VERSION>=200)
00526 void calc_distance_learning_expenditure();
00527 #endif
00528
00529
00530 void report_deinit();
00531 void new_fiscal_year();
00532 void new_fiscal_year_report(int refreshFlag);
00533 void new_fiscal_year_report_detect();
00534 void report_paint_button(int refreshFlag);
00535
00536
00537
00538 void update_projected_arrays_post_optimization();
00539
00540
00541
00542 private:
00543
00544 void disp_financial_reports(int refreshFlag);
00545
00546
00547 void update_external_factors_yearly();
00548 void update_external_factors_monthly();
00549 void calc_interest(char updateFlag=UPDATE_YEAR);
00550
00551 void update_projected_arrays_monthly();
00552 void update_projected_arrays_monthly_sub();
00553
00554 public:
00555 FinancePolicy* get_policy_var(bool isRevenue, char index);
00556
00557 bool update_projected_arrays_pre_optimization();
00558 void calc_projected_total_n_percent(int reCalc=0);
00559 void calc_total_last_year();
00560
00561 void change_budget(char changeType, bool isRevenue, char index, float percentChange, char showMsg=1);
00562 void calc_budget_report();
00563 void set_policy_target(bool isRevenue, char index);
00564
00565 void budget_calc_total();
00566 void budget_calc_percent();
00567 void budget_calc_change();
00568
00569 void calc_asset_total();
00570
00571 double get_available_funds();
00572 double calc_total_faculty_salary();
00573
00574
00575
00576 static double calc_change(double dest, double base);
00577
00578
00579 double surplus_deficit_history[HISTORY_MONTH_COUNT];
00580
00581 double operating_sub_surplus_history[HISTORY_MONTH_COUNT];
00582
00583 double sponsored_research_history[HISTORY_MONTH_COUNT];
00584 float sl1_sel_history[HISTORY_YEAR_COUNT];
00585
00586 double net_tuition_history[HISTORY_MONTH_COUNT];
00587
00588
00589 #if(GAME_VERSION>=200)
00590
00591
00592 double faculty_salary_increase_history[HISTORY_YEAR_COUNT];
00593
00594 double tuition_increase_history[HISTORY_YEAR_COUNT];
00595
00596 double short_term_debt_interest_history[HISTORY_MONTH_COUNT];
00597 double long_term_debt_interest_history[HISTORY_YEAR_COUNT];
00598
00599 RevenueItem initial_revenue_array[REVENUE_ITEM_COUNT];
00600
00601 double initial_total_revenue_total;
00602 ExpenseItem initial_expense_array[EXPENSE_ITEM_COUNT];
00603 ExpenseItem initial_total_operating_expense;
00604 ExpenseItem initial_total_expense;
00605
00606 YearReport initial_last_year;
00607
00608
00609 double initial_faculty_salary_increase;
00610 double initial_tuition_increase;
00611
00612 void save_initial_value();
00613
00614 double next_indirect_cost_rate_upper_bound;
00615 #endif
00616
00617
00618 #if(GAME_VERSION>=200)
00619 void update_appropiation();
00620 #endif
00621
00622 private:
00623 void update_history(char update_flag);
00624 void calc_percent_last_year();
00625 void update_hiring_policy();
00626
00627 void set_student_policy(bool init);
00628 void init_optimize_policy_1();
00629 void adjust_budget_1();
00630
00631 void init_optimize_policy_2();
00632 void adjust_budget_2();
00633
00634 void optimization_input_reset();
00635 void apply_relative_wealth_effect();
00636
00637 int disp_last_year_report(int reportOrder, int reportType, int reportYear, char* reportTitle);
00638 };
00639
00640 extern Finance finance;
00641
00642
00643 #endif