<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Tutorials</title><link>https://sourceforge.net/p/frevo/wiki/Tutorials/</link><description>Recent changes to Tutorials</description><atom:link href="https://sourceforge.net/p/frevo/wiki/Tutorials/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 16 Mar 2017 10:09:56 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/frevo/wiki/Tutorials/feed" rel="self" type="application/rss+xml"/><item><title>Tutorials modified by Melanie Schranz</title><link>https://sourceforge.net/p/frevo/wiki/Tutorials/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v13
+++ v14
@@ -17,6 +17,8 @@
 [[include ref=Tutorial_LoadAndStoreSession]]

 ## Evaluate results
+[[include ref=Tutorial_EvaluateResults]]
+
 ## Creating a new Problem

 [[include ref=Tutorial_NewProblem]]
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Melanie Schranz</dc:creator><pubDate>Thu, 16 Mar 2017 10:09:56 -0000</pubDate><guid>https://sourceforge.netb75ad299859fc844343df7f53a978b4128e819b0</guid></item><item><title>WikiPage Tutorials modified by Wilfried</title><link>https://sourceforge.net/p/frevo/wiki/Tutorials/</link><description>&lt;pre&gt;--- v12
+++ v13
@@ -1,4 +1,6 @@
 [TOC]
+
+[Short video on installing and running FREVO](http://www.youtube.com/watch?v=1wTyozYGG4I)
 
 # Installation Instructions
 
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Wilfried</dc:creator><pubDate>Thu, 27 Sep 2012 06:26:33 -0000</pubDate><guid>https://sourceforge.net59832c77e788ec5d63d9f01d6200750f23065a85</guid></item><item><title>WikiPage Tutorials modified by Thomas D</title><link>https://sourceforge.net/p/frevo/wiki/Tutorials/</link><description>&lt;pre&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomas D</dc:creator><pubDate>Wed, 08 Aug 2012 14:21:44 -0000</pubDate><guid>https://sourceforge.neta7534ef57f01149ff583456a89a49fef7544c509</guid></item><item><title>WikiPage Tutorials modified by Anita</title><link>https://sourceforge.net/p/frevo/wiki/Tutorials/</link><description>&lt;pre&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anita</dc:creator><pubDate>Wed, 08 Aug 2012 09:05:07 -0000</pubDate><guid>https://sourceforge.net531d97a61c20fbaf48558310e8790c8386580d4a</guid></item><item><title>WikiPage Tutorials modified by Anita</title><link>https://sourceforge.net/p/frevo/wiki/Tutorials/</link><description>&lt;pre&gt;--- v9
+++ v10
@@ -1,6 +1,9 @@
 [TOC]
 
 # Installation Instructions
+
+[[include ref=Tutorial_Installation]]
+
 # Getting around with FREVO
 
 ## Composing a new simulation session and run them
@@ -9,6 +12,8 @@
 
 
 ## Saving and loading a session
+[[include ref=Tutorial_LoadAndStoreSession]]
+
 ## Evaluate results
 ## Creating a new Problem
 
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anita</dc:creator><pubDate>Wed, 08 Aug 2012 08:45:26 -0000</pubDate><guid>https://sourceforge.netb41524e1a7dfafcef06d6a2f23cadf230666befe</guid></item><item><title>WikiPage Tutorials modified by Anita</title><link>https://sourceforge.net/p/frevo/wiki/Tutorials/</link><description>&lt;pre&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anita</dc:creator><pubDate>Wed, 08 Aug 2012 08:38:03 -0000</pubDate><guid>https://sourceforge.net845f879b7160a22e218d62d2c1beedff524499ac</guid></item><item><title>WikiPage Tutorials modified by Anita</title><link>https://sourceforge.net/p/frevo/wiki/Tutorials/</link><description>&lt;pre&gt;--- v7
+++ v8
@@ -5,7 +5,7 @@
 
 ## Composing a new simulation session and run them
 
-To set up a new session, start FREVO with the graphical user interface. The first thing that should be selected is the Problem Implementation. To do this, click the “problem” label, outlined in red. Select “Problem”. The “Select Problem Component” window will then pop up.
+[[include ref=Tutorial_NewSession]]
 
 
 ## Saving and loading a session
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anita</dc:creator><pubDate>Wed, 08 Aug 2012 08:33:44 -0000</pubDate><guid>https://sourceforge.netf236bd08ecd99bdfefbc43021c7fbe24b25db123</guid></item><item><title>WikiPage Tutorials modified by Anita</title><link>https://sourceforge.net/p/frevo/wiki/Tutorials/</link><description>&lt;pre&gt;--- v6
+++ v7
@@ -12,204 +12,4 @@
 ## Evaluate results
 ## Creating a new Problem
 
-
-In this tutorial we will implement a problem definition. In particular, it will be a simulation where agents try to find an emergency exit. As a prerequisite, you should have installed Java, eclipse, downloaded Frevo and imported it as an eclipse project.
-
-
-Let's start: 
-
-* Run FREVO and open the Component Creator
-
-[[img src=Frevo_open_ComponentCreator.png]]
-
-* A window opens. Here you have to select the type of the component you want to create (Problem, Method, Representation, Ranking). We will select Problem. Then you have to enter a name and a short description.
-
-[[img src=Frevo_ComponentCreator.png]]
-
-* Click on "Create" and follow the instructions that are shown. A new folder, containing your *.java file, and an *.xml file will be generated. (in this case "EmergencyExit.java" and "EmergencyExit.xml")
-* The generated *.java file looks like this: 
-
-
-#
-
-    :::java
-~~~~~
-public class EmergencyExit extends AbstractSingleProblem {
-
-  @Override
-  protected double evaluateCandidate(AbstractRepresentation candidate) {
-    return 0;
-  }
-
-  @Override
-  public void replayWithVisualization(AbstractRepresentation candidate) {
-  }
-  
-  @Override
-  public double getMaximumFitness() {
-    return Double.MAX_VALUE;
-  }
-}
-~~~~~
-#
-*  
-    * evaluateCandidate() is called to simulate without visualization, it should return a fitness value. 
-    * replayWithVisualization() is (as the name says) called to replay the simulation with a (possible graphical) visualization. 
-    * getMaximumFitness() should return the maximum Fitness that can be reached. If this Value is not known Double.Max_Value should be returned. This Value can be used by the optimization algorithm to stop optimization if this value has been reached
-* Implement your simulation. (it is useful to extract it in an own function. So you can call it from getResult() and replayWithVisualization). 
-For this tutorial I started with a very simple simulation:
-
-#
-    :::java
-~~~~~
-  int steps;
-  int xpositionofEmergencyExit = 0;
-  int ypositionofEmergencyExit = 0;
-  int width;
-  int height;
-  int xpositionofAgent;
-  int ypositionofAgent;
-  AbstractRepresentation c;
-  
-  void calcSim(){
-   
-    xpositionofEmergencyExit = Integer.parseInt(getProperties().get("xpositionofEmergencyExit").getValue());
-    ypositionofEmergencyExit = Integer.parseInt(getProperties().get("ypositionofEmergencyExit").getValue());
-    xpositionofAgent = Integer.parseInt(getProperties().get("xpositionofAgent").getValue());
-    ypositionofAgent = Integer.parseInt(getProperties().get("ypositionofAgent").getValue());
-    
-    for (int step = 0; step &lt; steps; step++) {
-      ArrayList&lt;Float&gt; input = new ArrayList&lt;Float&gt;();
-      input.add((float) (xpositionofEmergencyExit - xpositionofAgent));
-      input.add((float) (ypositionofEmergencyExit - ypositionofAgent));
-
-      ArrayList&lt;Float&gt; output = c.getOutput(input);
-
-      float xVelocity = output.get(0).floatValue()*2.0f-1.0f;
-      float yVelocity = output.get(1).floatValue()*2.0f-1.0f;
-
-      if (xVelocity &gt;= 1.0 &amp;&amp; xpositionofAgent &lt; width - 1) xpositionofAgent += 1;
-      else if (xVelocity &lt;= -1.0 &amp;&amp; xpositionofAgent &gt; 0 ) xpositionofAgent -= 1;
-      if (yVelocity &gt;= 1.0 &amp;&amp; ypositionofAgent &lt; height - 1) ypositionofAgent += 1;
-      else if (yVelocity &lt;= -1.0 &amp;&amp; ypositionofAgent &gt; 0) ypositionofAgent -= 1;
-    }
-  }
-~~~~~
-#
-
-The position of the emergency exit and the agent are read from the *.xml file which is accessed getProperties().get(name).getValue(). name represents the name of the value in the *.xml file. The value of "steps", "width" and "height" are written in the functions evaluateCandidate() and replayWithVisualization(). The main function of FREVO is to find the best function between input and the output automatically. So you just have to collect all the inputs and the representation (here it is c) will return the output. It is important that all the inputs and all the outputs are always in the same order. The output is always a float value between 0.0 and 1.0. You have to decide how to handle these outputs. In this simulation the output defines how the agent moves. 
-
-* Now the code of the simulation is finished but it needs to be called by evaluateCandidate().
-
-#
-    :::java
-~~~~~
-protected double evaluateCandidate(AbstractRepresentation candidate) {
-  steps = Integer.parseInt(getProperties().get("steps").getValue());
-  width = Integer.parseInt(getProperties().get("width").getValue());
-  height = Integer.parseInt(getProperties().get("height").getValue());
-  c = candidate;
-  
-  calcSim();
-  
-  return -FastMath.hypot(xpositionofEmergencyExit - xpositionofAgent, ypositionofEmergencyExit - ypositionofAgent);
-  }
-~~~~~
-#
-
-As we said before the values of “steps”, “width” and “height” have to be written in this function. They are read from the *.xml file. The return value of this function says how good this representation was. It says if this value is high, the connection of input and output is good. For the emergencyExit simulation this value is the negative distance between the agent and the emergency exit. So if the agent reaches the emergency exit within the amount of steps, the distance will be 0 and so it says it is a good way of connecting input and output. 
-
-So, we have to edit EmergencyExit.xml in order to add the component-specific properties:
-
-#
-    :::java
-
-~~~~~
-  &lt;properties&gt;
-  &lt;propentry key="xpositionofEmergencyExit" type="INT" value="99"/&gt;
-  &lt;propentry key="ypositionofEmergencyExit" type="INT" value="99"/&gt;
-  &lt;propentry key="width" type="INT" value="100"/&gt;
-  &lt;propentry key="height" type="INT" value="100"/&gt;
-  &lt;propentry key="xpositionofAgent" type="INT" value="50"/&gt;
-  &lt;propentry key="ypositionofAgent" type="INT" value="50"/&gt;
-  &lt;propentry key="steps" type="INT" value="50"/&gt;
-  &lt;/properties&gt;
-~~~~~
-#
-
-and to configure the number of inputs and outputs for the agent:
-
-#
-~~~~~
-    &lt;reqentry key="inputnumber" type="INT" value="2"/&gt;
-    &lt;reqentry key="outputnumber" type="INT" value="2"/&gt;
-~~~~~
-#
-
-* Finally, we have to implement a visualization for your simulation:
-
-#
-    :::java
-
-~~~~~
-  @Override
-  public void replayWithVisualization(AbstractRepresentation candidate) {
-    steps = 0;
-    c = candidate;
-    width = Integer.parseInt(getProperties().get("width").getValue());
-    height = Integer.parseInt(getProperties().get("height").getValue());
-    display = new Display(440, 495, "SimplifiedEmergencyExit");
-    display.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
-    whiteboard = new WhiteBoard(400, 400, width, height, 1);
-    whiteboard.addColorToScale(0, Color.WHITE);
-    whiteboard.addColorToScale(1, Color.BLACK);
-    whiteboard.addColorToScale(2, Color.GREEN);
-    JButton minusbutton = new JButton("-");
-    JButton plusbutton = new JButton("+");
-    display.add(whiteboard);
-    display.add(minusbutton);
-    display.add(plusbutton);
-    minusbutton.addActionListener(new ActionListener() {
-
-      @Override
-      public void actionPerformed(ActionEvent e) {
-        if (steps &gt; 0) steps--;
-        calcSim();
-        displayResult();
-        display.setTitle("Simplified Emergency Exit    Step: " + steps);
-      }
-    });
-    plusbutton.addActionListener(new ActionListener() {
-
-      @Override
-      public void actionPerformed(ActionEvent e) {
-        steps++;
-        calcSim();
-        displayResult();
-        display.setTitle("Simplified Emergency Exit    Step: " + steps);
-      }
-    });
-    display.setVisible(true);
-    calcSim();
-    displayResult();
-    display.setTitle("Simplified Emergency Exit    Step: " + steps);
-  }
-
-  private void displayResult() {
-    int[][] data = new int[width][height];
-    for (int x = 0; x &lt; width; x++) {
-      for (int y = 0; y &lt; height; y++) {
-        if /* */(x == xpositionofEmergencyExit &amp;&amp; y == ypositionofEmergencyExit) data[x][y] = 2;
-        else if (x == xpositionofAgent /*    */&amp;&amp; y == ypositionofAgent) /*    */data[x][y] = 1;
-        else /*                                                                */data[x][y] = 0;
-      }
-    }
-    whiteboard.setData(data);
-    whiteboard.repaint();
-  }
-~~~~~
-#
-
-Therefore the class WhiteBoard can be used. It is an extension of JPanel which represents a two- or three-dimensional grid of data in form of colors or pictures in a grid. It only has to be initialized and added to a JFrame or an extension of JFrame. Here the class Display is used. It is an extension of JFrame with a new constructor and a few settings that have already been done. The window of this visualization contains the WhiteBoard and two buttons, which are used to go through the simulation step by step. The simulation always does as much steps as the value of “steps” says. The simulation with visualization always works with the same representation and the same starting conditions. So it is possible to increase the value of “steps” and start a simulation from the beginning by clicking on plusbutton without having any differences in the agent’s behaviour. You will just see the next step of the simulation. For displaying the result the position of the agent and the emergency exit have to be converted into a two-dimensional array. Also the color-scale of the WhiteBoard has to be set. The conversion is done by displayResult(). The setting of the colorscale is done in replayWithVisualization by the function addColorToScale(int lowerLimit, Color c). All values within lowerLimit and the next lowerLimit or, if there is no next lowerLimit, the top, have the color c. As soon as this has been done you have to set the data which should be shown by the WhiteBoard. The data is set with the function setData(int[][] data). The call of repaint() will force the WhiteBoard to visualize the data which will look like this:
-
-[[img src=EmergencyExit.jpg]]
+[[include ref=Tutorial_NewProblem]]
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anita</dc:creator><pubDate>Wed, 08 Aug 2012 08:33:11 -0000</pubDate><guid>https://sourceforge.netf67da978cbd82f89369f7c0f186c47741847384f</guid></item><item><title>WikiPage Tutorials modified by Thomas D</title><link>https://sourceforge.net/p/frevo/wiki/Tutorials/</link><description>&lt;pre&gt;--- v5
+++ v6
@@ -1,4 +1,3 @@
-
 [TOC]
 
 # Installation Instructions
@@ -21,9 +20,12 @@
 
 * Run FREVO and open the Component Creator
 
-[[img src=Frevo_open_ComponentCreator]]
+[[img src=Frevo_open_ComponentCreator.png]]
 
 * A window opens. Here you have to select the type of the component you want to create (Problem, Method, Representation, Ranking). We will select Problem. Then you have to enter a name and a short description.
+
+[[img src=Frevo_ComponentCreator.png]]
+
 * Click on "Create" and follow the instructions that are shown. A new folder, containing your *.java file, and an *.xml file will be generated. (in this case "EmergencyExit.java" and "EmergencyExit.xml")
 * The generated *.java file looks like this: 
 
@@ -209,3 +211,5 @@
 #
 
 Therefore the class WhiteBoard can be used. It is an extension of JPanel which represents a two- or three-dimensional grid of data in form of colors or pictures in a grid. It only has to be initialized and added to a JFrame or an extension of JFrame. Here the class Display is used. It is an extension of JFrame with a new constructor and a few settings that have already been done. The window of this visualization contains the WhiteBoard and two buttons, which are used to go through the simulation step by step. The simulation always does as much steps as the value of “steps” says. The simulation with visualization always works with the same representation and the same starting conditions. So it is possible to increase the value of “steps” and start a simulation from the beginning by clicking on plusbutton without having any differences in the agent’s behaviour. You will just see the next step of the simulation. For displaying the result the position of the agent and the emergency exit have to be converted into a two-dimensional array. Also the color-scale of the WhiteBoard has to be set. The conversion is done by displayResult(). The setting of the colorscale is done in replayWithVisualization by the function addColorToScale(int lowerLimit, Color c). All values within lowerLimit and the next lowerLimit or, if there is no next lowerLimit, the top, have the color c. As soon as this has been done you have to set the data which should be shown by the WhiteBoard. The data is set with the function setData(int[][] data). The call of repaint() will force the WhiteBoard to visualize the data which will look like this:
+
+[[img src=EmergencyExit.jpg]]
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomas D</dc:creator><pubDate>Wed, 08 Aug 2012 08:12:23 -0000</pubDate><guid>https://sourceforge.netc4370ffb629408a7b05f1f47a6646907952c389a</guid></item><item><title>WikiPage Tutorials modified by Thomas D</title><link>https://sourceforge.net/p/frevo/wiki/Tutorials/</link><description>&lt;pre&gt;--- v4
+++ v5
@@ -1,4 +1,3 @@
-
 
 [TOC]
 
@@ -21,6 +20,9 @@
 Let's start: 
 
 * Run FREVO and open the Component Creator
+
+[[img src=Frevo_open_ComponentCreator]]
+
 * A window opens. Here you have to select the type of the component you want to create (Problem, Method, Representation, Ranking). We will select Problem. Then you have to enter a name and a short description.
 * Click on "Create" and follow the instructions that are shown. A new folder, containing your *.java file, and an *.xml file will be generated. (in this case "EmergencyExit.java" and "EmergencyExit.xml")
 * The generated *.java file looks like this: 
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomas D</dc:creator><pubDate>Wed, 08 Aug 2012 08:10:13 -0000</pubDate><guid>https://sourceforge.net2067e045535422db66a1f164fc04f636e66f2285</guid></item></channel></rss>