for teaching and research

Ap Rutges and Rob Vens
Copyright © 1991 by A. Rutges & R.W. Vens

Paper presented at the WACRA ’91 Conference Berlin, June 30 – July 3, 1991. It discusses a strategy for using a combination of computer simulation and knowledge system techniques for managing change with a Beehive Simulator example.
Published in Managing Change With Cases, Simulations, Games and Other Interactive Methods (Case method research & application).

Note: This article has been published in the proceedings of the conference. For me this was the first professional conference I attended, and it took place on the premises of the Stasi headquarters on the outskirts of Berlin. It was an inspiring conference for me, and in general quite an experience.

The paper was a result from the same project the other paper came from, on The Beehive Simulation.

Introduction

Managing change is one of the most exciting challenges for today’s decision makers. It is also one of the most difficult matters. In the Faculty of Management of the University of Groningen we have started a project0 with the purpose of investigating the possibilities of the integration of computer simulation, and knowledge system techniques for managing change. Therefore we looked for a rela­tively simple dynamic problem area that must be managed by a decision maker to achieve an optimalization of more than one goal. We chose The Beekeepers decision problematic. A beekeeper can be seen as a manager who has to make decisions in a complex and dynamic environment (the Apiary) to achieve some goals (no swarms, no diseases and a lot of honey).

This research area has the advantage to be well studied with a lot of research data and many ex­perts, a necessary prerequisite if we want to speed up the modelling phase.

Although the total research project consists of three parts (the construction of a computer simula­tion, the construction of an expert system and an investigation how to integrate both independent systems), we will limit ourselves in this paper to the first phase: the construction of the beehive simu­lator and the possibilities for teaching and research objectives.

A description of the problem area

A beehive may contain a colony of honeybees: a queen, house bees, field bees, drones, eggs, larvae and puppae. It can be described as a system with characteristics and several interacting proc­esses. The characteristics of the population will change during the seasons. Somewhere in its develop­ment the population will swarm and reproduce itself. Without the intervention of the beekeeper the population has little chance to survive. There are several serious threats: diseases, enemies, a capricious climate, agrarian poisons, lack of food and particularly the mismanagement of the beekeeper himself.

A beekeeper aims at having a healthy population, controlling the swarming moment1 and maximising the honey yield. He can achieve this by manipulating the colonies at the right time, in the right way.

Nowadays, beekeepers all over the world are confronted with a serious bee disease, the varroa mite. Several methods are developed to eliminate the mites. They vary from the use of chemical poi­sons to the so called biotechnical methods, which are supposed to be more friendly to the environment. Although the majority of the beekeepers prefer the use of biotechnical methods and distrust the effec­tiveness of the chemical remedies , most research has been directed at the development of new chemi­cal remedies. Research to study the effectiveness of the biotechnical methods seems to be very difficult. There is a rising demand for biotechnical methods, which combine the possibility of eliminating the varroa-mite with the possibility to control the swarming time.

Research method

What the experts need is a model in which all relevant knowledge is integrated, with the possibility to evaluate me effects of the biotechnical methods without prior knowledge of computers.

Therefore we decided to create a Beehive Simulator with two main components:

  • a simulation model for the description of the development of bees and varroa-mites and
  • an interactive animation model that gives the user the possibility of executing all beekeepers tasks with the help of the computer mouse only.

Description of the Beehive Simulator

Simulation model.

The beehive simulator gives a description of the structure and the processes in one or more beehives. The structure is based on the main components of an apiary: the hives, the population of bees and possibly the population of mites. The process is derived from the behavior of the most important actors.

It is in the nature of object-oriented modelling that the behaviour of the various actors=objects in a simulation can be factorised to a level as fine-grained as necessary. In our simulation model we decided on a granularity for the living participants in the simulation to the level of cohorts. A cohort is a generation of simulation actors born on one day. This is for the bees as well as for other reproducing simulation objects such as the queen, the drones, the mites etc. Of course in the case of the Queen the cohort-quantity is limited to one, but in the case of worker bees one generation can be as much as 2500 individual bees. The behaviour of each cohort was first analysed for as far as possible, and a concise behaviour-algorithm was designed.

This behaviour-algorithm formed the foundation for the implementation in Smalltalk2 of each actor-object in the form of a class-hierarchy.

The granularity of the time sequence was decided to be one day. This still allows for priority scheduling of events by using smaller steps, without the need to change the model. A finer time granularity can be chosen at wish – the major disadvantage will be a distinct increase of memory usage and processor time. Until now we encountered no problems in the simulation of the “real world” by using these granularity levels.

Interactive animation model.

Since the implementation of the simulation was written in the interactive programming environment of Objectworks®/Smalltalk™3, extensive use was made of the facilities of this programming environment in the form of windows (text-based windows as well as advanced graphical windows), popup-menu’s, buttons, dialog-boxes etc.

The foundation for the interactive use of the simulation is a window consisting of multiple subviews called the Beehive Simulator Control Window (see figure 1). The subviews of this window support three functions:

  • the manipulation of the hives,
  • the planning of the manipulation and
  • the presentation of relevant information.

Each subview in this window provides user-interaction with popup-menu’s.

Figure 1: Snapshot of a running simulation

The manipulation function is placed in the upper half of the control window.

In the main view the user is offered a graphical presentation of the working environment of the simulation, an Apiary, that resembles as closely as possible a real apiary and provides possibilities to manipulate the components of the apiary with the computer mouse. In the apiary of this view in figure 1 we see a snapshot of three hives: the first two hives are opened for inspection, the last hive is closed. The beekeeper can manipulate each part of the hive (the super, the frame, the cells and the eggs or the brood). If the manipulations are finished planning can be done by setting the date of the next inspection and restart the simulation process by pressing on the run button.

The other windows available to the user are used for the presentation of the relevant infor­mation. The changing status of two external factors temperature and nectar flow, both relevant for the inspections, are displayed seperately.
The information about the beehives is presented in the last view . It can be displayed in several ways. The most importants are: the histogram view and the statistics views. In the histogram view (the right bottom subview in the Control Window) one can find an overview of the main components in histogram form. By asking for the statistics of a special characteristic of a hive a new window will popup. This statistics view displays the statistical information gathered during the simulation of a selected component or combination of components. In figure 2 a graphical representation of the number of worker eggs during a simulation run in a selected hive is displayed, together with the number of drones. Each group of information can be added or deleted from the graph to help in analysing the data.

Figure 2: Statistics Window

These numeric data can be accessed through more text based views as well. An example is the Apiary Browser, shown below (Figure 3).

Figure 3: Apiary Browser

There are many other views and browsers not mentioned here, useful for scrutinous investigation of the present state of the apiary components.

The simulator as teaching and research instrument

Teaching Instrument

Because all relevant knowledge is integrated as much as possible in this dynamic model, the user of this apiary can ask the model: what happens, if…

This opens a wide range of learning and teaching possibilities. On the one hand there is the possi­bility for students to play around in the system to see what happens if one uses just any method, on the other hand the system can be used to generate special problem situations (cases) for students to solve.

The use of cases is the most promising one.

A case can be based on clearly defined problems ranging from simple to complex. In each case the student is free to follow his or her own ideas. Whatever he tries, all manipulations, the total planning and all information queries will be traced in logfiles. He can replay his own sessions and change it whenever he wants.

At this point we have planned the knowledge system with an advisory function.

Of course this teaching aspect of programs such as these is not limited to non-experts. In fact we see the emergence of computer programs that combine model knowledge and rule knowledge in the near future. This combination offers such a fertile soil for incorporating expert knowledge in a flexible, readable, accessible and easy way, that it is bound to be used more often. Knowledge on many areas has increased so much that the practical management of complex systems is an almost impossible task.

Research Instruments

One of the objects of this research project is to enable beekeepers to evaluate the usefulness of biotechnical methods.

They can do this for example by starting a simulation of several identical bee populations, with the same infection rate and apply to each of them a different biotechnical method.

With the help of the Statistics view the results of the different treatments can be displayed in terms of relevant variables as honey yield, the level of infection and the moment a population started to swarm2. A beekeeper can also evaluate the scheduling of his planned methods to see if it remains adequate in changing situations.

Concluding remarks

The main question of this project is how to make a complex dynamic system manageable for a decision maker.

The research aim is especially directed to the technical question how to integrate computer simula­tion with knowledge systems. With this in mind we found the application of object-oriented modelling techniques in a fully integrated object-oriented programming environment very fruitful and remarkably flexible.

This paper treats the first part of the project: design and use of a computer simulation model. Its function is to create an environment for the decision maker to evaluate not only the effectiveness of his ‘methods’ but also the adequacy of the planned decisions under changing conditions. The model is also very useful for teaching purposes. Special problems can be implemented and students can use the environment to evaluate the possible solutions.

Footnotes

  1. The name of the project is Knowledge Based Simulations.
  2. When a bee population swarms, the queen leaves the hive with half of the population and half of the honey storage. The beekeeper tries to delay this event till the moment he can win the honey and capture the swarm.
  3. Smalltalk is an object oriented programming language with possibilities for simulation, animation and the con­struction of knowledge systems. There are several dialects of the language, but it is a full-fledged programming language, first implemented as early as 1972.
  4. Objectworks®/Smalltalk is a trademark of ParcPlace Systems Inc. It is a complete programming environment offering an extensive reusable class library.

7 Comments

  1. Alan Bilinsky

    I am a new beekeeper and also a computer person. This project looks excellent! What happened to it? Was/is there a product? Is the source code available?

    Sincerely,

    Alan

    • Hi Alan,
      Nice to hear from someone interested in work that has been done decades ago. How did you get to know about the project? Why are you interested in it?

      The project has (at the time) attempted to get European funding to become part of a larger and more effective attempt to deal with bee problems, especially linked to environmental monitoring. Those attempts unfortunately failed, and since then the project ended up on the shelves, so to say.
      I still have the source code, as you may know in (VisualWorks) Smalltalk. You might be surprised how easy it is to port it to modern VisualWorks Smalltalk environments — I have not attempted it, but I can make a pretty solid guess it is very doable.
      However porting it to other languages might be more work. Porting it to Objective-C might be easiest I guess, since the language is very similar to Smalltalk. Actually I have done one such port already and it was a delight to do. Another port (of the personal finance software M€G) is on my todo list.
      About the availability of the source I am not sure, I have bcc’ed this reply to my mentor-at-the time who might be able to say more on that.
      I’ll get back to you about that as soon as I know more.
      Appended (July 19, 2013): As I confirmed in a direct email conversation to Alan, the project and source code is mine to deal with as I wish. I am currently looking into possibilities for funding a resurrection of the project. Possible sources might be for example the Dutch Beekeepers Association (or similar organisations internationally) to use as an aid in training.

  2. Michael Schwab

    I recently found your old work on the beehive simulator. I too would be interested in the old source. I’m a programmer by trade that recently got into beekeeping. I ran into your old project while thinking about doing something similar myself.

    My goal is to create a bee apiary (and local environment) simulator that can be used to optimize the various “parameters” (ie hive placement, distance to food sources, hive size, number of boxes, weather interactions etc) I see the whole beekeeping process as an optimization problem.

    It may be possible (assuming we have reasonable behavior algorithms) to use modern machine learning techniques to search for better/best overall system designs.

    Questions I hope to answer in time using the simulator would include (but not be limited to), how many hive should be clustered in a particular area, what plants should I seed in nearby fields, how many water sources should be placed and where… etc.

    It’d like to create an open source project (perhaps on sourceforge) using a modern programming language (like python, C# or F#). Your old project seems well designed from an OO perspective. Any chance I can get a look at the source?

    • Rob Vens

      Thanks, Michael, for your interest. Personally I would very much like it to move the old project into production again using Smalltalk. Would you be open for that?

  3. mjsmart

    I had thought about this idea today (my wife started beekeeping this yr.), I’m surprised it isn’t out yet. Would make a great PhD thesis project.

    • well, it actually was, at the time (for me) 🙂 Apart from this paper more research work was done. We even started a European Union-funded project with several universities and beekeeping institutions involved. Due to conflict about the basic approach the project never delivered, to my great chagrin. A reboot might be really great with all the growing interest in bees.

Leave a Reply

Your email address will not be published. Required fields are marked *