OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C....

18
OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour- Kowalski, F. Boudon, C. Fournier, C. Godin

Transcript of OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C....

Page 1: OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.

OpenAlea

An OpenSource platform for plant modeling

C. Pradal, S. Dufour-Kowalski,F. Boudon, C. Fournier, C. Godin

Page 2: OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.

0 1 2

0 1 2

0 1 2 30 1

0 1

0 1

2 3

4 5

0

0.1

0.2

0.3

0 20 40

0

0.1

0.2

0.3

0 20 40

0

0.1

0.2

0.3

0 20 400

0.1

0.2

0.3

0 20 40

0

0.1

0.2

0.3

0 20 40

0

0.1

0.2

0.3

0 20 40

pii

MonolithicMonolithic SoftwareSoftware

InteroperableInteroperableSoftware Components Software Components for programmersfor programmers

InteroperableInteroperableSoftware Software Components Components for for modellersmodellers

Software Components Software Components for programmersfor programmers

time &

time &

complexity of b

iological pro

blems

complexity of b

iological pro

blems

http://www.scripps.edu/~sanner/

Page 3: OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.

1.1. Construct the best model Construct the best model (efficient & simple) for (efficient & simple) for each new situationeach new situation

2.2. A general unified modelA general unified model

3.3. Defining common phenomenon Defining common phenomenon and concepts, and sharing and concepts, and sharing ‘elemental’ functionalities:‘elemental’ functionalities:

• Common to different situationsCommon to different situations

• ExtensibleExtensible

Modelling strategy

questionmodelquestion

platform

Page 4: OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.

Biological Biological objectsobjects

MesureMesure

ModelingModeling

SimulationSimulation

0 1 2 3 4 5 6

0

0.1

0.2

0.3

0.4

0 5

0

0.1

0.2

0 5 10

0

0.1

0.2

0 5 10 15 20

0

0.1

0.2

0.3

0 5 10 15 20

0

0.1

0.2

0.3

0 5 10 15

0

0.1

0.2

0 10 20 30

X

X

XX

X

X

U1

U1U1

I12I13 U2

U2 U2

F1

U2U2I2I1

I8I9

I6

I10I11F1

F1

F1 F1F1

F1U1

U2

I10I15

XXXX

U2

I7I8

I9I10XF1

F1 F1

U2I1

S1S1

F1

U1

U1

U2

F1

U2U2

U1

U2F1

F1

F1

F1

U2+

+

++

+

<

+

<

<

<

++

+

<U2

U1

U2

F1

S1S1F1F1

+ F1

U2

<

+

+++

++

+

A91

A92

A91

A92A92

A92

A92

A92

A91

A92

A92

A92

A92

A92

A92

A92<

+

< ++

+<+

+++

++ +

+

F1

leaves

roots

f

r

dC

dt

C C

Rk C

dW

dtC

r f r

r r

rr r

RS|T|

dC

dt

C C

Rk C

dW

dtC

f r ff f

ff f

RS||T||

Plant modeling

Page 5: OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.

ContextMulti-disciplinary domain

– It involves a variety of disciplines and expertise.

Low reusability– Combining or Reusing existing software is

complex• Different OS, different programming languages• No common standards or data-structures

Building models is expensive– Development

– Validation

– Distribution, Documentation, Training

Page 6: OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.

OpenAlea Goals

Promoting share within a community– Reuse software & tools – Share development between various teams– Share databases & training effort

With a common software platform– Integration of existing models & tools– Rapid development of new applications– Enhance accessibility (GUI)– Quality rules

Page 7: OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.

Design PrinciplesLanguage centric

– Common modeling language– Glue language

Component architecture– Dynamic composition– High-level dataflow approach

Visual programming– Graphical model representation– Automatic GUI generation

Shared deployment tools– Build, packaging, distribution,

installation, upgrade Multi-platform (Linux,

Windows)

Page 8: OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.

OpenAlea ArchitectureD

ep

loym

en

t Tools

Component framework

ComponentPackage Manager Dataflow

Python Library

Existing ModelsC, C++, Fortran

math

GUI

shell

GUI

DatabaseXMLNumeric SciPy

f2py

Fortran Code

Boost, SWIG

C++ Classes, C Code

JEmbed

JavaClasses

Python

GUI

Vis

uale

a

PyQt4

Page 9: OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.

Python as a Software Bus

(http://root.cern.ch)

mathmath

Very rich set of Python standard modules

GUI

shell

GUI

Several GUI toolkits

DatabaseXML

Very rich set of specialized generic modules

Numeric SciPy

Scientific modules

f2py

Fortran Code

Boost, SWIG

C++ Classes, C Code

JEmbed

JavaClasses

Gate

ways

to o

ther

fram

ew

ork

s

Page 10: OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.

Component framework

Package Manager

Component

Python Interpreter

Dataflow

Widgets

Page 11: OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.

ComponentSimple Python function

– Multiple Input and Output arguments (ports)

– Typed interface

– Documentation

def linearmodel(x=0, a=0., b=0):“ return ax+b ”return a*x+b

Port• name : ‘a’•Interface : IFloat

Page 12: OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.

Dataflow Graphical model

Visual representation of a model

Connect components in a directed graph

Data flow through edges

Model of computation

Functional (deterministic)

Lazy evaluation

Page 13: OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.

Macro component

Page 14: OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.

Functions and loops

Page 15: OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.

Deployment Tools

OpenAlea.Installer– Search, download and

install dependencies from the web

– List available packages found on a central repository (OpenAlea website)

SConsX– Simplify the build of

complex packages (C, C++, Fortran)

Page 16: OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.

Working togetherCollaborative development

– Gforge (subversion, forums, mailing lists)

– Wiki (User & developer documentation)

Software diffusion– Shared software repository

(14000 downloads)– Web site (100000 visits)

Coding & Modeling sprint– Pair programming– Development, bug fix, Use

cases, …

Page 17: OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.

Already Integrated Packages

Plant architecture analysis - VPlants(Godin, Guedon et al)

Ecophysiological modelsBuissiere et al., 07

Fournier et al., 07

Sinoquet et al.

Meristem modeling(Stoma, Chopard et al.)

Page 18: OpenAlea An OpenSource platform for plant modeling C. Pradal, S. Dufour-Kowalski, F. Boudon, C. Fournier, C. Godin.

Conclusions

OpenAlea is an Open Source project– http://openalea.gforge.inria.fr

Promotes reusability– Interconnection of heterogeneous software

– Access to sub-models of applications

– Generic tools for software deployment

Improves accessibility– Visual programming

– Automatic widget creation