Formation of defects in network under local energy balance