In this paper, we propose a simultaneous optimization method for task assignment and routing problems for multiple AGVs by decomposition of Petri Nets. In the proposed method, the Petri Net is decomposed into several subnets for task subproblems and AGV subproblems. Each subproblem is solved by Dijkstra's algorithm. The solution of subproblem for each subnet is repeated until a feasible solution for the original problem is obtained. In this study, a new solution method for subproblems with no final marking is developed. The effectiveness of the proposed method is confirmed by comparing the performance with conventional methods.