The paper introduces the application of dynamic programming algorithms to the optimal allocation of energy in large nuclear-powered complexes. The formulation and solution of the problem of optimal product mixes in both purely industrial and agro-industrial complexes is discussed. Simplified numerical examples of each case are presented to illustrate the solution method.