Rev 1221 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
900 | werner | 1 | // Javascript API documentation framework http://yui.github.io/yuidoc/ |
2 | // create with "yuidoc ." in /apidoc directory (/build/apidocs must be available!) or with "yuidoc --server ." for interactive mode. |
||
3 | // see also the yuidoc.json for more options. |
||
4 | // http://127.0.0.1:3000/ |
||
5 | |||
1059 | werner | 6 | // Installation of YUIDOC: http://yui.github.io/yuidoc/ |
7 | // you need node.js -> download and install |
||
8 | |||
1093 | werner | 9 | // including a nice search box: |
10 | // https://github.com/jiannicello/yuidocsite |
||
11 | // run in 'apidocs' folder (the generated YUI docs are pushed to the 'docs' folder): |
||
12 | // yuidocsite --port 3000 --search_desc |
||
13 | |||
1184 | werner | 14 | // bootstrap theme: https://www.npmjs.com/package/yuidoc-bootstrap-theme |
15 | // npm install yuidoc-bootstrap-theme |
||
16 | // |
||
17 | |||
900 | werner | 18 | /** |
19 | * The agent based forest management engine. |
||
20 | |||
1188 | werner | 21 | Overview |
22 | ======== |
||
23 | The ABE forest management system is: |
||
24 | + is a hybrid C++/Javascript system |
||
25 | + follows a declarative paradigma - forest management strategies are described using Javascript-Objects (like JSON), but include also |
||
26 | imperative section and event handlers that allow a fine grained control |
||
900 | werner | 27 | |
1188 | werner | 28 | The concept is described in more details on the iLand wiki page: http://iland.boku.ac.at/ABE |
900 | werner | 29 | |
1188 | werner | 30 | building blocks |
31 | --------------- |
||
32 | |||
33 | The main classes of ABE are: |
||
34 | |||
35 | + **{{#crossLink "Agent"}}{{/crossLink}}** are conceptually forest managers that are responsible for a part or for the full simulated landscape. |
||
36 | + **{{#crossLink "STP"}}{{/crossLink}}** a STP object encapsulates a stand treatment program, that includes one or many forest management activities. |
||
37 | + **{{#crossLink "Activity"}}{{/crossLink}}** is a single management activity such as a thinning or a planting. |
||
38 | |||
39 | |||
40 | In addition, the API defines various helper objects: |
||
41 | |||
42 | + **{{#crossLink "FMEngine"}}{{/crossLink}}** is the main class of ABE. It provides methods to define agents, stand treatment programs, etc and methods to "manually" execute forest mangement |
||
43 | + **{{#crossLink "Stand"}}{{/crossLink}}** encapsulates a "stand" in the model. A landscape can have multiple stands (e.g., by providing a GIS layer). |
||
44 | + **{{#crossLink "TreeList"}}{{/crossLink}}** a collection of individual trees that are e.g. fetched from a specific stand |
||
45 | |||
900 | werner | 46 | * |
47 | * @module ABE |
||
48 | */ |
||
49 | |||
50 | |||
51 | |||
52 | |||
53 | /** |
||
54 | * Schedule object. |
||
55 | * |
||
56 | * @class Schedule |
||
57 | */ |
||
58 | |||
1063 | werner | 59 | var schedule= { |
900 | werner | 60 | /** |
1063 | werner | 61 | The 'dump' method prints the contents of the scheduler (i.e., the list of stands with the estimated harvests and execution dates to the console. |
62 | @method dump |
||
63 | */ |
||
64 | dump: function(){}, |
||
65 | /** |
||
66 | If 'verbose' is set to true, much more log messages are generated from the scheduling algorithms. |
||
67 | @property verbose |
||
68 | @type {bool} |
||
69 | @default false |
||
70 | */ |
||
71 | verbose: false, |
||
72 | /** |
||
73 | The 'harvestIntensity' is a multiplier for the "sustainable" harvest level; values > 1 cause the harvesting being |
||
74 | above the level of sustainable yield (as it is estimated by the scheduler). |
||
75 | @property harvestIntensity |
||
76 | @type {bool} |
||
77 | @default false |
||
78 | */ |
||
900 | werner | 79 | |
1063 | werner | 80 | harvestIntensity: 0, |
900 | werner | 81 | /** |
1063 | werner | 82 | 'useSustainableHarvest' is a scaling factor (0..1) that allows gradually switching between bottom-up harvest planning (i.e., stands are always processed at their optimal dates), |
83 | and a top-down approach (i.e, the scheduling algorithm decides when a stand should be processed). A value of 1 means |
||
84 | that the scheduler (assigned to the agent) is used exclusively, and 0 means a strict bottom up approach. Between 0 and 1 the harvest is scaled in between. |
||
85 | |||
86 | still used???? |
||
87 | |||
88 | @property useSustainableHarvest |
||
89 | @type {bool} |
||
90 | @default false |
||
91 | */ |
||
92 | useSustainableHarvest: false, |
||
93 | /** |
||
94 | The 'maxHarvestLevel' property is a multiplier to define the maximum overshoot over the planned volume that the scheduler is willing to take (e.g. 1.2 -> 20% max. overshoot). |
||
95 | @property maxHarvestLevel |
||
96 | @type {double} |
||
97 | @default 1 |
||
98 | */ |
||
99 | maxHarvestLevel: 1.1, |
||
100 | } |
||
101 | |||
102 | |||
103 | /** |
||
900 | werner | 104 | * Constraints object. |
105 | * |
||
106 | * @class Constraint |
||
107 | */ |
||
108 | |||
109 | /** |
||
110 | * Definition of an Agent. |
||
111 | * The main part of the agent defintion is a list of assignments of stand treatment programmes (STP) to mixture types. |
||
112 | * In addition, logic can be added for selecting mixture types from forest attributes. |
||
113 | * |
||
114 | * |
||
115 | |||
116 | var x = { stp: { "fasy": ["beech_default_1", "beech_default_2", "beech_default3"], |
||
117 | "piab": "spruce_default" } |
||
118 | onSelect: function(){ return "fasy"; } |
||
119 | } |
||
120 | * |
||
121 | @class Agent |
||
122 | */ |
||
1061 | werner | 123 | |
900 | werner | 124 | /** Description of stp |
125 | @property stp |
||
126 | @type object |
||
127 | */ |
||
128 | /** |
||
129 | onSelect allows to provide custom code to select the mixture type for a given stand. |
||
130 | @example |
||
1190 | werner | 131 | onSelect: function() { if (stand.share('piab') > 50) |
900 | werner | 132 | return 'piab'; |
133 | return 'default'; } |
||
134 | @event onSelect |
||
135 | @type String |
||
136 | */ |
||
137 | |||
138 | |||
139 |