Composite optimization for the resource allocation problem. (4th July 2021)