Optimization of the maintenance scheduling and production valuation by green certificates