Lawn Mower Roboter
- 1 Introduction
- 2 Problem definition
- 3 Method
- 4 Model
- 5 Results
- 6 Conclusion
- 7 Code
Nowadays there is technology and smart devices everywhere around us. Almost no one could imagine living without his Smartphone, Smart-TV or other devices. So it became even normal, that 'roboter' vacuum our flat or cut the grass in our garden without any need of active human participation. This article and simulation will be about these Lawn Mower Roboters and how they can move efficiently through our gardens.
But even if all these smart tools and devices can be so helpful and save us much time, there is always the aspect of consuming power. It should always be the goal of a device to consume as little energy as possible, because on the one hand the owner saves money and on the other hand it more environment friendly. So, this is the goal of this simulation: to find the most efficient algorithm for the Lawn Mower Roboter regarding the power consumption.
Regarding the shown tools during this semester for simulations, NetLogo 6.1.1 was chosen for this simulation because of the ability to visualize this kind of simulation.
The field of the simulation is 20x20 patches large. There are three kinds of agents: the robot, the station and trees. These agents are placed when the setup button is pressed. The station is the place where the robot starts his moving and the place where it goes back after finishing it. It is always placed at the patch with the highest x- and y-coordinate and marked as a red patch. Trees are seen as obstacles for the robot and placed randomly and the patch is coloured with a bright brown (brown + 3).
All these parameters can be changed by the user through input fields.
Amount of trees
The number of trees that should be placed in the field.
The ‘amount’ of grass that is cut when the robot lawns a patch once. In fact, it is the number that the green of the patch gets brighter when the robot steps on it once. It can not be higher than the difference of Min_height and Max_height.
The minimum/maximum height of grass that is wished by the user. In fact, these are the numbers that are added to the color green. Because of the limitations of colors, they can not be higher than 4 or less than -4 and of course the Max_height has to be less or at least equal to Min_height. (Note: Subtracting a number of a color makes it darker.)
The steps that the robot is going in total till the min_height of the grass is reached.
For the cosumed_power following assumptions are made: one steps needs one power unit and additionally the cutting_length divided by ten. So, the formula for the consumed_power is steps*(1+(cutting_length / 10)).
All algorithms are performed till the grass reaches the min_height entered by the user.
The robot goes in horizontal lines through the field. When it reaches the end of the field it jumps into the next line. When it hits a tree, it goes around it and continues in the previous line.
The robot goes in vertical lines through the field. When it reaches the end of the field it jumps into the next line. When it hits a tree, it goes around it and continues in the previous line.
The robot faces a random patch and moves into its direction. When it hits a tree, the end of the field or the station it changes its direction to another random patch.
The robot faces a random patch at the beginning and moves into its direction. Always when the robot hits the end of the field or the station it changes its direction to a patch which has not the min_height yet. When it hits a tree, it changes its direction to another random patch.
The biggest and most important limitation the user has to pay attention to is that the difference between the min_height and max_height has to be aliquot through the cutting_length, otherwise the algorithms are stuck in an endless loop.
Additionally, there are the limitations of the min_height and max_height that are already mentioned before.
For the setup of the trees some limitations and rules are implemented: Trees cannot be placed on a patch next to a wall and not next to each other, that means that every tree is surrounded only by grass.
To show some exemplary results following parameters are selected: min_height= 4 and max_height= -2. The parameters amount_of_trees and cutting_length will differ in the different results. Displayed is always the average consumed_power for the algorithm of ten different setups.
Amount_of_trees = 0
Amount_of_trees = 3
Amount_of_trees = 10
Regarding the above shown results there are obvious results which cutting algorithm and strategy is the most efficient under the given circumstances. On the one hand it is always better to move systematically horizontally or vertically and on the other hand it is better to cut to grass with one step to the wished height and not going several times while cutting less. In the real world other aspects have also to be considered for example many people say that it is better for the grass to cut it more often but less. When making this assumption and taking a look at the results one can see that the randomly_intelligent algorithm is very near to the results of the horizontally and vertically one. So definitely also an option when the grass should be cutted more often but less.