Using L. S. Pontryagin's maximum principle in minimum-critical-size and maximum-power reactor problems