Config1DModel configModel = (Config1DModel) config;
configModel.removeListener(listenerConfig1D);
for(ISensor sensor : config.getSensorsList()) {
((SensorModel) sensor).removeListener(listenerSensor);
}
Dimension1DModel dimension1DModel = (Dimension1DModel) configModel.getDimensionX();
dimension1DModel.removeListener(listenerDimension1D);
for(IActuator actuator : dimension1DModel.getActuatorsList()) {
((ActuatorModel) actuator).removeListener(listenerActuator);
}
for(IRange1D range1D : dimension1DModel.getRangesXList()) {
((Range1DModel) range1D).removeListener(listenerRange1D);
for(ITrajectory trajectory : range1D.getTrajectoriesList()) {
((Trajectory1DModel) trajectory).removeListener(listenerTrajectory1D);
}
}