This paper addresses the optimal control problem of timed continuous Petri nets under infinite servers semantics. In particular, our goal is to find a control input optimizing a certain cost function that permits the evolution from an initial marking (state) to a desired steady-state. The solution we propose is based on a particular discrete-time representation of the controlled continuous Petri net system, as a certain linear constrained system. An upper bound on the sample period is given in order to preserve important information of the timed continuous net, in particular the positiveness of the markings. The reachability space of the sampled system in relation to autonomous continuous Petri nets is also studied. Based on the resulting linear constrained model, the optimal control problem is studied through model predictive control (MPC). Implicit and explicit procedures are presented together with a comparison between the two schemes. Stability of the closed-loop system is also studied.