Optimal noncausal set-point regulation of scalar systems