Model-based Safe Deep Reinforcement Learning via a Constrained Proximal Policy Optimization Algorithm