Design of CSP plants with optimally operated thermal storage