On the control of max-plus linear system subject to state restriction