This paper considers an optimal path generation problem that generates a path without a collision between an automobile and obstacles.The problem is formulated as mixed integer programming. In the problem the obstacles and environments around the automobile can be represent as inequality conditions. The dynamics of the obstacle is described as variation of a prohibited region. According to model predictive control we solve the optimal path generation problem a each time step then apply the first element of the optimal input. The method proposed in this paper can deal an explicit representation of the dynamics of the obstacle and provides no collision between the automobile and the obstacle.