Important features of the SharpHog Southern Pine Beetle
Infestation Model are discussed in more detail on dedicated pages,
but the biggest advance is in the implementation of the equations
used by the model as loose Xslt.
The SharpHog SPB Model Is Governed By Rates.
There are mortality rates and development rates, for example,
and the equations that define these values have been removed
conceptually and literally from the structure of the SharpHog
model.
The SharpHog model itself then becomes an ever-more exacting
description of the biological system, the cyclical flow of an
infestation through
attack, reproduction, development,
& re-emergence
in this case, while the equations defining the rates of these
flows can be swapped in and out of that structure.
There are many important consequences of this dissociation, most
of which are discussed more thoroughly in articles listed here.
But think of this:
Xslt equations can be hot-swapped (as input!) into the model,
any rate, any run. Xslt is a Turing-complete language. This
means that for every rate-equation used by the model, you can
achieve any computational goal. Usually a rate might be, say
a constant. Or the Xslt could define an equation that
correlated to the current temperature, scaling a constant.
Or the Xslt could define an equation for mortality rate that
depends on loblolly-species density, hardwood basal area (per
hectare) and temperature, and after two-weeks into the simulation
this equation is adjusted to reflect a thinning of the hardwood
trees by foresters at the infestation location.
This is known as a "Milestone" equation.
Or an equation could call up a game of Space Invaders and base
the mortality rate on your survival rate (although doing this in
Xslt isn't advised).
Equations resulting in a high degree of statistical accuracy
by the model have been developed by scientists, but this doesn't
mean more accurate equations, or more realistic equations, could
not be developed, not to mention the milestone-type adjustments
described above, which make the model's predictive capabilites all
that more useful.
-
The SharpHog Model uses Xslt, an international standard language
for manipulation of Xml, in a number of ways. One way is in
the definition of the equations that define the rates which govern
the growth of the infestation being modeled.
Here are the default equations. The SharpHog model allows
for these equations to be replaced simply by including a new
replacement template along with the rest of the input to the model.
Just as with all model input, this new equation is closely
linked in the SPBModel data-structure. That is, the output
from a a model-run using non-standard equations will always include
with it the replacement equations that were used see integrated
input.
When using new equations only the changed templates are included
in the
-
Data used as input to the SharpHog model, and the data created
by the running simulation, is defined by the SPBModel
schema. When output is created it is associated
relationally and structurally to the input responsible for it.
In this manner, the SPBModel data-structure becomes independant
of the SharpHog model as a tool for creating SPBModel
data, and other tools which will be used for consuming the
data. That is, once you have an SPBModel Xml file, you have
an incredible amount of information, including the input
responsible for that information. Furthermore, the actual Xsd
schema can beincluded inline or as a separate file. The Xsd
defines units and ranges, and value-types, and data-relationships
in an international standard that is recognized by every
application that could
-
The HogModel, a term here used to refer to all previous model implementations as well as SharpHog, uses mathematical constructs and algorithms meant to closely mimic specific aspects of the biological system. What this means is, the model is not just a lucky formula that guesses how many dead trees will result from so many initally infested. Rather, the model closely mirrors the system, following beetles from egg to egg-layer through six insect life-stages. Southern pine beetles use pheremones to coordinate their attacks, and these chemical thresholds are included in the model. By closely modeling the specific aspects of a biological system, a flexibility for refinement and and adaptation is imparted to the model that a more straightforward function or lookup-table would not provide. SharpHog increases
-
SharpHog Southern Pine Beetle Infestation Model is coded in C#
and Xslt using the .NET 3.5 Framework, but is platform-independant
in its implementation.
C# is an evolving language and .NET is an evolving framework.
SharpHog has implemented the HogModel using state-of-the-art
object-oriented design principles that result in an extrordinarily
transparent and readable source code. Frailties of previous
implementations, such as equations defined in multiple locations as
needed, have been eliminated.
LINQ stands for Language INtegrated-Query, and is a newer facet
of the .NET framework. SharpHog uses LINQ throughout to
traverse and manipulate the data right as it is being created and
consumed by the model. It results in not only more elegant
and smoothly executing code, but more readable and grokkable source
as well.
-
As has been described elsewhere, the SPBModel data-structure
closely associates both model input and model output in a single
Xml file.
All Modern Applications Use Xml
Any Independent Statistical Analysis, Spreadsheet, or
Sophisticated Web Browser Application
Should Have No Trouble Reading the SPBModel SharpHog Model Output
Xml Data File
As It Is
or
You Can Quickly
Convert It
to the Xml Specifications of the Consuming Application
What I mean is, I (Xander Lih) have provided the means for
creating the data. But I'm not a scientist specializing in
how this data should be consumed. Therefore, absent specific
requests by eventual users, I created the desktop application for
power-users, and the ultra-basic
web-form for individual runs of the model by casual-users.
-
The SPBModel data-structure lends itself well to querying and
transforming with Xslt. Here is the Xslt code that is used by
the Quick-Form
online model to create the output "Confidence Interval
Table".