FSSIM v3.0 Data Structures and Flow of Control ============================================== // main data structures LIST_PTR* tablelist; LIST_PTR* zonelist; LIST_PTR* grouplist; LIST_PTR* blocklist; LIST_PTR* candidatelist; // design notes Note: Zone, Group, Block and Table labels are 20 characters wide internally. This allows the user 19 usable character fields, plus a NULL-terminator. VPH recovered is CurrentVPH - RegenVPH Look-aheads are performed to the period end when assessing group membership, merchantability. For group membership, any area that meets the group membership age criteria at _any_ point during the period is considered a member of that group throughout the period. Classes have an upper age and a width. Class area is spiked at a single age at time0. Regenerated area is distributed over an age range period-length years wide. See fss_notes.txt for further discussion of aggregation and area distribution within FSSIM v2.2 and v3.0. // list processing; sample LIST_PTR* list; UNIT* unit; list = (LIST_PTR *)list_reset( list ); unit = (UNIT *)list_next( list ); while ( unit != NULL ) { unit = (UNIT *)list_next( list ); } // flow of control void main() { init_data(); init_group_eligibility_lists(); // each AU maintains list of groups that member area may belong to init_adjacency(); for ( period=1; period<=plan_horizon; period++ ) { revert(); if ( year == 1 ) aggregate(); populate_groups(); // needs to be done before transfer() since transfer() is by group transfer(); populate_areas(); // update age/area distributions if ( EnableReports ) { // pre-harvest reporting report_constraints(); report_inventory(); } candidate_create_candidate_list(); reset_achieved(); harvest(); remove_null_classes(); // deletes inactive or zero area classes aggregate(); if ( EnableReports ) { // post-harvest reporting populate_groups(); // need to repopulate groups to reflect harvest changes report_inventory(); report_harvest_agedist(); report_constraints(); } report_harvest_levels(); } cleanup_memory(); } // harvest candidates void harvest() { foreach( candidate ) { // use minimum value of the following as harvest level harvest = MIN( harvest_adjacency(), harvest_volume_shortfall(), harvest_area_shortfall(), harvest_constraints() ); [check class splitting] if ( harvest > 0.0 ) { harvest_update_activity(); road_class(); regen_class(); } } [clear candidatelist] }