Energy and criticality in random Boolean networks