for (ISensor sensor : config.getSensorsList()) {
((SensorModel) sensor).removeListener(listenerSensor);
}
DimensionEnergyModel dimensionEnergyModel = (DimensionEnergyModel) configEnergyModel
.getDimensionX();
dimensionEnergyModel.removeListener(listenerDimensionEnergy);
for (IActuator actuator : dimensionEnergyModel.getActuatorsList()) {
((ActuatorModel) actuator).removeListener(listenerActuator);
}
for (IRangeEnergy rangeEnergy : dimensionEnergyModel.getRangesEnergyList()) {
((RangeEnergyModel) rangeEnergy).removeListener(listenerRangeEnergy);