1,579c1,165
< // FssimApp.h : Definition of the central class of the Fssim Application
< 
< #ifndef _FSSIMAPP_H // make sure file is included only once
< #define _FSSIMAPP_H
< 
< //#define _TSB_SERIALIZER_DEBUG // use debugging output
< #define _TSB_VERBOSE // use verbose release output
< //#define _TSB_TIME_DEBUG
< //#define _TSB_GEFACTOR_DEBUG // debug old-growth constraints
< //#define _TSB_MEMORY_DEBUG
< //#define _TSB_CLONE_DEBUG
< //#define _TSB_HARVEST_DEBUG
< //#define _TSB_HARVEST_VOLUME_DEBUG
< //#define _TSB_OLD_GROWTH_DEBUG
< //#define _TSB_HARVEST_AXS_DEBUG
< //#define _TSB_CANDIDATE_DEBUG
< //#define _TSB_RAND_DEBUG
< //#define _TSB_ELIGIBLE_GROUP_DEBUG
< //#define _TSB_DO_AXS_DEBUG
< //#define _TSB_AXS_DEBUG
< //#define _TSB_HARVEST_CONSTRAINTS_DEBUG
< //#define _TSB_POPULATE_DEBUG
< //#define _TSB_FLOAT_GROUP_DEBUG
< //#define _TSB_SERIALIZER_DEBUG
< #define _TSB_SIMULATE_PLAN_HORIZON_BUG
< #define _TSB_SIMULATE_GE_FACTOR_BUG
< 
< #include <cstdio> // FILE
< #include <string>
< #include <ctime> // clock
< 
< #include "List.h" // FILE_PTR
< //#include "Data.h" // MAX_LABEL_LENGTH enum
< 
< using namespace std;
< 
< namespace tsb
< {
< #ifdef _TSB_SERIALIZER_DEBUG
<     void debug_tests();
< #endif
< }
< 
< using namespace tsb;
< 
< struct REPORT_FLAGS;
< struct INV_REPORT;
< struct BLOCK;
< struct ROADREC;
< struct HASHREC;
< struct AGEDIST;
< struct ACHIEVED;
< struct TARGET;
< struct AXSDEF;
< struct TABLE;
< struct GROUPDEF;
< struct GROUP;
< struct ZONE;
< struct AU;
< struct TIMBER_CLASS;
< struct REGEN;
< struct TRANSFER;
< 
< enum { FALSE = 0, TRUE = 1 };
< 
< class FssimApp
< {
< public:
<     enum { BEFORE = 1, AFTER = 2 };
< 
<     enum { INFINITY                 = 32767,
<            MAX_LABEL_LENGTH         = 20,
<            MAX_PATH_LENGTH          = 255,
<            DUMMYINPUT               = -23592,
<            ERRORVAL                 = -32767 };
< 
<     enum { AGEAREA_OFFSET           = 20,
<            NUM_AGEAREA_ELEMENTS     = 451,
<            MAX_NUM_TABLE_VERTICES   = 351,
<            MAX_PLAN_HORIZON         = 400,
<            MAX_AGE                  = 400,
<            MIN_PRIORITY             = 1,
<            MAX_PRIORITY             = 100,
<            DEFAULT_PRIORITY         = 50,
<            UPPER_TARGET             = 1,
<            LOWER_TARGET             = 2 };
< 
<     // Harvest priority rules
<     enum { ABSOLUTE_OLDEST_FIRST	= 1,
<            RELATIVE_OLDEST_FIRST	= 2,
<            ABSOLUTE_YOUNGEST_FIRST	= 3,
<            RANDOM_PRIORITY		    = 4 };
<     // group types
<     enum { FLOAT_GROUP  = 1,
<            STATIC_GROUP	= 2 };
<     // landunit types
<     enum LandUnitType { ZONE_TYPE  = 1,
<                         GROUP_TYPE = 2,
<                         AU_TYPE	   = 3,
<                         CLASS_TYPE = 4 };
<     /* Target types */
<     enum { VOLUME_TARGET = 1,
<            AREA_TARGET	 = 2 };
<     /* Timber class types */
<     enum { OPERABLE		    = 1,
<            INOPERABLE		= 2,
<            DEFERRED			= 3,
<            NONCONTRIBUTING	= 4,
<            INACTIVE		    = 5 };
<     /* Access constraint types; LT=less-than GT=greater-than */
<     enum { AXS_LT = 1,
<            AXS_GT = 2 };
< 
< public:
<     // static data initialized at top of FssimApp.cpp
<     static const char* m_kNullString;     // = "n/a";
<     static const string m_kOutputDirectory; // = "reports"
<     static const double m_kRoundError;    // = 0.001;
<     static const double m_kMaxFloat;      // = 1000000000000.0;
< 
<     static FssimApp* m_pApplication;    // = 0; //set in constructor
< public:
<     LIST_PTR* m_zoneList;
<     LIST_PTR* m_tableList;
<     LIST_PTR* m_candidateList;
<     LIST_PTR* m_groupList;
<     LIST_PTR* m_blockList;
< 
<     ZONE* m_zone0;
<     int	m_planHorizon;
<     int	m_harvestRule;
<     int	m_periodLength[MAX_PLAN_HORIZON + 1];
< 
<     bool m_enableRandomization;
<     bool m_enableClassSplit;
<     bool m_enableReports;
<     bool m_enableReportHeaders;
<     bool m_enableTrace;
<     bool m_enableBlockReport;
<     bool m_transfersSpecified;
< 
<     // 06.June.2001, Kevin Belanger added to v4.0.2 for old-growth calculation
<     bool m_applyFactor;
< 
<     double m_minSplitThreshold;
<     int	m_ageOffset;
<     string m_outputDirectory;
<     double m_GSPercentTarget; // TO-DO: move to private (inlined getter/setter written)
<     int	m_lastPeriodTarget; // TO-DO: move to private (inlined getter/setter written)
<     int	m_lastZoneID;
<     int	m_lastGroupID;
<     int	m_lastTableID;
< 
<     FILE* m_pFileTrace;
<     FILE* m_pFileLevels;
<     FILE* m_pFileConst;
<     FILE* m_pFileVolumeInventory;
<     FILE* m_pFileAreaInventory;
<     FILE* m_pFileAreaInventorysum;
<     FILE* m_pFileVolumeInventorysum;
<     FILE* m_pFileInventorySum;
<     FILE* m_pFileAgeDistribution;
<     FILE* m_pFileTransfer;
<     FILE* m_pFileBlockReport;
< 
<     string m_dataPath;
<     const string m_binaryFileName;
<     bool m_updateBinary;
< 
<     clock_t m_start;
<     clock_t m_finish;
<     //double m_duration;
< public:
<     FssimApp(const string& dataPath, const string& binaryFileName,
<              bool updateBinary = false); // constructor
< 
<     ~FssimApp(); // destructor cleans up memory, etc.
<     void cleanup_memory();
<     void remove_null_classes();
<     void deleteTableList();
<     void deleteGroupList();
<     void deleteZoneList();
<     void deleteBlockList();
< 
<     void readData();
<     double getDuration() { return (static_cast<double>((m_finish - m_start) / 1000000.0)); }
< 
<     // inlined for speed - do not add code or call subroutines!!!
<     int getLastPeriodTarget() { return m_lastPeriodTarget; };
<     void setLastPeriodTarget(int lpt) { m_lastPeriodTarget = lpt; };
< 
<     double getGSPercentTarget() { return m_GSPercentTarget; };
<     void setGSPercentTarget(double gspt) { m_GSPercentTarget = gspt; };
< 
<     static void nullOrCopyLabel(char* target, const char* source);
<     // return reference to current application object
<     static FssimApp* getApp() { return FssimApp::m_pApplication; }
< 
<     static void display_version();
<     static void display_usage(const string& programName);
< };
< 
< struct REPORT_FLAGS
< {
<     // constructor
<     REPORT_FLAGS(int is = 0, int ie = 0, int ihrs = 0, int ihre = 0,
<                  int imrs = 0, int imre = 0, int ihss = 0, int ihse = 0,
<                  int imss = 0, int imse = 0, int ars = 0, int are = 0,
<                  int lrs = 0, int lre = 0, int hrs = 0, int hre = 0)
<         : inv_start(is), inv_end(ie), inv_ha_rep_start(ihrs),
<           inv_ha_rep_end(ihre), inv_m3_rep_start(imrs), inv_m3_rep_end(imre),
<           inv_ha_sum_start(ihss), inv_ha_sum_end(ihse), inv_m3_sum_start(imss),
<           inv_m3_sum_end(imse), axs_rep_start(ars), axs_rep_end(are),
<           levels_rep_start(lrs), levels_rep_end(lre), hage_rep_start(hrs)
<     {
<         // do nothing but above initialization
<     }
< 
<     int	inv_start;
<     int	inv_end;
<     int	inv_ha_rep_start;
<     int	inv_ha_rep_end;
<     int	inv_m3_rep_start;
<     int	inv_m3_rep_end;
<     int	inv_ha_sum_start;
<     int	inv_ha_sum_end;
<     int	inv_m3_sum_start;
<     int	inv_m3_sum_end;
<     int	axs_rep_start;
<     int	axs_rep_end;
<     int	levels_rep_start;
<     int	levels_rep_end;
<     int	hage_rep_start;
<     int	hage_rep_end;
< };
< 
< struct INV_REPORT
< {
<     // constructor
<     INV_REPORT()
<     {
<         for (int i = 0; i < FssimApp::NUM_AGEAREA_ELEMENTS ; ++i)
<         {
<          	TotalHa[i] = 0.0;
<          	TotalM3[i] = 0.0;
<          	MerchHa[i] = 0.0;
<          	MerchM3[i] = 0.0;
<          	OperableHa[i] = 0.0;
<          	OperableM3[i] = 0.0;
<          	InoperableHa[i] = 0.0;
<          	InoperableM3[i] = 0.0;
<          	DeferredHa[i] = 0.0;
<          	DeferredM3[i] = 0.0;
<          	NoncontribHa[i] = 0.0;
<          	NoncontribM3[i] = 0.0;
<         }
<     }
< 
<     float 	TotalHa[FssimApp::NUM_AGEAREA_ELEMENTS];
<     float 	TotalM3[FssimApp::NUM_AGEAREA_ELEMENTS];
<     float 	MerchHa[FssimApp::NUM_AGEAREA_ELEMENTS];
<     float 	MerchM3[FssimApp::NUM_AGEAREA_ELEMENTS];
<     float 	OperableHa[FssimApp::NUM_AGEAREA_ELEMENTS];
<     float 	OperableM3[FssimApp::NUM_AGEAREA_ELEMENTS];
<     float 	InoperableHa[FssimApp::NUM_AGEAREA_ELEMENTS];
<     float 	InoperableM3[FssimApp::NUM_AGEAREA_ELEMENTS];
<     float 	DeferredHa[FssimApp::NUM_AGEAREA_ELEMENTS];
<     float 	DeferredM3[FssimApp::NUM_AGEAREA_ELEMENTS];
<     float 	NoncontribHa[FssimApp::NUM_AGEAREA_ELEMENTS];
<     float 	NoncontribM3[FssimApp::NUM_AGEAREA_ELEMENTS];
< };
< 
< struct BLOCK
< {
<     // constructor
<     BLOCK(const char* l = 0, int ad = 0, LIST_PTR* pNeighbours = 0)
<         : AdjacencyDelay(ad), Neighbours(pNeighbours)
<     {
<         FssimApp::nullOrCopyLabel(label, l);
<     }
< 
<     char	  label[FssimApp::MAX_LABEL_LENGTH];
<     int		  AdjacencyDelay;
<     LIST_PTR* Neighbours;
< };
< 
< struct ROADREC
< {
<     // constructor
<     ROADREC(const char* auLabel = 0, int a = 0, double pc = 0,
<             int toAge = 0, int offset = 0, int reEntry = 0)
<         : age(a), percent(pc), ToAge(toAge), Offset(offset), reentry(reEntry)
<     {
<         FssimApp::nullOrCopyLabel(au, auLabel);
<     }
< 
<     int	age;
<     double percent;
<     int	ToAge;
<     int	Offset;
<     int	reentry;
<     char	au[FssimApp::MAX_LABEL_LENGTH];
< };
< 
< struct HASHREC
< {
<     // constructor
<     HASHREC(int i = 0, LIST_PTR* cand = 0)
<         : id(i), candidates(cand)
<     {
<         // do nothing but above initialization
<     }
< 
<     int		id;
<     LIST_PTR	*candidates;
< };
< 
< struct AGEDIST
< {
<     // constructor
<     AGEDIST(int a = 0, int w = 0, double ar = 0.0, double v = 0.0)
<         : age(a), width(w), area(ar), volume(v)
<     {
<         // do nothing but above initialization
<     }
< 
<     int		age;
<     int		width;
<     double		area;
<     double		volume;
< };
< 
< struct ACHIEVED
< {
<     // constructor
<     ACHIEVED(double v = 0.0, double ar = 0.0, LIST_PTR* ad = 0)
<         : volume(v), area(ar), AgeDist(ad)
<     {
<         // do nothing but above initialization
<     }
< 
<     double		volume;
<     double		area;
<     LIST_PTR*   AgeDist;
< };
< 
< struct TARGET
< {
<     // constructor
<     TARGET(double* pMaxv = 0, double* pMinv = 0,
<            double* pMaxa = 0, double* pMina = 0)
<         : max_volume(pMaxv), min_volume(pMinv), max_area(pMaxa), min_area(pMina)
<     {
<         // do nothing but above initialization
<     }
< 
<     double	*max_volume;
<     double	*min_volume;
<     double	*max_area;
<     double	*min_area;
< };
< 
< struct AXSDEF
< {
<     // constructor
<     AXSDEF(int sp = 0, int ep = 0, double pc = 0.0, int s = 0,
<            int a = 0, int naae = 0, double* pAa = 0,
<            double ba = 0.0, double aa = 0.0)
<         : start_period(sp), end_period(ep), Percent(pc), Sign(s),
<           Age(a), NumAgeAreaElements(naae), AgeArea(pAa),
<           BaseArea(ba), AreaAch(aa)
<     {
<         // do nothing but above initialization
<     }
< 
<     int		start_period;
<     int		end_period;
<     double		Percent;
<     int		Sign;
<     int		Age;
<     int		NumAgeAreaElements;
<     double		*AgeArea;
<     double		BaseArea;
<     double		AreaAch;
< };
< 
< struct TABLE
< {
<     int		id;
<     char label[FssimApp::MAX_LABEL_LENGTH];
<     int		mha;
<     int		AdjacencyAge;
<     double		voaf1;
<     double		voaf2;
<     int		RefAge;
<     double		Volume[FssimApp::MAX_NUM_TABLE_VERTICES];
< 
<     // constructor
<     TABLE(int i = 0, const char* l = 0, int m = 0,
<             int aa = 0, double v1 = 0.0, double v2 = 0.0,
<             int ra = 0)
<         : id(i), mha(m), AdjacencyAge(aa), voaf1(v1), voaf2(v2), RefAge(ra)
<     {
<         FssimApp::nullOrCopyLabel(label, l);
< 
<         for (int i = 0; i < FssimApp::MAX_NUM_TABLE_VERTICES ; ++i)
<         {
<          	Volume[i] = 0.0;
<         }
<     }
< };
< 
< struct GROUPDEF
< {
<     // constructor
<     GROUPDEF(const char* z = 0, const char* a = 0, const char* b = 0,
<             int la = 0, int ha = 0, int ct = 0 )
<         : low_age(la), high_age(ha), class_type(ct)
<     {
<         FssimApp::nullOrCopyLabel(zone, z);
<         FssimApp::nullOrCopyLabel(au, a);
<         FssimApp::nullOrCopyLabel(block, b);
<     }
< 
<     char		zone[FssimApp::MAX_LABEL_LENGTH];
<     char		au[FssimApp::MAX_LABEL_LENGTH];
<     char		block[FssimApp::MAX_LABEL_LENGTH];
<     int		low_age;
<     int     high_age;
<     int    class_type;
< };
< 
< struct GROUP
< {
<     // constructor
<     GROUP(int i = 0, const char* l = 0,
<           int gt = 0, double a = 0, int* pP = 0,
<           LIST_PTR* pA = 0, LIST_PTR* pG = 0, LIST_PTR* pTL = 0,
<           TARGET* pT = 0, ACHIEVED* pAch = 0, INV_REPORT* pIR = 0,
<           REPORT_FLAGS* pRF = 0 )
<         : id(i), grouptype(gt), area(a), priority(pP), axslist(pA),
<           groupdefs(pG), transferlist(pTL), target(pT), achieved(pAch),
<           inventoryReport(pIR), reportFlags(pRF)
<     {
<         FssimApp::nullOrCopyLabel(label, l);
<     }
< 
<     int		id;
<     char		label[FssimApp::MAX_LABEL_LENGTH];
<     int		grouptype;
<     double		area;
<     int		*priority;
<     LIST_PTR	*axslist;
<     LIST_PTR	*groupdefs;
<     LIST_PTR	*transferlist;
<     TARGET		*target;
<     ACHIEVED	*achieved;
<     INV_REPORT	*inventoryReport;
<     REPORT_FLAGS	*reportFlags;
< };
< 
< struct ZONE
< {
<     // constructor
<     ZONE(int i = 0, const char* l = 0, double a = 0, int* pP = 0,
<           LIST_PTR* pAU = 0, LIST_PTR* pAXS = 0, TARGET* pT = 0,
<           ACHIEVED* pAch = 0, REPORT_FLAGS* pRF = 0 )
<         : id(i), area(a), priority(pP), aulist(pAU), axslist(pAXS), target(pT),
<           achieved(pAch), reportFlags(pRF)
<     {
<         FssimApp::nullOrCopyLabel(label, l);
<     }
< 
<     int		id;
<     char		label[FssimApp::MAX_LABEL_LENGTH];
<     double		area;
<     int		*priority;
<     int		LastAUID;
<     LIST_PTR 	*aulist;
<     LIST_PTR	*axslist;
<     TARGET		*target;
<     ACHIEVED	*achieved;
<     REPORT_FLAGS	*reportFlags;
< };
< 
< struct AU
< {
<     // constructor
<     AU(int i = 0, const char* l = 0,
<           TABLE* pT = 0, double loaf = 0, int* pP = 0,
<           LIST_PTR* pCL = 0, LIST_PTR* pRegen = 0,
<           ZONE* pZ = 0, LIST_PTR* pEGL = 0, ROADREC* pRR = 0 )
<         : id(i), table(pT), landoaf(loaf), priority(pP), classlist(pCL),
<           regenlist(pRegen), parent_zone(pZ), EligibleGroupList(pEGL), RoadRec(pRR)
<     {
<         FssimApp::nullOrCopyLabel(label, l);
<     }
<     int		id;
<     char		label[FssimApp::MAX_LABEL_LENGTH];
<     TABLE		*table;
<     double		landoaf;
<     int		*priority;
<     LIST_PTR	*classlist;
<     LIST_PTR	*regenlist;
<     ZONE		*parent_zone;
<     LIST_PTR	*EligibleGroupList;
<     ROADREC		*RoadRec;
< };
< 
< struct TIMBER_CLASS
< {
<     // constructor
<     TIMBER_CLASS(int ag = 0, int w = 0, int ct = 0, int ra = 0,
<            double ar = 0.0, double ma = 0.0, ZONE* pZ = 0,
<            AU* pAU = 0, BLOCK* pB = 0, LIST_PTR* pFGL = 0,
<            LIST_PTR* pSGL = 0,
<            int r = 0, int t = 0, int rv = 0, int rel = 0 )
<         : age(ag), width(w), class_type(ct), reversion_age(ra),
<           area(ar), MerchArea(ma), parent_zone(pZ), parent_au(pAU),
<           parent_block(pB), float_group_list(pFGL),
<           static_group_list(pSGL),
<           roaded(r), transferred(t), RandValue(rv), ReEntryLag(rel)
<     {
<         // do nothing but above initialization
<     }
< 
<     int		age;
<     int		width;
<     int		class_type;
<     int		reversion_age;
<     double		area;
<     double		MerchArea;
<     ZONE		*parent_zone;
<     AU		*parent_au;
<     BLOCK		*parent_block;
<     LIST_PTR	*float_group_list;
<     LIST_PTR	*static_group_list;
<     int		roaded;
<     int		transferred;
<     int		RandValue;
<     int		ReEntryLag;
< };
< 
< struct REGEN
< {
<     // constructor
<     REGEN(AU* pAU = 0, int ta = 0, int o = 0, double pc = 0.0, int rel = 0)
<         : au(pAU), ToAge(ta), Offset(o), percent(pc), ReEntryLag(rel)
<     {
<         // do nothing but above initialization
<     }
< 
<     AU		*au;
<     int		ToAge;
<     int		Offset;
<     double percent;
<     int		ReEntryLag;
< };
< 
< struct TRANSFER
< {
<     // constructor
<     TRANSFER(int sp = 0, int ep = 0, const char* z = 0, const char* a = 0,
<              int ta = 0, int tct = 0, int tra = 0 )
<         : start_period(sp), end_period(ep), to_age(ta), to_ctype(tct), to_rage(tra)
<     {
<         FssimApp::nullOrCopyLabel(to_zone, z);
<         FssimApp::nullOrCopyLabel(to_au, a);
<     }
< 
<     int	start_period;
<     int	end_period;
<     char	to_zone[FssimApp::MAX_LABEL_LENGTH];
<     char	to_au[FssimApp::MAX_LABEL_LENGTH];
<     int	to_age;
<     int	to_ctype;
<     int	to_rage;
< };
< #endif // ifndef _FSSIMAPP_H
---
> // FssimApp.h : Definition of the central class of the Fssim Application
> 
> #ifndef _FSSIMAPP_H // make sure file is included only once
> #define _FSSIMAPP_H
> 
> // stdlib includes
> #include <string>
> #include <list> //
> #include <map> // map, multimap (for CLASS & BlockStruct lists & label lookups)
> #include <valarray>
> #include <vector> // vector (for ZoneStruct, AUStruct, GroupStruct lists)
> #include <queue> // priority_queue
> 
> #include <cstdio> // FILE
> #include <ctime> // clock
> 
> #include "SymbolDefinitions.h"
> #include "FssimUtil.h"
> 
> #include "IOException.h"
> 
> using namespace std;
> 
> 
> namespace tsb
> {
> #ifdef _TSB_DEBUG
>     void debug_tests();
> #endif
> }
> 
> using namespace tsb;
> 
> class BlockStruct;
> class AxsDefStruct;
> class TableStruct;
> class GroupDefStruct;
> class GroupStruct;
> class ZoneStruct;
> class AUStruct;
> class Data; // forward declare class defined in Data.h which includes this file (FssimApp.h)
> class Candidate; // forward declare class defined in Candidate.h which includes this file (FssimApp.h)
> 
> enum { FALSE = 0, TRUE = 1 };
> 
> class FssimApp
> {
> public:
>     enum HarvestFlag { BEFORE = 1, AFTER = 2 };
> 
>     enum { AGEAREA_OFFSET           = 20,
>            MAX_PLAN_HORIZON         = 400,
>            MAX_AGE                  = 400,
>            MIN_PRIORITY             = 1,
>            MAX_PRIORITY             = 100,
>            DEFAULT_PRIORITY         = 50,
>            UPPER_TARGET             = 1,
>            LOWER_TARGET             = 2 };
> 
>     // Harvest priority rules
>     enum { ABSOLUTE_OLDEST_FIRST	= 1,
>            RELATIVE_OLDEST_FIRST	= 2,
>            ABSOLUTE_YOUNGEST_FIRST	= 3,
>            RANDOM_PRIORITY		    = 4 };
> 
> public:
>     static FssimApp* m_pApplication;    // = 0; //set in constructor
> public:
> 
>     vector<ZoneStruct*> m_zoneList;
>     map<int, TableStruct*> m_tableList;
>     vector<GroupStruct*> m_groupList;
>     multimap<int, BlockStruct*> m_blockList;
> 
>     priority_queue<Candidate> m_candidateList;
> 
>     ZoneStruct* m_zone0;
>     int	m_planHorizon;
>     int	m_harvestRule;
> 
>     valarray<int> m_periodLength;
>     valarray<double> m_periodLengthDouble;
> 
> 
>     bool m_enableRandomization;
>     bool m_enableClassSplit;
>     bool m_enableReports;
>     bool m_enableReportHeaders;
>     bool m_enableTrace;
>     bool m_enableBlockReport;
>     bool m_transfersSpecified;
> 
>     bool m_applyFactor;
> 
>     double m_minSplitThreshold;
>     int	m_ageOffset;
>     string m_outputDirectory;
>     double m_GSPercentTarget; // TO-DO: move to private (inlined getter/setter written)
>     int	m_lastPeriodTarget; // TO-DO: move to private (inlined getter/setter written)
> 
>     int	m_zoneCount;
>     int	m_auCount;
>     int	m_groupCount;
>     int	m_tableCount;
>     int m_blockCount;
> 
>     FILE* m_pFileTrace;
>     FILE* m_pFileLevels;
>     FILE* m_pFileConst;
>     FILE* m_pFileVolumeInventory;
>     FILE* m_pFileAreaInventory;
>     FILE* m_pFileAreaInventorysum;
>     FILE* m_pFileVolumeInventorySum;
>     FILE* m_pFileInventorySum;
>     FILE* m_pFileAgeDistribution;
>     FILE* m_pFileTransfer;
>     FILE* m_pFileBlockReport;
> 
>     string m_dataPath;
>     const string m_binaryFileName;
>     bool m_updateBinary;
> 
>     Data* m_pDataFileObject;
> 
>     int m_currentPeriod;
>     HarvestFlag m_doneHarvest;
> 
>     clock_t m_start;
>     clock_t m_finish;
> public:
>     FssimApp(const string& dataPath, const string& binaryFileName,
>              bool updateBinary = false); // constructor
> 
>     ~FssimApp(); // destructor cleans up memory, etc.
>     void cleanup_memory();
>     void remove_null_classes();
>     void deleteTableList();
>     void deleteGroupList();
>     void deleteZoneList();
>     void deleteBlockList();
> 
>     void readData() throw (IOException);
>     double getDuration() { return (static_cast<double>((m_finish - m_start) / 1000000)); }
> 
>     // inlined for speed - do not add code or call subroutines!!!
>     int getLastPeriodTarget() { return m_lastPeriodTarget; };
>     void setLastPeriodTarget(int lpt) { m_lastPeriodTarget = lpt; };
> 
>     double getGSPercentTarget() { return m_GSPercentTarget; };
>     void setGSPercentTarget(double gspt) { m_GSPercentTarget = gspt; };
> 
>     // return reference to current application object
>     static FssimApp* getApp() { return FssimApp::m_pApplication; }
> 
>     Data* getDataFileObject() { return m_pDataFileObject; }
> 
>     int getCurrentLineNumber();
> 
>     string getCurrentInputFileName();
> 
>     static void display_version();
>     static void display_usage(const string& programName) ;
> };
> 
> #endif // ifndef _FSSIMAPP_H
