Timed weighted marked graphs are a subclass of timed Petri nets that have wide applications in the control and performance analysis of flexible manufacturing systems. Due to the existence of multiplicities (i.e., weights) on edges, the performance analysis and resource optimization of such graphs represent a challenging problem. In this paper, we develop an approach to transform a timed weighted marked graph whose initial marking is not given, into an equivalent parametric timed marked graph where the edges have unitary weights. In order to explore an optimal resource allocation policy for a system, an analytical method is developed for the resource optimization of timed weighted marked graphs by studying an equivalent net. Finally, we apply the proposed method to a flexible manufacturing system and compare the results with a previous heuristic approach. Simulation analysis shows that the developed approach is superior to the heuristic approach.