Text this: Optimum distribution network operation considering distributed generation mode of operations and safety margin