<p>This thesis presents the development of a novel model for solving the flexible job shop scheduling problem with maintenance activities where maintenance activities are limited by a maintenance crew constraint. Moreover, in order to extend it in terms of energy consumption, the cost of energy usage associated with different states of the machines is considered in the objective function. The objective is to minimize the total cost of hiring repairmen, energy consumption, and tardiness penalties. We assume the production machines in this environment may break down which causes the unavailability of the machines for the production. In the maintenance phase, a threshold-based maintenance strategy is applied based on the obtained optimal replacement age of each machine. Accordingly, the required maintenance action is divided into two categories: minimal repair or replacement activities. Furthermore, opportunistic maintenance is considered in the scheduling to minimize the required number of repairmen to be hired. In fact, the main aims are to find the optimal machine assignment and operation sequence, to determine if preventive maintenance is required to be executed between two consecutive operations, and to specify the optimal number of maintenance crew to be hired for the shop floor to minimize the expected total cost.</p>