SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti...

27
SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management / University of Helsinki

Transcript of SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti...

Page 1: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

SIMO SIMulation and Optimization

”New generation forest planning system”

15.11.2005

Antti Mäkinen & Jussi Rasinmäki

Dept. of Forest Resource Management /

University of Helsinki

Page 2: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

Need for new planning system?

Forestry databases maintained in Finland mostly collected either

with

National Forest Inventory

compartment-wise inventory

Current forest management planning packages are designed to

suit these two data sets

Stand volume, timber assortments and growth are predicted

using single tree models

In the future the data sources are much more variable, including

data from several grain levels

→ Need for new planning tools

Page 3: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

Aims of SIMO

”FLEXIBLE with respect to data it demands and models that it

uses”

”ADAPTABLE to the planning problem”

“EXTENDABLE for possible future needs”

“provide decision support for different grain levels”

Page 4: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

Aims of SIMO continued

To produce a set of lightweight program modules, which the

users can interface into their planning systems

Modules should be adaptable to different planning tasks and

needs

Simulation parameters can be (easily) controlled by the user

Simulations can be locally calibrated

Uncertainty in the data can be taken into account

Page 5: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

Aims of SIMO continued

New models can be implemented by the user

Possibility to utilize different data sources

Planning system is not a ”black box” – user should know what

happens inside the program

Inconsistent or erroneus data can be handled, but the user will

be informed precisely

Page 6: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

SIMO software development

The core elements of the planning system will be produced in

this project (no user interfaces)

All the products will be open-source code (MIT license)

The users will handle the integration into their own systems

At the moment the simulator module is well underway and other

modules under construction

Page 7: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

SIMO Simulator

Simulator module consists of:

simulator core (the simulator program)

XML files (data, simulation control, simulation logic etc.)

Model library (all the models, functions etc. used in the

simulations)

”Business logic” and ”Application logic” separated

Other modules will be produced and integrated into the system

Page 8: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

Simulator core

Intakes simulation control instructions, model chains,

model definitions and data in XML format

Processes the user defined model chains for each

computing unit in the data

Calls the Model Library whenever some value needs to

be calculated

Prints the resulting values into a result XML file

The programmatic component, contains the application

logic

Page 9: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

XML Files (eXtended Markup Language)

”Syntax definition which can be used to express hierarchical

data”

Platform independent, self-describing

In SIMO, XML is used for the ”business logic”:

Passing data in and out of simulator (Data XML)

Passing simulation instructions (Simulation XML)

Encoding the simulation logic (Model Chain XML)

Passing information of the models and variables to the

simulator (Model XML and Variable XML)

Page 10: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

data

comp_unit comp_unit

valuevariable

attr

valuevariable

attr stratum

valuevariable

attr …

valuevariable

attr

… stratum

tree … tree

valuevariable

attr … attr

Page 11: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

model_chain

evaluate_at task task

expression

condition

model

variable value

expression

condition task

variable value

… task

expression

condition model

variable value

Page 12: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

Model Library

Includes all models used in the simulator

Users can add new models to the library or create

additional model libraries

Reports warnings and errors to the simulator

Risk level models not yet implemented

Page 13: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

Missing modules

Optimizer module

• Finds the best alternative from the alternatives

generated by the simulator

• Possibly many alternative optimizing methods?

Validator module

• Validates the XML files with XSD (Schema) files and by

external rules

• Makes sure that the XML files are well-formed and

contain all necessary elements

Page 14: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

Strengths of SIMO XML Simulator

Virtually any kind of model can be used in the

simulations and added to the model library

User can define the model chains freely for different

kinds of simulations

User can define correction/rectification factors for the

models, (eg. different factors for geographical areas)

Extensive warning and error reporting system (risk

control coming later...)

Data levels are not confined to strict predifined standard

Page 15: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

What can be calculated at the moment?

Estimating forest variable development at both stand level & tree

level is possible at the moment (300+ models implemented), but

Forestry operations not yet implemented in the simulator

→ ”real world” simulations not yet possible

Bucking models still not ready

Optimizing module still missing

Page 16: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.
Page 17: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

How the simulation process works in SIMO?

XML Files

SIMULATOR

MODEL LIBRARY

Reporter Module

IN: data, simulation control, modelchains, model definitionsOUT: results

IN: modelname, input variablesOUT: model result, warnings & errors

IN: XML dataOUT: transformed XML, graphs

id:100040543 year:2005 stratum:0

6 8 10 12 14 16 18 20

d

0

20

40

60

80

100

120

N

SIMULATION PROCESS

Page 18: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

What is missing?

XML Files

SIMULATOR

MODEL LIBRARY

Reporter Module

Optimizer Module

MODEL LIBRARYMODEL LIBRARY

MODEL LIBRARY

Validator Module

Page 19: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

Reporting Module

Used for visualizing data & transforming the

results from XML format to other formats

Intakes data and processing instructions in XML

format

At the moment can plot different kinds of graphs of

given variables

XML transformations to be implemented later...

Page 20: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

Model risk management

Two levels

1. Individual parameter values out of bounds

2. All individual parameter values acceptable, but is the

specific combination of them acceptable?

Case 1: already in the simulator Case 2: Suggestion

1. get the k nearest neighbours from the VMI data,

2. evaluate the model for the data point and the k

nearest neighbours.

3. If the difference for the model estimate between the

data point and the neighbours is too big, generate an

event of ”unacceptable” model estimate

Page 21: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

Isn’t that procedure too heavy computationally? Probably, not yet evaluated But what about if we store the risk evaluation results

and use those primarily:

1. Is it safe to call ModelA with parameters (5, 6, 10)

when we accept risk level X?

2. Has the risk been evaluated with parameter values

(5,6,10) and risk level X before. If yes, get the

answer from a table of risk evaluations

3. If not, get k nearest neighbours for data point

(5,6,10), evaluate the model with (5,6,10) and k

neighbours

4. Store the risk evaluation result and the mean model

result for k neighbours for the data point (5,6,10)

and risk level X

Page 22: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

10 20 30 40 50

50

10

01

50

20

0

PPA_KUORETON

IKA

_B

10 20 30 40 50

50

10

01

50

20

0

PPA_KUORETON

IKA

_B

Page 23: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

Open questions:When evaluating model result shall we compare it to:

values derived directly from the nearest VMI

permanent sample plots

OR

model estimates for the nearest VMI sample plots?

Page 24: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

Software license for SIMO

Types of Open Source licensesMIT & Co: “Do whatever you want”

LGPL: “Everything you do to the original code must be open source, anything on top of that can be closed”

GPL & Co: “Everything you do is open source, …well almost”

GPL under the hood: "derivative work" or "mere

aggregation“? Derivative work must be open source, but

aggregation can be closed source

Page 25: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

The case of MySQLDouble licensing: open source GPL, commercial

development with a commercial license that allows closed

source

Page 26: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

General software architecture

Individual components that communicate over the

networkValidatorSimulator – this is well underwayOptimiserReporter – simulation results to figures and other data

formats than XML, or different XML format etc.

Implications to licensing? What about if one of the

components uses a sub component that is published

under GPL?

Page 27: SIMO SIMulation and Optimization ”New generation forest planning system” 15.11.2005 Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.

Architecture continued

TCP/IP based communicationSecurity issues?

secured traffic (SSL, SSH)inside firewall

Scalable