This work proposes a mathematical programming (MP) representation of discrete event simulation of timed Petri nets (TPN). Currently, mathematical programming techniques are not widely applied to optimize discrete event systems due to the difficulty of formulating models capable to correctly represent the system dynamics. This work connects the two fruitful research fields, i.e., mathematical programming and Timed Petri Nets. In the MP formalism, the decision variables of the model correspond to the transition firing times and the markings of the TPN, whereas the constraints represent the state transition logic and temporal sequences among events. The MP model and a simulation run of the TPN are then totally equivalent, and this equivalence has been validated through an application in the queuing network field. Using a TPN model as input, the MP model can be routinely generated and used as a white box for further tasks such as sensitivity analysis, cut generation in optimization procedures, and proof of formal properties.