Main page
   
   
   
TEMPORAL MORPHOGENESIS - Technical notes

 

by Valentino Piana, Alperen Bektas and Khoa Nguyen (2020)

     
 

Contents


 
 

 
 
1. Installing and running the core code for temporal morphogenesis
 
 
1.1. Polishing the outcome of the code
 
 
1.2. Utilizing and releasing the morphospace
 
 
 
 
 
 

In these notes, we provide you the instructions needed to run the code presented in this paper on "Temporal morphogenesis", based on the contribution by Daniel R. Page (2012).

1. Installing and running the core code for temporal morphogenesis

Obtaining a morphospace is relatively easy. It requires to run a code and a minor manipulation of the outcome for readability by machines.

The five plain-text files containing the Java code for generating morphospaces are here. They are zipped compressed; to extract them you need to unzip them with any program for compressing and decompressing files. You can read them with any txt reader, such as Notepad. All five files are Java classes, written in Java language. You don't need to know the language as such to modify the inputs and get results.

The classes have been laid down by Daniel R. Page and documented in Page, Daniel R., Generalized Algorithm for Restricted Weak Composition Generation, Generation Algorithm for Second-Order Restricted Weak Compositions, Journal of Mathematical Modelling and Algorithms, Springer, 2012. Available from version: http://www.springerlink.com/content/w31081rw26p610t1/?MUD=MP).

The main routine is Use, which provides the numerical inputs (n number of units, s number of classes, the restrictions for the legitimate values that each class can have) for the compositionSecondOrder routine.

We shall explain more later on but first you need to be able to actually run the code, not just looking at it. For this, you probably need a Java editor, such as the free Eclipse (any version) as well as the Java Runtime. If you do not have them yet, you need to run two setups and verify that Eclipse connects to the Java Runtime. This can be done in whatever Operative System you are using.

Once installed properly them, you open Eclipse, click on File menu - New line - Java Project line. You should give the name "morpho" to this project. This will add the JRE System Library to the project and create a container of files called src. You should add the five files to src.

To set up the computation, you need to open and edit Use.java. You specify n (number of units, the fixed sum of the columns across all shapes) at line 14, you specify s (number of classes - columns of the row vector) at line 16. The legitimate value that each class can take are indicated by enlisting them all in curled brackets in lines 18 and following (depending on how long this lists are you shall be using fewer or more lines).

To run the code, select Use, right-click on it, choose Run as Java application.

1.1. Polishing the outcome of the code

At the end of the computations, it will both write a file (whose name you can modify by editing line 145 of compositionSecondOrder.java) and one line in the Console window, from where you can copy it and paste in a txt editor for large files.

Since the outcome is typically very large, you need an editor that is capable of coping with such conditions: for instance, you can use the free Notepad++. Irrespective whether you put the outcome of the computation in it by pasting the line from the Console or by opening the created file, you will need two simple string substitution to generate a csv readable by e.g. MS Excel or IBM SPSS or Stata.

The text generated by Use.java is like this: (3,3,0,0)\n(3,2,0,1)\n(3,2,1,0). It separates the shapes, suche as (3,3,0,0), with "\n" which is a line feed in certain systems but possibly yours will not recognize as such. If this is the case, you need (in Notepad++) to substitute ")\n(" with ";" in normal Replace and then ";" with "\n" in extended search option of Replace. You want to get a file like this:

(3,3,0,0)

(3,2,0,1)

(3,2,1,0)

By saving it and opening with Excel or your preferred software, you trasform text in columns so to obtain

3 3 0 0

3 2 0 1

3 2 1 0

Here each number is in a cell of Excel or of the other software.

1.2. Utilizing and releasing the morphospace

You can now use the morphospace and release it to the public, as we did in Temporal morphogenesis. For nontrivial but relevant morphospaces, we would appreciate if you were to drop us a line in an email, so that we can add the morphospace to this collection.

 

 

 

3
 
 
 
Main page
 
 
Essays
 
     
 
Copyright