Optimization in Non-Standard Problems. An Application to the Provision of Public Inputs