added max principle debug function, added steady-state max principle check