Neighbourhood search for energy minimisation in flexible job shops under fuzziness

Uncertainty pervades real life and supposes a challenge for all industrial processes as it makes it difficult to predict the outcome of otherwise risk-free activities. In particular, time deviation from projected objectives is one of the main sources of economic losses in manufacturing, not only for the delay in production but also for the energy consumed by the equipment during the additional unexpected time they have to work to complete their labour. In this work we deal with uncertainty in the flexible job shop, one of the foremost scheduling problems due to its practical applications. We show the importance of a good model to avoid introducing unwanted imprecision and producing artificially pessimistic solutions. In our model, the total energy is decomposed into the energy required by resources when they are actively processing an operation and the energy consumed by these resources simply for being switched on. We propose a set of metrics and carry out an extensive experimental analysis that compares our proposal with the more straightforward alternative that directly translates the deterministic model. We also define a local search neighbourhood and prove that it can reach an optimal solution starting from any other solution. Results show the superiority of the new model and the good performance of the new neighbourhood.


Introduction
Scheduling consists in arranging the execution of a set of operations on a set of resources under some constraints to complete a set of objectives in the best way (Pinedo 2016;Błazewicz et al. 2019).It is a classical problem in manufacturing and industrial activities in general (Han et al. 2022;Bakon et al. 2022), but it is also fundamental in areas such as healthcare (Razali et al. 2022;Luo et al. 2020), computing infrastructures (Mansouri and Ghafari 2022;Ye et al. 2019), education (Imaran Hossain et al. 2019) or airport baggage transportation (Guo et al. 2020).
One of the most prominent families of scheduling problems is job shop scheduling problems (C ¸alis and Bulkan 2015) because their different variants can be adapted to model many different real-life problems (Xiong et al. 2022).In particular, the flexible job shop, which not only solves the classic operation-sequencing problem but also deals with a resource-assignment subproblem, draws special attention due to its relevance for industrial problems (Gao et al. 2019).
Most scheduling problems, and the flexible job shop in particular, are NP-hard (Lenstra et al. 1977), so exact algorithms that guarantee finding the optimal solutions can only be applied to the simplest instances.For this reason, approximate search algorithms have been proposed with the objective of finding good-enough solutions using a reasonable amount of computational resources (Gendreau and Potvin 2019).In order to find new innovative algorithms, researchers have been taking inspiration from the natural world, developing strategies that emulate natural phenomena to search for solutions in more intelligent ways that lessen the computational costs.These methods have been successful in many real-world and shop scheduling problems (Palacios et al. 2014(Palacios et al. , 2019;;Guo et al. 2020;Niu et al. 2021;Ye et al. 2019), including the flexible job shop (Palacios et al. 2015a;Chaudhry and Khan 2016;Zuo et al. 2017;Gao et al. 2019;Gen et al. 2021;Garcı ´a Go ´mez et al. 2022).
Many of these algorithms need to define neighbourhood functions that allow them to travel from one solution to another.Defining efficient neighbourhoods with theoretical properties such as allowing to reach optimal solutions from any other solution or generating only feasible solutions is a very important research area of job shop (Mattfeld 1995;Kuhpfahl and Bierwirth 2016).Nevertheless, using these neighbourhood functions alone, in so-called trajectorybased methods, is not usually enough and they can be hybridized with other search strategies.In particular, combining trajectory-based and population-based search algorithms results in a type of algorithms named memetic algorithms that have been proved to be very

O
The set of operations R The set of resources m The number of resources J The set of jobs n The number of jobs RðoÞ The subset of resources in which operation o can be executed vðoÞ The job to which operation o belongs to gðoÞ The position in which operation o has to be executed relative to its job successful (Gong et al. 2020;Mencı ´a et al. 2022;Garcı ´a Go ´mez et al. 2022) due to their balance between exploration of the search space and exploitation of the most promising zones (Osaba et al. 2022).
The objective of scheduling problems has been evolving from the earliest days of industrialisation to the present day.Historically, the most common objective was minimising the maximum completion time, usually known as the makespan.While it is still relevant, it has increasingly been replaced by other production-related measures such as tardiness, as a response to changes in supply-chains consequence of the relocation of factories to different countries.Nowadays the trend is changing again, and the reduction of energy consumption has been introduced as a new objective to adapt to newer laws and regulations that seek a reduction in the environmental footprint as a countermeasure to global warming.Moreover, due to highly-tensed geopolitical relations, energy costs are rising and the industry needs to make a more efficient use of energy to remain competitive.For these reasons, in recent years we have seen a significant increase in research in this area of scheduling (Gonza ´lez et al. 2017;Li and Wang 2022;Liu et al. 2019;Gong et al. 2020;Han et al. 2022;Mansouri and Ghafari 2022).
To make models simpler and the search for solutions less computationally demanding, most researchers in scheduling limit the complexity by limiting themselves to a deterministic setting.However, real-life problems have uncertainty and working with it is in itself a challenge, so models cannot ignore it if they want to be useful (Bakon et al. 2022).One of the most successful ways of modelling uncertainty in scheduling is using fuzzy numbers, and in particular, triangular fuzzy numbers (Abdullah and Abdolrazzagh-Nezhad 2014;Palacios et al. 2016) because as pointed out in Dubois et al. (2003), they provide a good balance between ease of understanding, informativity and computing cost.
It is easy to find in the literature several works that make use of metaheuristics to optimise the more traditional objectives in a fuzzy job shop (Abdullah and Abdolrazzagh-Nezhad 2014;Palacios et al. 2019) and, more specifically, in the fuzzy flexible job shop (Sun et al. 2019;Li et al. 2022a).Works that incorporate both uncertainty and energy-consumption objectives are more scarce.Regarding the job shop without flexibility, in Gonza ´lez-Rodrı ´guez et al. ( 2020) the authors propose an evolutionary algorithm to reduce the non-processing energy and the total weighted tardiness, whereas in Afsar et al. (2022) a memetic algorithm is used to minimise the non-processing energy and the makespan.As for job shops with flexibility, in Garcı ´a Go ´mez et al. (2022Go ´mez et al. ( , 2023) ) the authors use memetic algorithms to minimise total energy consumption; in Pan et al. (2022) a bi-population evolutionary algorithm with a feedback mechanism and enhanced local search is proposed with the goal of minimising both the fuzzy makespan together and the fuzzy total energy consumption and maximising flexible due-date satisfaction; and in Li et al. (2022b) a learning-based memetic algorithm is used to minimise makespan and energy consumption.
In this work, we will consider the flexible job shop with fuzzy processing times and the objective of minimizing the total energy consumption.We define the total energy consumption as the sum of the passive energy, the energy consumed by resources only by the fact of being switched on, and the active energy, consumed by resources when they are working in addition to the passive energy.This proposal builds on the conference paper from Garcı ´a Go ´mez et al. ( 2022) and the objective is to complete the ideas therein as follows: • Propose a set of metrics to compare two fuzzy models of total energy for the flexible job shop.To do so we motivate some measures that compare the models based both on their fuzzy values and on the use of crisp samples to simulate the behaviour in a real setting.• Compare the proposed energy model for the flexible job shop with the more straightforward alternative that directly translates the crisp model.• Propose a new neighbourhood function that ensures feasibility and connectivity.We formally demonstrate that the neighbourhood allows to obtain an optimal solution starting from any other solution.This is a desirable property when the neighbourhood is used in a wide variety of local search algorithms.• Integrate the proposed neighbourhood in a memetic algorithm and compare its performance with the state of the art.The results show that it is competitive and especially relevant in CPU-constrained applications.
The rest of the paper is organised as follows: Sect. 2 formally defines the problem and introduces the measures for comparing fuzzy schedules, Sect. 3 describes and studies the proposed neighbourhood structure and Sect. 4 reports and analyzes the experimental results to evaluate the potential of our proposal.Finally, Sect. 5 presents some conclusions.

Problem formulation
The flexible job shop scheduling problem consists in scheduling a set O of operations (also called tasks) in a set R of m resources (also called machines) subject to a set of constraints.Operations are organised in a set J of n jobs, so operations within a job must be sequentially scheduled.Given an operation o 2 O, the job to which it belongs is denoted by vðoÞ 2 J and the position in which it has to be executed relative to this job is denoted by gðoÞ.There are also capacity constraints, by which every operation o 2 O can only be processed in a resource from a given subset RðoÞ R with its processing time p(o, r) depending on the resource r 2 RðoÞ on which it is executed.Also, the operation requires the uninterrupted and exclusive use of the resource for its whole processing time.
In the energy-aware problem, the resources need energy to function, with the amount of energy depending on two overlapping states: on and active.Just for being switched on, each resource r 2 R consumes a certain amount of energy per time unit.This constitutes the resource's passive power consumption P p ðrÞ.Additionally, when an operation o 2 O is processed in a resource r 2 RðoÞ, this resource consumes an extra amount of energy per time unit, the active power P a ðo; rÞ.

Fuzzy processing times
We model processing times as triangular fuzzy numbers (TFNs), a particular type of fuzzy numbers, with an interval ½a 1 ; a 3 of possible values and a modal value a 2 (Dubois and Prade 1993).A TFN can be represented as a triplet b a ¼ ða 1 ; a 2 ; a 3 Þ, so its membership function is given by: Arithmetic operations on TFNs are defined based on the Extension Principle, so for two TFNs b a and b b, the sum is defined as: and the product of a scalar c by a TFN b a is defined as: Extending the maximum is not that straightforward because the set of TFNs is not closed under the operation obtained with the Extension Principle.For this reason, in fuzzy scheduling it is usual to approximate it by interpolation as follows: If the result of the maximum is a TFN, it coincides with the approximated value and, in any case, the approximation always preserves the support and the modal value (cf.(Palacios et al. 2015b)).
Another operation where we must be cautious when extending it is subtraction.For two TFNs b a and b b, their difference is defined as: Notice however that the difference is not necessarily the inverse of the sum, that is, b This is because underlying the definition is the assumption that b a and b b are non-interactive variables, i.e., they can be assigned values in their support independently of each other.Therefore, when the TFNs b a and b b are linked, using the difference may result in an ''over-uncertain'' or ''pessimistic'' quantity, which may be a problem in certain applications.It is, for instance, the main difficulty in critical-path analysis and backpropagation in activity networks with fuzzy durations (Dubois et al. 2003).
Another important issue when considering fuzzy processing times is the lack of a natural total order for TFNs.Some ranking method is thus needed in order to make comparisons.A ranking method widely used in the literature is the one based on the expected values.For a TFN b a, its expected value is: with non-strict precedence b a " b b if a i b i 8i 2 f1; 2; 3g.We may also write b , but the inverse is not necessarily true.

Fuzzy schedules
For a feasible solution /, the makespan is the maximum completion time of all tasks: Notice that a feasible starting time assignment s / induces partial orderings for all the operations in the same job and all operations in the same resource.In consequence, we can indistinctly refer to a solution as a pair / ¼ ðs / ; s / Þ or as a pair / ¼ ðs / ; r / Þ.When no confusion is possible, for the sake of a simpler notation, we may drop the subindex / from the solution's components.

Total energy consumption
We consider that the total energy consumption in a solution / stems from two different sources: passive and active energy consumption.On the one hand, for a given solution / there is an intrinsic passive energy consumption c E p ð/Þ incurred as soon as the resources are turned on and until they are turned off.The amount of energy required by a resource r 2 R depends on its passive power consumption P p ðrÞ and is proportional to the time the resource remains switched on.Assuming that all resources are simultaneously turned on and off (respectively, at instant 0 and at the time the whole project is completed), the passive energy consumption in a solution / is thus obtained as follows: On the other hand, when an operation o 2 O is processed in a resource r 2 RðoÞ, this results in an additional energy cost, denoted c E a ðo; rÞ, which depends on the active power P a ðo; rÞ required to execute o in r and is proportional to the processing time b pðo; rÞ: c E a ðo; rÞ ¼ P a ðo; rÞb pðo; rÞ Thus, given a solution /, the active energy consumption will be: Our model is an additive model so the total energy consumption is the sum of the passive and the active energy consumption:

Alternative energy models in the fuzzy context
The total energy consumption is modelled as the sum of the energy consumed when the resources are processing operations and the energy consumed only by the fact of being switched on.
Having said that, in the deterministic problem the usual way to model this kind of energy consumption is to assume that the possible states for the resources are disjoint, so there is a power consumption when they are active and a different power consumption when they are idle.In this way, the total energy is the sum of the processing energy (i.e., the energy consumed by resources when they are active) and the nonprocessing energy (i.e., the energy consumed when resources are idle).For each resource, its total idle time is obtained by adding all time gaps between the completion of one operation and the start of the next operation in that resource; these individual idle time gaps are easily obtained using subtraction.
If this model is directly translated to the fuzzy problem, idle gaps are computed as the difference between two fuzzy numbers (4), resulting in over-uncertain idle times, with a support including many values that are not attainable.In particular, the difference may include negative values, which are clearly impossible.Negative values can be avoided by truncating the difference, so if o is an operation and u is its successor in the resource, the idle time between o and u is computed as maxðð0; 0; 0Þ; b s u À b c o Þ.This certainly solves the problem of having negative values for idle times, but we still have an artificially-increased support for the idle time and, in consequence, some artificial uncertainty in the total non-processing energy.We will refer to the resulting model for total energy consumption in fuzzy flexible job shop as the ''gaps model''.
The total energy model adopted in this work was proposed in Garcı ´a Go ´mez et al. ( 2022) as an alternative translation of the deterministic approach to total energy consumption that avoids subtracting interactive fuzzy numbers by considering that resources can be in overlapping states.In this way, total energy consumption can be seen as the result of two stacked layers, one that corresponds to the energy consumed by resources simply by being on, and another layer that corresponds to the extra energy needed by resources when they are working.This alternative model for total energy consumption will be referred to as the ''stack model''.
Notice that, in the deterministic setting, the gaps and the stack approaches are equivalent.However, using overlapping states in the fuzzy setting avoids introducing artificial uncertainty due to subtraction.Let us illustrate this with an example.Consider a toy problem with only two operations o 1 and o 2 belonging to different jobs and sharing the same resource r.Let pðo 1 ; rÞ ¼ ð1; 2; 3Þ, pðo 2 ; rÞ ¼ ð2; 2; 2Þ, P p ðrÞ ¼ 1, P a ðr; o 1 Þ ¼ 2 and P a ðr; o 2 Þ ¼ 2. Regardless of the order in which operations are executed, the resource will start at (0, 0, 0) and finish at (3,4,5).Let us suppose that in a solution / operation o 1 is scheduled before o 2 , so (1, 2, 3) is both the completion time of o 1 , c c / ðo 1 Þ, and the starting time of o 2 , c s / ðo 2 Þ.The gap between these operations, and consequently the idle time of the resource r, would be computed with fuzzy subtraction as maxðð0; 0; 0Þ; c s / ðo 2 ÞÀ c c / ðo 1 ÞÞ ¼ ð0; 0; 2Þ.In this way, the energy consumption according to the gap model will be P p ðrÞ d idle / ðrÞ þ ðP p ðrÞþ P a ðo 1 ; rÞÞb pðo 1 ; rÞþ ðP p ðrÞ þ P a ðo 2 ; rÞÞb pðo 2 ; rÞ ¼ 1ð0; 0; 2Þ þ 3ð1; 2; 3Þþ 3ð2; 2; 2Þ ¼ ð9; 12; 17Þ.However, we know that the starting time of o 2 and the completion time of o 1 are not only linked, but identical, so a gap value other than 0 is impossible and, hence, the passive energy consumption will always be null.In fact, using the ''stack model'' the energy consumption will be P p ðrÞ d C max ð/Þ þ P a ðo 1 ; rÞb pðo 1 ; rÞ þP a ðo 2 ; rÞb pðo 2 ; rÞ ¼ 1ð3; 4; 5Þ þ 2ð1; 2; 3Þ þ 2ð2; 2; 2Þ ¼ ð9; 12; 15Þ.We can see that with the ''stack model'' we have avoided introducing the passive energy consumption proportional to the gap (0, 0, 2), which we have already identified as artificial uncertainty due to a bad model choice.
Using resource overlapping states to avoid calculating the size of idle periods under uncertainty is also underlying the definition of fuzzy total energy proposed in Pan et al. (2022), although in this work it is assumed that resources can be turned off individually.

Measures for comparing fuzzy schedules
We will be interested in comparing and measuring the goodness of fuzzy schedules beyond the ranking provided by E .To this end, we now propose different measures.These have been selected with two objectives in mind.First, as our main motivation to introduce an alternative energy model has been to avoid artificial uncertainty, these metrics must give evidence of this effect.Second, they need to clearly show the performance of the models in real scenarios.

Measures based on fuzzy values
When comparing two schedules / and / 0 based on their total energy values, b Eð/Þ and b Eð/ 0 Þ, which are two TFNs, we may consider the following features of TFNs: • Expected Value (E).As explained in Sect.2.1, the expected value can be used to rank TFNs, so the smaller the expected value of the total energy, the better the solution.
• Spread (S).For a TFN b a its spread (Ghrayeb 2003) is defined as: The spread is a measure of the uncertainty of the TFN.
Although uncertainty is present in the problem, between two solutions, that with an energy value having a smaller spread (uncertainty) should be preferred.

• Modal value position (MVP). Given a TFN b
a its modal value position is defined as: This is a number in ½À1; 1, negative when the TFN's modal value is on the left of the support's midpoint, positive when the modal value is on the right of the midpoint, and zero when the TFN is symmetric.It could somehow be seen as a measure of the skewness of the TFN.Obviously, the MVP of the schedule's energy depends on the processing times.However, if two schedules for the same problem have total energy values with different modal value position, the one with a MVP closer to 0 seems preferable in the sense that it is less biased, compared to the other schedule, which could be seen as accumulating uncertainty to the left (which could be seen as over-optimistic) or to the right (which could be seen as over-pessimistic).This measure is inspired by the ranking defined in Chen (1985), although the authors use it for a different objective.

Measures based on crisp realisations
According to the semantics of fuzzy schedules proposed in Gonza ´lez Rodrı ´guez et al. ( 2008a), a fuzzy schedule / is an a-priori solution providing a possibility distribution (in the form of TFNs) for the starting times of all operations and for the resulting total energy consumption.When operations are actually executed according to the resource assignment and the order provided by /, uncertainty is no longer present For each operation o, its executed processing time p / ðoÞ is a crisp value in the support of the fuzzy processing time b pðo; s / ðoÞÞ; it is a possible realisation of the fuzzy processing time.Also, the resulting total energy is a crisp value within the support of the fuzzy total energy consumption of /.Hence, the executed schedule can be seen as the a-posteriori realisation of the original fuzzy schedule /.The vector of possible realisations of fuzzy processing times, q where qðoÞ ¼ p / ðoÞ, is also called a possible scenario.
Under these semantics, it is interesting to measure the quality of the a-priori fuzzy schedule relative to a possible scenario or a-posteriori realisation of processing times.For / a feasible solution, let b a denote the fuzzy value of the objective function for /; we propose the following two measures: • Relative distance to the expected value (RDEV).Let a q denote the value of the crisp objective function when the solution is evaluated on a possible scenario q; then: If this value is negative, that is, the total energy consumption in the executed schedule is smaller than expected, it means that the a-priori schedule objective function is pessimistic.On the contrary, if RDEV is positive, the a-priori schedule could be seen as optimistic.Overall, the smaller the absolute value of RDEV, the closer the predicted energy consumption of the solution is to real scenarios.• Used uncertainty (UU).Let S be a set of possible scenarios and let a q denote the value of the objective function in a scenario q 2 S. Then: This gives a value in [0, 1] measuring the proportion of the support of the predicted fuzzy objective function that is covered with the possible scenarios in S. When S is representative enough of all the possible scenarios, a value of UU close to 1 means that the range of values considered as obtainable by the TFN is actually achievable in real situations.Small values of UU would on the other hand mean that the fuzzy schedule incorporates artificial uncertainty and, hence, is less informative.

Neighbourhood for energy minimisation
To solve the problem, a competitive memetic algorithm was proposed in Garcı ´a Go ´mez et al. ( 2022).This is a hybrid algorithm that combines an evolutionary algorithm with tabu search.The idea is that by incorporating the problem-domain knowledge provided by the tabu search into the evolution process, the memetic algorithm benefits from the synergy between both search methods (Gendreau and Potvin 2019, Chapter 9).At each iteration, tabu search applies local transformations (called moves) to the current solution to generate a set of neighbouring solutions, so the search continues by moving to one of these neighbours.
Obviously, defining an adequate neighbourhood structure is one of the most critical steps in designing any tabu search procedure (Gendreau and Potvin 2019, Chapter 2).
In this work, we define a new neighbourhood structure for the energy-aware flexible fuzzy job shop scheduling problem, based on the one proposed in Garcı ´a Go ´mez et al. (2022).A formal study will show its good theoretical behaviour, guaranteeing both feasibility and the connectivity property, that is, the possibility of reaching an optimal solution starting from any solution in the search space and performing only moves from this neighbourhood.
Given a solution / ¼ ðs / ; r / Þ, we shall consider two kinds of moves depending on the component of / that is modified.The current resource assignment s / can be modified by a reassignment move, whereby an operation o is reassigned to a different resource r 6 ¼ s / ðoÞ, so the resulting resource assignment is denoted s ðo;rÞ .The processing order vector r / can be modified with an insertion move, whereby an operation o is inserted in the i-th position of r / .The resulting processing order is denoted r ðo;iÞ .A special kind of insertion in / is the one that results in exchanging the position of two consecutive operations in a resource; it will be called a swap.
The distance between two solutions / ¼ ðs; rÞ and / 0 ¼ ðs / 0 ; r / 0 Þ, denoted as dð/; / 0 Þ, is defined as the minimum number of reassignments and swaps that need to be applied to go from one solution to the other.
Not all the reassignment and insertion moves lead to feasible solutions and not all feasible moves are interesting in the sense that they may lead to solutions improving on total energy consumption.We will propose in Sects.3.1 and 3.2 intermediate neighbourhood structures, based on one type of move, ensuring feasibility and aimed at reducing either passive or active energy consumption.They will then be combined in a global neighbourhood in Sect.3.3.
We start by introducing some preliminary concepts and notation.Given a solution / ¼ ðs / ; r / Þ, for an operation o 2 O, let JPðoÞ (resp.JSðoÞ) denote its predecessor (resp.successor) in its job, RP / ðoÞ (resp.RS / ðoÞ) its predecessor (resp.successor) in its resource and c p / ðoÞ ¼ b pðo; s / ðoÞÞ the operation's processing time in the resource it is assigned to.
The head c h / ðoÞ of operation o is its earliest starting time according to /, that is: ) is taken to be (0, 0, 0) if o is the first operation in its job (resp.its resource).
The tail c q / ðoÞ of operation o is the time left once o has been processed until all other operations are completed: where c q / ðJSðoÞÞ þ c p / ðJSðoÞÞ (resp.c q / ðRS / ðoÞÞþ c p / ðRS / ðoÞÞ) is taken to be (0, 0, 0) if o is the last operation in its job (resp.its resource).
An operation o is said to be makespan-critical in a solution / if there exists a component i 2 f1; 2; 3g of the fuzzy makespan such that C i max ð/Þ ¼ ðh / ðoÞþ p / ðoÞ þ q / ðoÞÞ i .A makespan-critical block is a maximal sequence b of operations all requiring the same resource, with no pair of consecutive operations belonging to the same job and such that all operations in the block are makespan-critical for the same component of the fuzzy makespan, that is, there exists i 2 f1; 2; 3g such that for every operation o 2 b, C i max ð/Þ ¼ ðh / ðoÞþ p / ðoÞþ q / ðoÞÞ i .The set of all makespan-critical operations is denoted T C max ð/Þ and the set of all makespan-critical blocks is B C max ð/Þ

Neighbourhoods aimed at reducing passive energy
In order to reduce passive energy consumption (in our case, in terms of E ) it is necessary to reduce the time span when resources are active, that is, the makespan.Now, let / be a solution and let / 0 be a feasible neighbouring solution obtained by an insertion or a reassignment move.Then / 0 can improve in terms of makespan, (in the sense that d ), only if the move has involved a makespan-critical operation; the proof is a trivial generalisation to the case with flexibility of Proposition 3 in Gonza ´lez Rodrı ´guez et al. (2008b).Also, if a solution / 0 is obtained by an insertion in / that results in exchanging the position of two consecutive operations in a resource (called a swap), then / 0 is always guaranteed to be feasible; the proof is a generalisation to the case with flexibility of Theorem 1 in Gonza ´lez Rodrı ´guez et al. (2008b).Furthermore, / 0 can only improve in terms of makespan if the operations lie at the extreme of a makespan-critical block; here, the proof is a direct consequence of the analogous property proved for the fuzzy job shop in Theorem 2 of Gonza ´lez Rodrı ´guez et al. (2009).
These properties motivate the definition of two neighbourhood structures for passive energy.The first one consists in feasible reassignment moves of critical operations, aimed at redistributing the resources' workload.It is based on the neighbourhood proposed in Gonza ´lez et al. ( 2013) for the deterministic flexible job shop with setup times.The desired effect of this neighbourhood is to reduce (in terms of E ) the fuzzy makespan and, in consequence, the passive energy consumption, although it could increase active energy in the process.
Definition 1 Makespan-critical operation resource reassignment neighbourhood Notice that neighbourhood N MCORR ð/Þ contains only feasible solutions.Indeed, the selected operation o is reassigned to a resource in RðoÞ and this move does not alter r / in any way, so precedence and resource restrictions still hold.
It is possible to reduce the distance to an optimal solution using N MCORR ð/Þ.Lemma 1 Let / opt ¼ ðs / opt ; r / opt Þ be an optimal solution and let / ¼ ðs; rÞ a non-optimal solution such that c If there exists a makespan-critical operation o 2 T C max ð/Þ such that o is assigned to different resources in / and / opt , that is, s / opt ðoÞ 6 ¼ s / ðoÞ, then there is a neighbouring solution / 0 2 N MCORR ð/Þ which is closer to / opt in the sense that dð/ 0 ; / opt Þ\dð/; / opt Þ.
The second neighbourhood aimed at reducing the makespan and, hence, the passive energy c E p in terms of E is based on performing insertion moves.It is inspired by the neighbourhoods proposed by Dell' Amico and Trubian (1993) and Zhang et al. (2007) for the deterministic job shop problem.Its objective is, for a fixed resource assignment, to find an operation processing order that improves in terms of makespan.It consists in moving an operation forwards and backwards in a critical block as much as possible provided that the result still constitutes a feasible solution.
Let / ¼ ðs; rÞ be a solution, let b 2 B C max ð/Þ be a makespan-critical block for / and let o 2 b be an operation in that block.We define the minimal feasible insertion position of o in b as the earliest position where o can be inserted in r so o is still in the block and the resulting solution maintains feasibility, that is: where o f denotes the first operation in block b according to r. Analogously, we can define the maximal feasible insertion position of o in b as the latest position where o can be inserted in r so o is still in the block and the resulting solution maintains feasibility, that is: where o l denotes the last operation in block b according to r.Having defined these indices, the second neighbourhood structure N MCOI is as follows: Definition 2 Makespan-critical operation insertion neighbourhood.
We now study under which circumstances it is possible to get closer to an optimal solution using this neighbourhood.
Lemma 2 Let / opt ¼ ðs / opt ; r / opt Þ be an optimal solution and let / ¼ ðs; rÞ be a non-optimal solution such that c E p ð/ opt Þ\ E c E p ð/Þ.If the resource assigned to every makespan-critical operation in / coincides with the resource assigned to that operation in the optimal solution, i.e. s / opt ðoÞ ¼ s / ðoÞ; 8o 2 T C max ð/Þ, then there exists a neighbouring solution / 0 2 N MCOI ð/Þ that is closer to / opt in the sense that dð/ 0 ; / opt Þ\dð/; / opt Þ.
Proof To start with, notice that 9b 2 B C max ð/Þ and 9o 2 b such that in the optimal solution r / opt ðoÞ\r / opt ðo f Þ or r / opt ðoÞ [ r / opt ðo l Þ, with o f and o l the first and last tasks in the block b.Indeed, suppose by contradiction that for every makespan-critical block in / it holds that every operation o 2 b is still between the first o f and the last o l operations of the block in the optimal solution, that is, Then, it is possible to obtain r / opt from r / by exchanging operations inside the critical blocks.However, swaps inside critical blocks do not improve the makespan, and, in consequence, We know that there exists at least one feasible insertion position i\r / ðo Ã Þ for o Ã in r such that o Ã is still in the block, because it is always feasible to swap the positions of two adjacent critical tasks and o Ã 6 ¼ o f .Therefore, we can take the earliest of these feasible insertion positions i Ã ¼ minBIð/; oÞ and define / 0 ¼ ðs; r ðo Ã ;i Ã Þ Þ.
To prove that the dð/ 0 ; / opt Þ\dð/; / opt Þ we show that every operation u in the block that was originally between the insertion position i Ã and the original position of o Ã , i.e., i Ã r / ðuÞ\r / ðo Ã Þ, u is scheduled in the optimal solution after o Ã , i.e. r / opt ðo Ã Þ\r / opt ðuÞ.By contradiction, if this were not true, there would exist an operation u 2 b such that r / opt ðuÞ r / opt ðo Ã Þ and i Ã r / ðuÞ\r / ðo Ã Þ.Given that r / opt ðo Ã Þ\r / opt ðo f Þ, this would mean that r / opt ðuÞ\r / opt ðo f Þ and i Ã r / ðuÞ\r / ðo Ã Þ, but this contradicts the fact that o Ã is the first operation in b that can be scheduled before o f .In practice, checking feasibility for every possible insertion position can be time consuming.This is also the case for the neighbourhood for deterministic job shop based on insertion proposed in Dell' Amico and Trubian (1993).Their solution to improve computational efficiency is to rely on a sufficient condition that guarantees that no unfeasible neighbours are generated.Although this results in discarding some feasible neighbours, they are non-improving ones and this happens with very small probability.We now generalise the sufficient condition to the case where both recirculation due to flexibility and fuzzy uncertainty are present.
Lemma 3 Let / ¼ ðs; rÞ be a feasible solution, let b 2 B C max ð/Þ be a critical block with more than one operation so b ¼ ðb 1 ; b 2 ; o; b 3 Þ where b 1 ; b 2 ; b 3 are subsequences of operations with b 1 and b 3 possibly empty and b 2 containing at least one element, and let i ¼ min u2b 2 r / ðuÞ.Then, / 0 ¼ ðs; r ðo;iÞ Þ is feasible if: Proof The solution / 0 that results from inserting o right before b 2 is unfeasible if any of the two following conditions hold: 1. o is scheduled before a predecessor in its job.
2. There exists an subsequence of operations in r going from the successor in the job JS(u) of some operation u in b 2 to JP(o), the predecessor in the job of o.
It is clear that (25) guarantees that the unfeasibility condition 1 does not occur, since it avoids moving o before any other operation in its job.Now, if (25) holds, i is an unfeasible insertion position only if condition 2 holds.In other words, there exists u 2 b 2 such that JSðuÞ is completed before JPðoÞ starts being processed, that is, b c / ðJSðuÞÞ " b h / ðJPðoÞÞ.However, if (26) holds, this is not possible, so it cannot be the case that i is an unfeasible insertion position.
The sufficient conditions for feasibility in Lemma 3 suggest redefining the minimal and maximal insertion position for a more efficient neighbourhood in the following way.Let / ¼ ðs; rÞ be a solution, let b 2 B C max ð/Þ be a makespan-critical block for / and let o 2 b be an operation in that block.We define the minimal surely feasible insertion position of o in b as the earliest position where o can be inserted in r so o is still in the block and the sufficient conditions for feasibility ( 25) and ( 26) hold, that is: These new indices allow us to define the reduced neighbourhood structure N MCOI r as follows: Definition 3 Reduced makespan-critical operation insertion neighbourhood The property from Lemma 2 still holds for this reduced variant.
Lemma 4 Let / opt ¼ ðs / opt ; r / opt Þ be an optimal solution and let / ¼ ðs; rÞ be a non-optimal solution such that c E p ð/ opt Þ\ E c E p ð/Þ.If the resource assigned to every makespan-critical operation in / coincides with the resource assigned to that operation in the optimal solution, i.e. s / opt ðoÞ ¼ s / ðoÞ; 8o 2 T C max ð/Þ, then there exists a neighbouring solution / 0 2 N MCOI r ð/Þ that is closer to / opt in the sense that dð/ 0 ; / opt Þ\dð/; / opt Þ.
Proof It suffices to show that the sufficient conditions for feasibility ( 25) and ( 26) always allow to swap two adjacent critical operations u and o in a critical block b 2 B C max ð/Þ; then, the proof of Lemma 2 is applicable to the reduced neighbourhood.
The first condition ( 25

Neighbourhood aimed at reducing active energy
Active energy consumption can only be reduced in terms of E by moving operations to a more energy-efficient resource.This is the rationale behind the last intermediate neighbourhood, which performs reassignment moves to relocate non-critical operations to resources where they incur in a lower active energy consumption.
Definition 4 Operation power-efficient resource reassignment neighbourhood N OPERR ð/Þ ¼ fðs ðo;rÞ ; rÞ : Notice that this neighbourhood contains only feasible solutions, since the only change with respect to the feasible solution / is the reassignment of an operation o to a resource in RðoÞ.
It is also possible to prove that, under certain circumstances, there is a move corresponding to N OPERR ð/Þ which brings / closer to a given optimal solution.
Lemma 5 Let / opt ¼ ðs / opt ; r / opt Þ be an optimal solution and let / ¼ ðs; rÞ be a non-optimal solution such that all makespan-critical operations are already assigned to the same resource as in Then there exists a neighbouring solution / 0 2 N OPERR ð/Þ that is closer to / opt in the sense that dð/ 0 ; / opt Þ\dð/; / opt Þ.
Proof First we notice that there exists at least a non-critical operation o 6 2 T C max ð/Þ that is assigned to different resources in / and / opt .Indeed, given that all critical operations are already in the same resource as in / opt , if all non-critical operations were also in the same resource as in / opt then it would not be possible that c Take o Ã one of the non-critical operations assigned to different resources in / and / opt and take / 0 ¼ ðsðo Ã ; rÞ; rÞ with r ¼ s / opt ðo Ã Þ the solution that results from / by reassignment of o Ã to the resource where it is processed in the optimal solution.Clearly, / 0 2 N OPERR ð/Þ and dð/ 0 ; / opt Þ\dð/; / opt Þ.

Neighbourhood aimed at reducing total energy consumption
We are now in condition to define a neighbourhood structure Nð/Þ as the union of the three intermediate neighbourhoods Given that Nð/Þ is the union of feasible neighbourhoods, it must also be feasible.Also, we can show that the connectivity property holds for this neighbourhood.
Theorem 1 The neighbourhood for total energy consumption verifies the connectivity property, that is, starting from any non-optimal feasible solution / it is possible to build a finite sequence of transitions of N leading to an optimal solution.
Proof Let / opt be an arbitrary optimal solution.We need to find a finite sequence of solutions / 0 ; . ..; / n such that To this end, for k !0 we take / kþ1 2 Nð/ k Þ according to the following schema: First, notice that none of the above conditions holds for a given / k , this means that we have reached an optimal solution.Indeed, if none of the above hold, it must be case that c Due to the linearity of the expected value and the definition of Eð/ opt , that is, / k is an optimal solution (even if it may not be / opt ).
Second, we can be sure that the sequence will finish in a finite number of steps.Indeed, the distance dð/ 0 ; / opt Þ between the initial and the optimal solution / opt is a finite number.Now, at step k, if none of the conditions to select / kþ1 hold, the sequence finishes and / k is an optimal solution.Otherwise, a new solution / kþ1 is chosen from Nð/ k Þ according to one of Lemmas 1, 4 or 5, so it always holds that dð/ kþ1 ; / opt Þ\dð/ k ; / opt Þ.That is, at each step, either we find an optimal solution or the distance between the next solution in the sequence and the optimal solution decreases.Hence, if an optimal solution has not been found earlier, after at most n ¼ dð/ 0 ; / opt Þ steps it must be the case that dð/ n ; / opt Þ ¼ 0, that is, / n ¼ / opt is optimal and the sequence finishes.

The memetic algorithm
As mentioned at the beginning of this section, the neighbourhood structure Nð/Þ is used in a tabu search procedure which is combined with an evolutionary algorithm to yield the memetic algorithm from Garcı ´a Go ´mez et al. (2022).The pseudocode of the resulting method can be seen in Fig. 1 The evolutionary algorithm is composed of a population of solutions that, in each iteration, is replaced by a new one obtained by combining its individuals.To do so, individuals are randomly matched, giving everyone an equal chance to reproduce, and each pair is combined by means of a crossover operator that generates two offspring.The new population is generated by a tournament such that the best two individuals are chosen from each pair of parents and their two offspring.To encode the solutions, we use the tuple of sequences ðs; rÞ and to decode them, we assign to each operation the earliest starting time such that the order defined by r is not altered.To ensure enough diversity the initial population is generated randomly.A key component here is the crossover operator.We use the extension of the Generalized Order Crossover (GOX) proposed in Garcı ´a Go ´mez et al. ( 2021).Because we use a tournament, this operator is applied unconditionally.We do not make use of any mutation operators because it is incorporated in the local search explained below.
The other component of the memetic algorithm is the local search.In our proposal, all offspring generated at each iteration of the evolutionary algorithm are improved using tabu search with Nð/Þ before the tournament is applied.Tabu search is a local search algorithm that keeps a memory structure, called tabu list, where it stores a trace of the recently visited search space (Gendreau and Potvin 2019, Chapter 2).In particular, to avoid undoing recently made moves, we store in the tabu list the inverse of the moves performed to obtain the neighbours.Thus, at each iteration the tabu search selects the best neighbour in the neighbourhood that is not obtained with a tabu move.Our tabu list has a dynamic size, similar to the one introduced in Dell' Amico and Trubian (1993), so the size of the list can vary between a lower and an upper bound.When the selected neighbour is worse (resp.better) than the current solution and the upper (resp.lower) bound has not been reached, the list's size increases (resp.decreases) in one unit.If the selected neighbour is the best solution found so far, the list is cleared; this is similar to restarting the search from this solution.We also incorporate an aspiration criterion, so a tabu move can be executed if it improves the best solution found up to this moment.In the rare situation that all neighbours are tabu, we choose the best one, clear the tabu list and slightly change its bounds by picking a random number within a given range.
As neighbour evaluation is the most time-consuming part of the local search, we make use of a filtering mechanism to discard uninteresting solutions.This mechanism consists in evaluating the neighbours following the order defined by a lower bound, and stopping as soon as this lower bound is bigger than the exact value of any of the already evaluated solutions.Here, we adopt the lower bound for the total energy consumption proposed in Garcı ´a Go ´mez et al. ( 2023).

Experimental results
The objective of the experimental study is twofold.On the one hand, to empirically measure the benefits of the stack model over the gaps model for fuzzy total energy computation.On the other hand, to compare our algorithm with the state of the art to check the behaviour of the proposed neighbourhood.
In parameter tuning, have defined the parameters of the algorithm in terms of the instances' characteristics.First, we consider the flexibility of the instances in the form: We also take into account the ratio jOj=jRj because having high flexibility but few resources will make it harder to find a good schedule.We combine both flexibility and ratio operations to resources in the following single value: where be represents the nearest integer function.This value is used to parameterise the algorithm as summarised in Table 2.
All results have been obtained in a Linux machine with two Intel Xeon Gold 6132 processors without Hyper-Threading (14 cores/14 threads) and 128GB RAM using a parallelized implementation of the algorithm in Rust.The source code together with detailed results and benchmark instances can be found at https://pablogarciagomez.com/ research.

Models comparison
In this section, we compare the stack model with the gaps model using the metrics defined in Sect.2.4.We have claimed that the stack model is better because it does not add any extra uncertainty due to the avoidance of the subtraction operation between fuzzy numbers needed to compute the idle times (gaps) of resources.Although the reasoning behind this fact has already been detailed, this can mean nothing to the search process.It could even happen that a more uncertain model, when considering real and deterministic scenarios, had a better behaviour.For this reason, we propose two types of comparisons: a priori and a posteriori.
A priori comparisons are conducted on random solutions with the aim of measuring the advantages of the model without the possible influence of the solver.A posteriori comparisons, as the name suggests, compare the performance of the models after being used on a search algorithm, showing how good they are at guiding the search.It is important to highlight that a posteriori comparisons check the performance within a specific algorithm, so results may differ when using the models in another algorithm.
Specifically, for a priori comparisons we use 30 random solutions, obtained with the same procedure employed to generate the initial population of the memetic algorithm, probably the naivest algorithm to generate random solutions because it only supposes that operations are started as soon as possible.Conversely, in a posteriori comparisons, we use two different sets of solutions, obtained by independently using each model in our algorithm.We can expect that the algorithm obtains solutions ''adapted'' to the inner workings of the models so results may differ with respect to a priori comparisons.
Inspired by the metrics, we start comparing the models by means of the fuzzy values of the objective function, and then we compare the performance of the solutions when they are tested on crisp scenarios.For the latter comparisons, we will use a unique set of 1000 crisp possible scenarios S derived from the fuzzy instances for both models.These samples are generated by taking a random value for the processing time of operations in resources using a uniform distribution within the range of the TFNs.Arguments for choosing such uniform distribution can be found in Palacios et al. (2017) and references therein.
To illustrate the study, we mainly use charts and figures.Nevertheless, we provide as supplementary material detailed tables with all the data obtained in the experiments.

Comparisons based on fuzzy values
Figure 2 illustrates the better performance of the stack model compared to the gaps model in terms of the expected value E½E of the fuzzy total energy consumption, both in the a priori (31% lower on average) and a posteriori (24% lower) comparisons.In Fig. 2b, we can also appreciate some dependency with the flexibility of instances.This can be better seen in Fig. 3 where the improvement of a posteriori mean E½E values w.r.t. a priori ones is depicted for both models.It is clear that, the bigger flexibility the greater the improvement that this behaviour is produced by the algorithm, because in a priori comparisons the expected value is similar across instances with the same size.This shows that the neighbourhoods designed to cope with flexibility are doing their work.Moreover, comparing Fig. 2a with Fig. 2b we can appreciate that the gaps model is having more improvement.Although it may be seen as an advantage in favour of the gaps model, it is not, because in Fig. 2b its expected value is still higher.The explanation could be that in random solutions the results are much worse for the gaps model, and so when embedding the model in an algorithm there is much more margin for improvement.
Regarding MVP, negative values in Fig. 4 indicate that in both models and both comparisons, the modal value is deviated to the left side of the TFNs, that is, the uncertainty is larger in upper values.Little changes can be observed on MVP values in the a posteriori evaluation.In the gaps model, the larger uncertainty can be explained by the truncation of negative values needed to avoid negative, so inconsistent, values in the fuzzy subtraction used to compute idle times of resources.It seems that this effect remains throughout the search.
Regarding the spread S, the TFNs obtained across a priori solutions with the gaps model are on average 11.5 times wider than the TFNs obtained with the stack model (with a 0.33 standard deviation).The difference in the a posteriori comparisons is reduced, so the gaps model results in TFNs which are on average 6.5 times wider than the ones found with the stack model (with 0.58 standard deviation).Even being large, the reduction of the spread is significant; this reflects that our algorithm has been able to overcome the shortcomings of the gaps model to obtain solutions with a more reasonable spread.This huge difference and the reduction of the spread are depicted in Fig. 5 for instance 18a, with the other instances behaving similarly.Be aware of the differences in scale in the axis.As in both models it is guaranteed that the energy values of crisp scenarios are within the interval defined by the TFNs, having wider TNFs means that the model is providing a larger spread than necessary.

Comparisons based on crisp scenarios
Regarding the used uncertainty, although the better performance of the stack model was expected by the previous results, UU values depicted in Fig. 6 illustrate that only 1:5% (a priori) and 3:6% (a posteriori) of the spread are mostly used for the gaps model solutions.This value is near 23% in the solutions a posteriori with the stack model.Notice that UU values are highly dependent on the way crisp scenarios are generated.Both models improve in this area in a posteriori results with respect to the a priori ones.We can also appreciate a clear increase in UU values when the flexibility on the instances also increases.
Figure 5 also allows a better display of the used uncertainty.There is only one figure for the a priori comparison because the set of random solutions used for a  priori comparisons is the same for both models and they are equivalent in the deterministic setting.It is very clear how the scenarios are inside the support of the TFN both for the gaps and the stack model but the stack model supposes a major reduction in uncertainty, especially in the upper range.Moreover, we can appreciate how the possible scenarios are centred inside the support in the case of the stack model but this does not happen for the gaps model.The conclusions are the same in the a posteriori situation, but we can see more clearly the differences between the models.
Regarding the relative distance to the expected value, RDEV, Fig. 7 clearly shows that, in absolute values of RDEV, in the stack model the deterministic values are In addition to the above measures, we also check which model is better considering the average value for the total energy consumption in the crisp scenarios.This analysis could not be done a priori because the set of randomly generated solutions is the same for both methods and as they are equivalent in a crisp setting, values are the same.Results are shown in Fig. 8. is clear that the stack model obtains better results, as its boxplots are significantly below the gaps model ones.Moreover, the distance between models is increased with the flexibility of the instances.It is also clear that the gaps model is more stable because its boxes are narrower.The conclusion is that the stack model helps the algorithm to guide the search more effectively.

Comparisons based on CPU times
Moreover, the stack model has another major advantage, its speed, as can be checked in Fig. 9 that compares the time consumed by the algorithm with each model.As we explained before, neighbour evaluation in the local search is very time-consuming and for this reason we use a lower bound as a filter to discard bad solutions without evaluating them.However, in the case of the gaps model there is no such lower bound in the literature and it is not trivial to find one so it is making use of the more expensive exact evaluation and this directly translated into a higher use of CPU time.

Comparison with the state of the art
To compare our algorithm with the state of the art, the experiments have been made using the same model of fuzzy total energy, the same base implementation and have been run on the same machine, so they are comparable both in terms of solution quality and in time.In table Table 3 we can see a comparison between our algorithm (named RMA from now on), SMA from Garcı ´a Go ´mez et al. ( 2022) that proposes an algorithm very similar to ours but that makes use of a non-connective neighbourhood, and EMA from Garcı ´a Go ´mez et al. ( 2023) which, to the best of our knowledge, represents the state of the art.The first column contains the instance name.The group of next three columns contain the mean and best values over 30 executions for the total energy consumption and the CPU time employed on average per run of our proposal RMA.The next group of three columns contains the relative improvement of RMA with respect to SMA for the mean and best values for the energy and the CPU time.Finally, the last group of tree columns contain the same value with respect to EMA.In Fig. 10 we show boxplots for the values of the energy consumption in the 30 executions that better illustrate the differences between the algorithms.
Compared to SMA our algorithm gives results that quality-wise are not significantly different according to paired t-test (results are normally distributed according to Shapiro-Wilk test).Differences between the two algorithms concentrate on instances with the lower flexibility (in which SMA seems to work better) and those with higher flexibility (in which RMA gives better results).However, our algorithm uses 46% less CPU time to obtain the solutions, in consequence RMA can be considered better than SMA.Compared to EMA, it is behind in almost all cases in what quality of solutions is concerned, however, results are in any case very close as shown in the boxplots.Nevertheless, again, we have one major advantage over it, a reduction of CPU time of almost a 30%.Combining both results RMA can be considered competitive.It is worth noting that EMA is much more sophisticated than RMA as it has mechanisms to better balance the exploration and exploitation as well as adaptive parameters, so surpassing it in the quality of solutions was not expected.As conclusion, our proposal seems to be better suited to CPU-constrained applications.

Conclusions
In this paper we have worked on a model to minimise the energy consumption in a flexible job shop in an uncertain setting.This is a very important scheduling problem due to its relevance in manufacturing and engineering problems, in special when considering uncertainty, as it constitutes one of the most important sources of disruptions when applying theoretical models in real life.Our modelling of the processing times using fuzzy numbers allows the model to be easy to understand, while at the same time gives algorithms the right amount of information to achieve good solutions in a fair amount of time.
Finding a good model is not an easy task, and cannot be done without analysing its advantages and possible drawbacks.For this reason, a set of metrics has been proposed.Using these metrics, we have compared our proposal to the direct translation of the crisp model for the total energy consumption, allowing us to evaluate their characteristics and conclude the superiority of the one we propose, not only for its higher performance in fuzzy measures but also because its better behaviour when considering real scenarios.The main defining characteristic of this model is its ability to keep uncertainty under control, allowing algorithms not only to obtain better results, but also results that are useful and do not introduce extra noise.
Moreover, to integrate the model into search algorithms, we have proposed a neighbourhood that guarantees feasibility and connectivity.This claim has been mathematically demonstrated and, in addition, it has been tested in a memetic algorithm, achieving results comparable to the state of the art, even using much simpler search strategies.
As future work, we intend to combine the energy consumption minimization objective with more productionrelated measures with the aim of finding a balance between productivity and sustainability.In addition, in the industry it is common to have further constraints on how energy can be consumed, for example, a power threshold may exist that cannot be surpassed or there may be a maximum energy budget.The current model can be extended to consider such variants and allow its applicability to different scenarios.
and this can be used to rank any two TFNs b a and b b as follows: b a E b b if and only if E½b a E½ b b ð6Þ Accordingly, we will write b a\ E b b when E½b a\E½ b b.In addition, we consider partial order relations based on precedence, so for any pair of two TFNs b a and b b: b a 0 b b if and only if a i \b i 8i 2 f1; 2; 3g and ð26Þ hold for ðs; r ðo;iÞ Þg ð27Þ where o f and o l denote, respectively, the first and last operations in block b according to r. Analogously, we can define the maximal surely feasible insertion position of o in o: maxBI r ð/; oÞ ¼ maxfi : rðoÞ\i rðo l Þ; ð25Þ and ð26Þ hold for ðs; r ðo;iÞ Þg ) holds trivially for swaps because by definition a critical block cannot contain two consecutive operations of the same job.Also, since u and o are consecutive and belong to the same block, we have that b c / ðJPðoÞÞ 6 # b c / ðuÞ because, if this were not the case, u would not affect the starting time of o (contradicting the definition of critical block).This together with: b h / ðJPðoÞÞ " b c / ðJPðoÞÞ and b c / ðuÞ " b c / ðJSðuÞÞ yields b h / ðJPðoÞÞ 6 # b c / ðJSðuÞÞ so the sufficient condition (26) holds.

Fig. 2
Fig. 2 E½E comparisons.The dark grey values represent the stack model and the light grey values, the gaps model

Fig. 3
Fig. 3 Comparison between a priori and a posteriori expected values.The dark grey corresponds to the stack model and the light grey to the gaps model

Fig. 4
Fig. 4 MVP comparison.The dark grey corresponds to the stack model and the light grey to the gaps model

Fig. 6
Fig. 6 UU comparison.The dark grey corresponds to the stack model and the light grey to the gaps model

Fig. 8
Fig. 8 Comparison of the total energy consumption in crisp scenarios.The dark grey corresponds to the stack model and the light grey to the gaps model

Table 1
List of symbols Symbol Description ðoÞ be the resource it is assigned to in / and let c s / ðoÞ and c c / ðoÞ ¼ c s / ðoÞ þ b pðo; s / ðoÞÞ be, respectively, its starting and completion times in the solution /.Then, solution / is feasible if all constraints hold, that is, for any pair of operations o; u 2 O, precedence constraints hold if c c / ðoÞ " c s / ðuÞ when gðoÞ\gðuÞ; vðoÞ ¼ vðuÞ / ðoÞ " c s / ðuÞ _ c c / ðuÞ " c s / ðoÞ when s / ðoÞ ¼ s / ðuÞ: These can be represented by a global operation processing order r / where the position of operation o in r / is denoted by r / ðoÞ and where r / ðoÞ\r / ðuÞ for any pair of operations o; u 2 O in the same job (vðoÞ ¼ vðuÞ) or in the same resource (s / ðoÞ ¼ s / ðuÞ) such that o is completed before u starts (c c / ðoÞ " c s / ðuÞ).
aims at reducing the passive energy E p and N OPERR ð/Þ, at reducing the active energy E a , they can also affect the other type of energy because they are based on reassignment moves.On the other hand, N MCOI r ð/Þ can only alter the passive energy consumption.

Table 2
Parameters of the memetic algorithm: ev_pop_sz is the size of the population; ev_st_it represents the number of iterations without improvement after which the search will be halted; tb_lst_lbr and tb_lst_ubr correspond to the range of lower and upper bound values for the size of the tabu list; ls_st_it represents the number of iterations after which a run of the tabu search will be stopped