Virtual U.org
Get Personal Training on VU Today
    
Top shadow
 
 register/help
User Name:

Password:

Ofacilit.h Source File
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

Ofacilit.h

Go to the documentation of this file.
00001 //Filename    : OFACILIT.H
00002 //Description : Facility Office Class Declaration
00003 //              Refer to HE.Facilities.xls and techdoc 2.4
00004 //Owner           : Fred
00005 
00006 #ifndef __OFacilit_H
00007 #define __OFacilit_H
00008 
00009 #include <GAMEDEF.H>
00010 
00011 //----------- Define constants -------------//
00012 
00013 //----------- Define class Facility --------------//
00014 //
00018 class Facility {
00019 public:
00020     //##### begin ho 980813 #####//
00021 public:
00022     Facility();
00023     ~Facility();
00024     void init();
00025     void deinit();
00026     void report(int);
00027     int detect();
00028     int detect2();
00029 
00030     char current_mode;
00031     //##### end ho 980813 #####//
00032 
00033     int     write_file(File* filePtr);
00034     int     read_file(File* filePtr);
00035 
00036     //----- vars and methods related to simulation and statistics
00037 
00038 public:
00039     //----- constants or other factors -----//
00040     // Debt capacity parameters
00041     //### begin zhoubin 02/25/99
00042     float spinner_var1,spinner_var3,debt_spinner_var1,debt_spinner_var2;
00043 #if(GAME_VERSION>=200)
00044     float spinner_var4;
00045 #endif
00046     //### end zhoubin 02/25/99
00047     // = 0.5f;
00048     float maximum_debt_balance_as_a_percent_of_funds_balances;
00049     // = 0.08f;
00050     float max_interest_payments_as_a_percent_of_operating_expenditures;
00051 
00052     // = 0.1f;
00053     float percent_gap_required_before_new_construction_is_considered;
00054     float escalation_factor_for_deferrd_maintenance_per_year;
00055 
00056     //----- for intermediate calculation -----//
00057     int total_normal_onm;
00058     float total_actual_new_debt;
00059     // G63
00060     float construction_project_spending[HISTORY_YEAR_COUNT];
00061 
00062     //-----------------------------------//
00063 
00064 public:
00065     //----- player_input -----//
00066     int cur_debt_limit;
00067     float percent_project_funded_with_debt;       // 33.3 => 33.3%
00068 
00069     int min_capital_reserve_balance;              // new input
00070 
00071     //----- interface_output -----//
00072 
00073     int begin_backlog;                            // amount needed to keep up
00074     int cur_change_backlog;
00075     float facility_staff_morale;
00076 
00077     // this old var can be removed
00078     // G68
00079     float ratio_of_square_footage_to_benchmark[HISTORY_YEAR_COUNT];
00080 
00081     // for screen Space Usage
00082     float total_invest_close_gap;                 // $000               // updated monthly in calc_facility_staff_morale
00083     int normal_area[HISTORY_MONTH_COUNT],
00084         actual_area[HISTORY_MONTH_COUNT],
00085         projected_area[HISTORY_MONTH_COUNT];        // unit: square foot
00086 
00087     // for other screens
00088     int total_debt_capacity[HISTORY_YEAR_COUNT];  // E42 & E44
00089     // E44
00090     int outstanding_debt_balance[HISTORY_YEAR_COUNT];
00091     int debt_limit[HISTORY_YEAR_COUNT];           // is input also
00092 
00093     // O&M expense and backlog history with projected values
00094     int onm_n_backlog_history[HISTORY_YEAR_COUNT2];
00095 
00096     // three history in a graph
00097     int transfer_history[HISTORY_YEAR_COUNT];     // transfer to capital reserve
00098     int gifts_to_facility[HISTORY_YEAR_COUNT];
00099     float captial_reserve_expense[HISTORY_YEAR_COUNT];
00100 
00101     // ##### Begin MArco ##### //
00102 #if(GAME_VERSION>=200)
00103     float initial_total_invest_close_gap;
00104     //  float   initial_captial_reserve_expense[HISTORY_YEAR_COUNT];
00105     float initial_captial_reserve_expense;
00106     int initial_crime_index;                      // 0-100
00107     int initial_normal_area;
00108     int initial_actual_area;
00109     int initial_projected_area;                   // unit: square foot
00110 #endif
00111     // ##### End MArco ##### //
00112 
00113     //-----------------------------------//
00114 
00115 public:
00116     void  init_data_pre_finance();
00117     void  init_data();
00118     void  update_history_yearly();
00119     void  next_day();
00120     void  run_new_construction();
00121 
00122     // ##### Begin Marco ##### //
00123 #if(GAME_VERSION>=200)
00124     void  save_initial_data();
00125     void  begin_space_inventory();
00126 #endif
00127     // ##### End Marco ##### //
00128 
00129 private:
00130     void  update_history_sub();
00131     void  calc_facility_staff_morale();
00132 #if(GAME_VERSION>=200)
00133 #else
00134     void  begin_space_inventory();
00135 #endif
00136     void  update_vars_monthly();
00137 
00138     //------------------------------------------//
00139     // Parking and Crime model
00140     //------------------------------------------//
00141 public:
00142     int cur_parking_supply;
00143     int projected_parking_supply;
00144     int farout_capacity;
00145 
00146     int parking_demand[HISTORY_YEAR_COUNT];
00147     int parking_supply[HISTORY_YEAR_COUNT];
00148     char  crime_index[HISTORY_MONTH_COUNT];       // 0-100
00149 
00150     void  update_parking(bool init=false);
00151     void  update_crime(bool init=false);
00152 };
00153 
00154 extern Facility facility_office;
00155 
00156 //-------------------------------------------------//
00157 #endif

Generated on Fri Aug 23 01:37:32 2002 for VirtualU by doxygen1.2.17