Text this: Optimization of parameters of the reference frequency source with a composite resonator-thermostat