Modelling of Ecosystems by Tools from Computer Science Summer School at Czech University of Life Sciences, Prague, 16-20 September, 2013 Winfried Kurth.

Slides:



Advertisements
Similar presentations
Pointers.
Advertisements

Lecture 04 – Classes.  Python has a number of classes built-in  lists, dictionaries, sets, int, float, boolean, strings  We can define our own classes.
Visualizing Memory Graphs by Thomas Zimmermann and Andreas Zeller Presented by Giannakaras Giorgos University of Konstanz Department of Computer and Information.
The Functions and Purposes of Translators Code Generation (Intermediate Code, Optimisation, Final Code), Linkers & Loaders.
Lists + CS3240, L. Grewe 1. 2 Goals Use the C++ template mechanism fr defining generic data types Implement a circular linked list Implement a linked.
ITEC200 – Week 12 Graphs. 2 Chapter Objectives To become familiar with graph terminology and the different types of graphs To study.
Modules and Objects Introduction to Computing Science and Programming I.
Syntax & terminology review While the following slides are not exactly what we did on the board (object diagrams are not shown here) they cover most of.
Chapter 10 Arrays. Topics Declaring and instantiating arrays Array element access Arrays of objects Arrays as method parameters Arrays as return values.
Copyright © 2008 Pearson Addison-Wesley. All rights reserved. Chapter 13 Pointers and Linked Lists.
(Page 554 – 564) Ping Perez CS 147 Summer 2001 Alternative Parallel Architectures  Dataflow  Systolic arrays  Neural networks.
CS 106 Introduction to Computer Science I 03 / 08 / 2010 Instructor: Michael Eckmann.
Network analysis and applications Sushmita Roy BMI/CS 576 Dec 2 nd, 2014.
Templates. Objectives At the conclusion of this lesson, students should be able to Explain how function templates are used Correctly create a function.
Hello, world! Dissect HelloWorld.java Compile it Run it.
Minimum Spanning Tree By Jonathan Davis.
Functional-Structural Plant Modelling with GroIMP and XL Tutorial and Workshop at Agrocampus Ouest, Angers, 5-7 May, 2015 Winfried Kurth University of.
Summer School „Modelling and Simulation with GroIMP“ / Tutorial for beginners University of Göttingen (Germany), September, 2010 Winfried Kurth Modelling.
XL as an extension of the L-system formalism Tutorial "Modelling Plants with GroIMP", Cottbus, March 11-12, 2008 Winfried Kurth Ole Kniemeyer Reinhard.
CSIS 123A Lecture 12 Templates. Introduction  C++ templates  Allow very ‘general’ definitions for functions and classes  Type names are ‘parameters’
Functional-Structural Plant Modelling with GroIMP and XL Tutorial and Workshop at Agrocampus Ouest, Angers, 5-7 May, 2015 Winfried Kurth University of.
Chapter 6: User-Defined Functions I Instructor: Mohammad Mojaddam
Summer School „Modelling and Simulation with GroIMP“ / Tutorial for beginners University of Göttingen (Germany), September, 2010 Winfried Kurth Some.
Higher Grade Computing Studies 2. Languages and Environments Higher Computing Software Development S. McCrossan 1 Classification of Languages 1. Procedural.
MIPS coding. SPIM Some links can be found such as:
Modelling of Ecosystems by Tools from Computer Science Summer School at Czech University of Life Sciences, Prague, September, 2013 Winfried Kurth.
Tutorial and workshop „Modelling with GroIMP and XL“ / Tutorial for beginners University of Göttingen, 27 February, 2012 Winfried Kurth Basic examples.
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Graphs.
Arrays Module 6. Objectives Nature and purpose of an array Using arrays in Java programs Methods with array parameter Methods that return an array Array.
Summer School „Modelling and Simulation with GroIMP“ / Tutorial for beginners University of Göttingen (Germany), September, 2010 Winfried Kurth Some.
Summer School „Modelling and Simulation with GroIMP“ / Tutorial for beginners University of Göttingen (Germany), September, 2010 Winfried Kurth Some.
Modelling of Ecosystems by Tools from Computer Science Summer School at Czech University of Life Sciences, Prague, September, 2013 Winfried Kurth.
Copyright © Curt Hill Generic Classes Template Classes or Container Classes.
Summer School „Modelling and Simulation with GroIMP“ / Tutorial for beginners University of Göttingen (Germany), September, 2010 Winfried Kurth Some.
Functional-Structural Plant Modelling with GroIMP and XL Tutorial and Workshop at Agrocampus Ouest, Angers, 5-7 May, 2015 Winfried Kurth University of.
Functions Top-down design Breaking a complex problem into smaller parts that we can understand is a common practice. The process of subdividing a problem.
Modelling of Ecosystems by Tools from Computer Science Summer School at Czech University of Life Sciences, Prague, September, 2013 Winfried Kurth.
1 Department Ecoinformatics, Biometrics and Forest Growth Computer Graphics and Ecological Informatics Study course: Applied Computer Science M.Sc. Winfried.
Department of Computer Science Data Structures Using C++ 2E Chapter 5 Linked Lists.
Understanding Data Types and Collections Lesson 2.
Modelling above- and below-ground competition together Winfried Kurth University of Göttingen Chair for Computer Graphics and Ecological Informatics wk.
Cramming for CS 247. FAQ Q: Will you post these slides online? A: Yes.
Graph-oriented modelling of multiscaled dynamical systems with a dynamical structure: Challenges to the "Relational Growth Grammar" approach Winfried Kurth.
C LANGUAGE Characteristics of C · Small size
General Computer Science for Engineers CISC 106 Lecture 12 James Atlas Computer and Information Sciences 08/03/2009.
Modelling of Ecosystems by Tools from Computer Science Summer School at Czech University of Life Sciences, Prague, September, 2013 Winfried Kurth.
Tutorial „Modelling in the language XL“ University of Göttingen (Germany), September 21/22, 2009 Winfried Kurth Some basic examples in XL (part 2) related.
Templates Where the TYPE is generic. Templates for functions Used when the you want to perform the same operation on different data types. The definition.
Functional-Structural Plant Modelling with GroIMP and XL Tutorial and Workshop at Agrocampus Ouest, Angers, 5-7 May, 2015 Winfried Kurth University of.
Project 1 : Phase 1 22C:021 CS II Data Structures.
Graphs Definition: a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
CMSC 202 Computer Science II for Majors. CMSC 202UMBC Topics Templates Linked Lists.
Matrix Multiplication in CUDA Kyeo-Reh Park Kyeo-Reh Park Nuclear & Quantum EngineeringNuclear & Quantum Engineering.
Module Code MA1032N: Logic Lecture for Week Autumn.
1 Data Organization Example 1: Heap storage management Maintain a sequence of free chunks of memory Find an appropriate chunk when allocation is requested.
Topological Sort. Sorting technique over DAGs (Directed Acyclic Graphs) It creates a linear sequence (ordering) for the nodes such that: –If u has an.
Understanding Data Types and Collections Lesson 2.
Computer graphics and ecological informatics
Computer Graphics and Ecological Informatics
Graph Traversals Some algorithms require that every vertex of a graph be visited exactly once. The order in which the vertices are visited may be important,
Module 2 Lesson 2 Reflections Reflections.
Classes.
Data Structures and Algorithms I
Topological Sort.
Topological Sort.
Interpretive rules and instantiation rules
By Yogesh Neopaney Assistant Professor Department of Computer Science
Functions and Recursion
OBJ first-order functional language based on equational logic
Presentation transcript:

Modelling of Ecosystems by Tools from Computer Science Summer School at Czech University of Life Sciences, Prague, September, 2013 Winfried Kurth University of Göttingen, Department Ecoinformatics, Biometrics and Forest Growth Interpretive rules and instantiation rules

Interpretive rules insertion of a further phase of rule application directly preceding graphical interpretation (without effect on the next generation) application of interpretive rules interpretation by turtle

Example: { interpretive rule

Each occurrence of the interpreted vertex (here: Flower) is individually represented in the graph. A special (internal) edge type and special vertices are used to link the interpretation results with the rest of the graph:

public void run() { [ Axiom ==> A; A ==> Scale(0.3333) for (int i:(-1:1)) for (int j:(-1:1)) if ((i+1)*(j+1) != 1) ( [ Translate(i, j, 0) A ] ); ] applyInterpretation(); } public void interpret() [ A ==> Box; ] further example: generates the so-called „Menger sponge“ (a fractal)

public void run() { [ Axiom ==> A; A ==> Scale(0.3333) for (int i:(-1:1)) for (int j:(-1:1)) if ((i+1)*(j+1) != 1) ( [ Translate(i, j, 0) A ] ); ] applyInterpretation(); } public void interpret() [ A ==> Box; ] (a) (b)(c) A ==> Sphere(0.5); A ==> Box(0.1, 0.5, 0.1) Translate(0.1, 0.25, 0) Sphere(0.2); Development:

what is generated by this example? public void run() { [ Axiom ==> [ A(0, 0.5) D(0.7) F(60) ] A(0, 6) F(100); A(t, speed) ==> A(t+1, speed); ] applyInterpretation(); } public void interpret() [ A(t, speed) ==> RU(speed*t); ]

a very similar type of rules in XL: instantiation rules purpose: replacement of single modules by more complicated structures, only for visual representation (similar as for interpretive rules) but: less data are stored (less usage of memory) only one vertex in the graph for the instantiated structure in contrast to interpretive rules, no turtle commands with effect on other nodes can be used further, arising possibility: “replicator nodes“ for copying and relocation of whole structures

instantiation rules: syntax no new sort of rule arrow specification of the instantiation rule directly in the declaration of the module which is to be replaced module A ==> B C D; replaces (instantializes) everywhere A by B C D

the flower example again: { instantiation rule

the resulting graph:

const int multiply = EDGE_0; /* user-defined edge type */ module Johnny ==> F(20, 1) [ M(-8) RU(45) F(6, 0.8) Sphere(1) ] [ M(-5) RU(-45) F(4, 0.6) Sphere(1) ] Sphere(2); Johnny is instantiated with the red structure another example: Usage of instantiation rules for multiplyer objects sm09_e43.rgg

const int multiply = EDGE_0; /* user-defined edge type */ module Johnny ==> F(20, 1) [ M(-8) RU(45) F(6, 0.8) Sphere(1) ] [ M(-5) RU(-45) F(4, 0.6) Sphere(1) ] Sphere(2); module Replicator ==> [ getFirst(multiply) ] Translate(10, 0, 0) [ getFirst(multiply) ]; inserts all what comes after the „multiply“ edge Johnny is instantiated with the red structure another example: Usage of instantiation rules for multiplyer objects sm09_e43.rgg

const int multiply = EDGE_0; /* user-defined edge type */ module Johnny ==> F(20, 1) [ M(-8) RU(45) F(6, 0.8) Sphere(1) ] [ M(-5) RU(-45) F(4, 0.6) Sphere(1) ] Sphere(2); module Replicator ==> [ getFirst(multiply) ] Translate(10, 0, 0) [ getFirst(multiply) ]; public void run() [ Axiom ==> F(2, 6) P(10) Replicator -multiply-> Johnny; ] inserts all what comes after the „multiply“ edge Johnny is instantiated with the red structure another example: Usage of instantiation rules for multiplyer objects sm09_e43.rgg

result:

Example: Inflorescence architecture XL code

Example: Inflorescence architecture generated graph and 3-d result

Example: Inflorescence architecture Frangipani example (by M. Henke)

Suggestions for team session 1. Generate a plant with parameterized leaves (parameters: length, width, ratio petiole/blade length,...) - with interpretive rules, - with instantiation rules. 2. Create a model for a circular arrangement of mushrooms (“witches ring“). Use an instantiation rule for the multiplication and arrangement.