Second-law analysis is used to develop an energy optimization model based on the maximum reuse of exergy contained in the heat flows which emanate from industrial processes. In general, the optimization problem is non-linear. It can be made accessible to linear programming if one considers the energy losses due to smaller-than-unity conversion efficiencies as irrecoverable. Primary energy input is the objective function to be minimized by use of the simplex algorithm. Heat exchangers, heat pumps and cogeneration of electricity and heat are the energy-conservation technologies taken into account. The ideal energy-conservation potentials of industrial systems turn out to be strongly dependent on the shape of the energy-demand profiles. These profiles show the amount of energy (in enthalpy units) demanded at the various exergy (≅ temperature) levels. The Japanese profile, with a steadily decreasing demand from higher to lower exergy levels, results in the biggest savings (up to 60%). West Germany with its peak demand of high temperature heat has only a primary energy savings potential of less than 50%, whereas the Netherlands with a high demand of low-temperature heat may save nearly as much as Japan. Sensitivity analysis, in which we vary the parameters that describe enthalpy and exergy losses during energy-service performance and transportation, shows that under real-world conditions, the possible savings of primary energy may decrease by 10 to 30 percentage points. The model can be used to handle cost restrictions and perform cost optimization with the same mathematics. Thus, it may be used as a tool for designing economically-efficient strategies of resource conservation and pollution abatement.