This chapter discusses some common issues that occur when developing or using OTS.
Eclipse complains about a missing java project / class.
When Eclipse is unable to find a specific class it will give an error stating ‘X cannot be resolved to a type’. The first thing you want to make sure is to organize imports (Ctrl + Shift + O). Especially in the case you have downloaded projects from subversion, it may be the case that you haven’t yet downloaded a project on which the downloaded project depends. Most important project dependencies are given in Figure 1.
During simulation I get a missing parameter exception.
In section Setting default parameters in factories it is explained how the strategical planner factory and all its underlying ModelComponentFactory’s have the task of supplying the (default) parameters that the specific model part uses. This occurs during vehicle generation. It is not a water tight system and it may be that some parameter that is used, is never set and thus not available in simulation. The most likely solution is to add the parameter in the lowest-level factory for GTU generation possible. For example, return the parameter in getParameters() of a car-following model factory, for the accompanying car-following model that is returned by the factory. However, parameters should only be set if they are always used by the model component. If this is not a given, an alternative is to set the parameter using the ParameterFactory which is part of a strategical planner factory.
NullPointerException: Missing model component.
Starting from the strategical planner downward there is a structure of model components. This structure is explained in section GTU characteristics generator and detailed out in the chapter Behavioral models. The structure has optional components, and one component may or may not have further sub components. When you run in to an exception, likely a NullPointerException, as such a component is not defined, the factories that generate GTU characteristics for vehicle generation are likely improperly set up.