A rolling-horizon optimization algorithm for the long term operational scheduling of cogeneration systems