Basics of model helpers

What is a model helper?

To allow for as much flexibility as possible, VVE allows the user to parametrize a lot of types. While this is essential to develop new ideas and complex models, simple models become cumbersome to write.

Model helpers predefine the main data structures, provide initialization, default drawing functions and more. In some extreme case (like the Cell-System model helper) the smallest possible model can be three line long. In some other case, it is a bit longer to get any useful model.

Commands and methods found in all helpers

The template to use helpers is always the same:

#define VertexAttributes \
  double a; \
  double b;

#include <helper_model.h>

StartModel

void initialize()
{
  // Custom initialization
}

void readParam(util::Parms& parms)
{
  // Read custom parameters
}

void step()
{
  // Redefining the default step
  ParentClass::step(); // Call the default step function
}

EndModel

From within the model, there will always be a set of variables and vertex attributes predefined. When adding your own attributes, be careful to choose name not clashing with already defined attributes. There are only two class names common to all the helpers:

In addition to these functions, all methods of the Model class can be overloaded to personalize the model.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Fri May 31 15:37:54 2013 for VVE by  doxygen 1.6.3