We show in this paper that timed Petri nets, with one resource shared by all the transitions, are directly connected tothe modelling of integer linear programs (ILP). To an ILP can be automatically associated an equivalent Petri net. Theoptimal reachability delay is an optimal solution of the ILP. We show next that a net can model any ILP. I order to dothis, we give a new sufficient reachability condition for the marking equation, which also holds for general Petri netswithout timed transitions.