SEARCH

SEARCH BY CITATION

Keywords:

  • matheuristics;
  • mixed-integer programming;
  • refinement heuristics;
  • energy management;
  • smart houses

Abstract

  1. Top of page
  2. Abstract
  3. 1. Prologue
  4. 2. Introduction
  5. 3. Our MIP model
  6. 4. A greedy algorithm
  7. 5. Computational results
  8. 6. Conclusions
  9. Acknowledgments
  10. References

In the past years, we have witnessed an increasing interest in smart buildings, in particular for optimal energy management, renewable energy sources, and smart appliances. In this paper, we investigate the problem of scheduling smart appliance operation in a given time horizon with a set of energy sources and accumulators. Appliance operation is modeled in terms of uninterruptible sequential phases with a given power demand, with the goal of minimizing the energy bill fulfilling duration, energy, and user preference constraints. A mixed-integer linear programming (MIP) model and greedy heuristic algorithm are given, which are used in a synergic way. We show how a general purpose (off-the-shelf) MIP-refining procedure can be effectively used for improving, in short computing time, the quality of the solutions provided by the initial greedy heuristic. Computational results confirm the viability of the overall approach, in terms of both solution quality and speed.

1. Prologue

  1. Top of page
  2. Abstract
  3. 1. Prologue
  4. 2. Introduction
  5. 3. Our MIP model
  6. 4. A greedy algorithm
  7. 5. Computational results
  8. 6. Conclusions
  9. Acknowledgments
  10. References

Many successful matheuristic schemes use a black-box mixed integer linear programming (MIP) solver to generate high-quality heuristic solutions for difficult optimization problems. The hallmark of this approach is the availability of an (possibly incomplete) MIP model, and an external metascheme that iteratively solves sub-MIPs obtained by introducing invalid constraints (e.g., variable fixings) defining “interesting” neighborhoods of certain solutions. The goal of the approach is to iteratively refine the incumbent solution, producing a sequence of improved feasible solutions in short (or, at least, acceptable) computing times. The above solution-refinement approach is completely general, that is, it can in principle be applied to the original MIP without the need of ad hoc adaptations.

The evolutionary “polishing method” of Rothberg (2007) is an example of a general MIP-refinement procedure. This method implements an evolutionary metaheuristic to be applied at selected nodes of a branch-and-bound tree. A fixed-size population of feasible solutions is maintained. Iteratively, two or more “parent” solutions are combined with the aim of creating a new “son” member of the population. This is done by fixing all variables whose value coincides in the parent solutions and heuristically solving the resulting sub-MIP by invoking an external MIP solver for a limited number of branch-and-bound nodes. Diversification is guaranteed by performing a classical mutation operation that consists in (i) selecting at random a seed solution in the population, (ii) fixing at random some of its variables, and (iii) heuristically solving the resulting sub-MIP.

Interesting enough for practitioners, an off-the-shelf implementation of the polishing heuristic is available in some commercial MIP solvers, hence it can be readily used. In very difficult cases, however, the approach based on general MIP refinement is not successful, and one tends to design ad hoc matheuristics that exploit the structure of the problem. As a matter of fact, the main issue with the general approach is the lack of good (or even feasible) solutions to refine. In this context, one can argue that ad hoc heuristics and general MIP-refinement procedures are complementary to each other; the former being typically able to find feasible solutions very quickly, whereas the latter can exploit the underlying MIP model to improve them by reaching a quality degree that is difficult to attain otherwise.

In this paper, we show how the application of above scheme can lead to a very effective overall heuristic even in case a very simple greedy is used to feed an off-the-shelf general MIP-refinement module. The resulting “MIP-and-refine” approach is exemplified and tested in the context of smart grid energy management whose underlying MIP models turn out to be very difficult to solve without the hints provided by an external heuristic.

Although we cannot claim deep theoretical contributions, we hope that this paper can be used as a case study by researchers and practitioners working in the field of matheuristics, and the simplicity of the MIP-and-refine approach will make it one of the first options to be tried when approaching a new problem.

2. Introduction

  1. Top of page
  2. Abstract
  3. 1. Prologue
  4. 2. Introduction
  5. 3. Our MIP model
  6. 4. A greedy algorithm
  7. 5. Computational results
  8. 6. Conclusions
  9. Acknowledgments
  10. References

Energy optimization is attracting a great interest among researchers as long as new “smarter” infrastructures and devices are going to replace the traditional ones. The most popular scenario involves a new concept of electrical grid, the “smart grid” that allows to convey a two-way flow of electricity and information between central generators and customers (Fang et al., 2012). Smart grid benefits are fully exploited only if the grid endpoints, home appliances for example, are smart as well. Smart appliances are able to exchange data with the grid, such as dynamic energy prices and grid status. Along with user preferences, this information can be used to optimally manage the energy demand in order to reduce the customer energy bill and prevent major blackouts. A common way of addressing the demand side energy management problem is by solving a scheduling problem involving multiple appliances with different operational constraints, user preferences, renewable energy sources, and batteries.

MIP models from the literature allow an effective mathematical formulation of the appliance scheduling problem. Barbato et al. (2011) also consider photovoltaic (PV) energy, and a linearized description of battery charge states is presented. Sou et al. (2011) provide a detailed MIP formulation of appliance power profiles and operations, and model appliance operations as a set of sequential uninterruptible phases with variable interphase delays. Other authors have investigated variants of the appliance scheduling problem—Hatami and Pedram (2010) by considering the interaction among different users, Zhang et al. (2011) by considering a so-called microgrid, and Agnetis et al. (2011) by addressing additional thermal comfort constraints.

As far as the solution of appliance scheduling problem is concerned, Carpentieri et al. (2012) propose a Linear Programming (LP) rounding heuristic for solving the appliance scheduling problem with the goal of minimizing the maximum peak energy of multiple houses. Taking into account the real parameters, Barbato and Carpentieri (2012) use different heuristics to address the problem of online schedule recovering an off-line schedule.

The rest of the paper is organized as follows. In Sections 'Our MIP model' and 'A greedy algorithm', we describe only two ingredients of our recipe: the MIP model and a simple greedy heuristic, respectively. Computational results are then presented in Section 'Computational results', while some conclusions are drawn in Section 'Conclusions'. The present work is based on the dissertation of the second author (Sartor, 2012).

3. Our MIP model

  1. Top of page
  2. Abstract
  3. 1. Prologue
  4. 2. Introduction
  5. 3. Our MIP model
  6. 4. A greedy algorithm
  7. 5. Computational results
  8. 6. Conclusions
  9. Acknowledgments
  10. References

Following Sou et al. (2011), we model appliance operations as a set of sequential uninterruptible energy phases, each of which uses a total amount of given electric energy. For example, typical washing machine phases are prewash, wash, rinse, and spinning. The set of phases is also called the “power profile” of the appliance.

Depending on the appliance, phase duration may vary, as long as there is an interphase delay (e.g., the spinning of the washing machine must start within 10 minutes of the rinsing being finished). The total energy given for a phase can be evenly distributed over time, or it may vary. We model the latter case with per-phase bounds on the instantaneous power consumption. Besides the intrinsic operational constraints, we allow the user to specify preferences for the time interval in which an appliance should run (e.g., start the washing machine between 4:00 p.m. and 6:00 p.m.).

Following Barbato et al. (2011), we have modeled three classes of energy sources: power grid, domestic renewable energy, and accumulators (batteries). The power grid advertises the maximum amount of available energy (peak power) for each time instant. Note that this peak power can be different from the actual user contract maximum power. In fact, a common feature in the smart grid paradigm is to dynamically advertise (i.e., broadcast) the peak power depending on the grid state, in order to let users adjust their demands for preventing more dangerous power outages. Along with the peak power, the cost of energy also changes with time. For example, in the Italian market it can vary between two values depending on the time of the day and day of the week. More dynamic power grids allow for a finer grain price adjustment (hourly or less).

Domestic renewable energy sources provide free energy but with a limited availability. For example, the performance of a PV plant depends on geographical position, weather conditions, and time. Accumulators allow to store energy (from grid or other sources) when energy price is low, and use it later when energy price is higher. This feature represents an important degree of freedom as far as optimization is concerned. Our model only deals with batteries, viewed as direct electric energy accumulators; however, it can trivially be extended to other types of energy accumulators (e.g., boilers for thermic energy). Finally, the optimization goal is to minimize the total energy cost by finding a proper allocation of all appliance phases.

Given two integers a and b, let inline image denote the discrete set inline image. We discretize the scheduling time horizon into m uniform time slots, indexed by inline image. The phases for each appliance inline image are denoted by inline image. To simplify notation, in what follows, we write inline image instead of inline image, and inline image instead of inline image.

In our model, non-negative continuous variables inline image represent the energy assigned to phase j of appliance i during time slot k. The typical unit for inline image is Watt (W) per time slot (energy). With binary variables inline image, inline image, and inline image, we model the allocation of a time slot k for phase j of appliance i. In particular, inline image iff phase j of appliance i is allocated in time slot k. Variable inline image jumps from 0 to 1 right after the last time slot of where the phase j of appliance i is allocated, and is defined by the equations

  • display math(1a)
  • display math(1b)

Instead, inline image is 1 iff there is an interphase delay between phase inline image and j in time slot k, and is defined as

  • display math

Figure 1 illustrates the meaning of the above variables in a simple case of an appliance with two phases: the first phase is allocated between 2 and 6 hours, and the second between 14 and 16 hours (the day being divided into 12 time slots).

image

Figure 1. Example of binary variables inline image, inline image, and inline image.

Download figure to PowerPoint

Our model also uses non-negative continuous variables inline image and inline image to represent the amount of total energy sold and bought in each time slot k, respectively. Then, if inline image and inline image denote the input cost of bought and sold electricity during time slot k, respectively, our MIP model calls for

  • display math(2)

subject to the following constraints.

Phase energy: It ensures that the energy allocated during phase j of appliance i meets the given phase total energy inline image

  • display math(3)

Energy bounds: It ensures that the energy allocated in phase j for appliance i in any time slot k belongs to the allowed range inline image

  • display math(4)

Power safety: It guarantees that the total energy assigned in time slot k does not exceed the peak power limit

  • display math(5)

where inline image is the peak limit of slot k; this constraint can also be used to model additional unscheduled power demands that reduce the available grid energy in time slot k.

Energy phase duration:

  • display math(6)

where inline image and inline image represent, respectively, the lower and upper bounds on the number of time slots to allocate for phase j of appliance i.

Uninterruptible phase: These constraints ensure that all time slots of phase j are allocated contiguously (i.e., when an energy phase starts, it must finish without interruptions).

  • display math(7)

Recall that inline image is 0 before the last time slot allocated for phase j and appliance i, and becomes 1 afterwards (1a) until the end (1b). Thus, constraint (7) prevents the variable inline image to be 1 after the last-phase time slot.

Sequential processing: Previous energy phase must end before a new one starts

  • display math(8)

Interphase delay duration:

  • display math(9)

where inline image and inline image are the minimum and maximum number of time slots between phases inline image and j of the appliance i.

User time preferences: Disable phase allocation of appliance i in the given time slots

  • display math(10)

where inline image is equal to 0 iff phase j of appliance i cannot be allocated in time slot k.

In order to model batteries behavior, we need two extra binary variables inline image and inline image, where inline image is equal to 1 if the battery is charging in time slot k and 0 otherwise, while inline image is equal to 1 if the battery is discharging in time slot k and 0 otherwise. Moreover, with the non-negative continuous variables inline image and inline image, we describe the charge and discharge rates, respectively, that is the amount of energy that is charged/discharged in time slot k. The total accumulated energy in time slot k is described by the non-negative continuous variable inline image.

Battery usage constraint: The battery cannot charge and discharge at the same time.

  • display math(11)

Battery charge/discharge rate bounds:

  • display math(12a)
  • display math(12b)

where inline image and inline image denote the maximum charge and discharge rates, respectively.

Battery energy function: This is linearization of the actual charge/discharge curves

  • display math(13)

where inline image and inline image are, respectively, the charging and discharging efficiency.

Battery capacity bounds: These are used to limit the energy stored in the battery

  • display math(14)

where inline image and inline image represent the maximum capacity and minimum energy safety value (required, e.g., by lithium batteries).

Balancing constraint: It balances between produced and consumed energy

  • display math(15)

where inline image is the sum of the renewable domestic power sources contribution in time slot k.

4. A greedy algorithm

  1. Top of page
  2. Abstract
  3. 1. Prologue
  4. 2. Introduction
  5. 3. Our MIP model
  6. 4. A greedy algorithm
  7. 5. Computational results
  8. 6. Conclusions
  9. Acknowledgments
  10. References

In this section, we describe a heuristic greedy algorithm for finding good feasible solutions of the described problem, which we apply in a multistart fashion. According to a greedy policy, the algorithm schedule appliances in decreasing priority—once an appliance has been scheduled, it cannot be changed, and all other appliances are allocated on top of the current partial solution. In the first application of the greedy, we use energy requirements as appliance priorities. In the subsequent runs, the priority vector is shifted to generate different solutions. For each appliance, we look for a feasible allocation of its phases according to the following rules. We consider a simplified (more restricted) version of the problem, where the duration inline image (say) of each phase is minimum between inline image and inline image, and bounds (4) become inline image for all k.

Accordingly, every phase has a constant duration and energy consumption, and can be scheduled in the time slots interval inline image where inline image represents the minimum duration of a complete appliance power profile (i.e., without phase delays). To be more specific, once a phase has been allocated, we look for all possible allocations of the next phase in the range given by inline image, see (9), and select the most profitable one. Our allocation procedure enforces the user preferences on time slots (10) and three other constraints: power safety (5), uninterruptible phase (7), and sequential processing (8).

A pseudocode of our heuristic is given in Algorithm 1. We have an external loop (starting after line 1) where appliances i are scheduled one after the other. For each appliance i, we consider all possible “shifts” t for the starting slot of the first phase (line 3), and then consider a straightforward greedy (lines 8–19) to find the best starting slot inline image of all other phases j. Variable inline image gives the first slot k currently available for allocation: it is initialized at line 7 after the allocation of the first phase, then it is updated at line 18 after the allocation of each new phase.

Recall that we consider a simplified phase allocation whose duration inline image is a constant, so the “cost of allocating inline image starting from slot k” at lines 5 and 11 refers to the solution with inline image for all inline image, and also takes user preferences into account.

When all possible shifts t have been tried, inline image gives the cost of the (heuristically) best assignment for all phases of i, the corresponding solution being stored in the incumbent x. At line 27, if no feasible phase allocation was found for appliance i (case inline image), the overall problem is heuristically considered to be infeasible and the greedy is aborted—although this situation can occur if the constraints are very tight, it never occurred in our tests.

According to time complexity, the most time-consuming step is the cost evaluation at line 11, which takes inline image time, where inline image. This step is executed, for each appliance i and each shift t, at most inline image times, where inline image and inline image. As we have N appliances i and inline image possible shifts t, the overall time complexity of our heuristic is inline image.

5. Computational results

  1. Top of page
  2. Abstract
  3. 1. Prologue
  4. 2. Introduction
  5. 3. Our MIP model
  6. 4. A greedy algorithm
  7. 5. Computational results
  8. 6. Conclusions
  9. Acknowledgments
  10. References

In our tests, we considered a time horizon of 24 hours, subdivided in 96 time slots of 15 minutes each. Experiments were grouped into four sets according to two main parameters. The first parameter is the “flexibility” of the “user time preference” constraint. We considered two levels of flexibility, namely, “high flexibility” (HF), which means that the appliance can be scheduled at any time during the day, and “medium flexibility” (MF), which means that appliances can run inside a 12-hour randomly generated time window within the day. The second parameter is electricity cost: it can vary either every 2 hours (BC), or every time slot (TC). For each of the four resulting sets, namely HFBC, HFTC, MFBC, and MFTC, we considered 10, 20, or 30 appliances, respectively, and solved five random instances for each of the 12 combinations—60 instances in total.

image

A constant price of the sold PV energy was considered, which was equal to half of the minimum cost of the bought energy. All the other model parameters were taken from uniform random distributions: inline image, inline image, inline image, inline image, inline image, inline image, inline image, and inline image. For all appliances i, we set inline image for all j, and inline image (if inline image) or inline image (if inline image).

We considered a single renewable PV power source whose provided energy is sampled from a Gaussian distribution inline image with mean inline image (1:00 p.m., the period of maximum production at the latitude of Italy), standard deviation inline image, and maximum value of 1250 W per time slot. The considered battery has a capacity inline image W per time slot and charge/discharge rates inline image W per time slot, with efficiencies inline image.

We compared four different solution approaches, all run in single-thread mode:

  • Greedy-alone: Our stand-alone greedy algorithm without multistart enhancement.
  • Greedy: Our greedy algorithm applied N times by starting from the N possible shifts of the initial priority vector, taking the best solution found and storing the others.
  • CPLEX: The state-of-the-art IBM ILOG CPLEX MIP 12.4 solver used as a black box, with its default setting, stopped as soon as the first feasible solution is found.
  • CPLEX + Polish: CPLEX's polishing refining heuristic (Rothberg, 2007) applied immediately after the root node and for a total of 10 nodes (all cuts disabled), when starting from the feasible solution found by the previous CPLEX algorithm.
  • Greedy + Polish: Our proposed MIP-and-refine scheme, that is, the previous CPLEX + Polish algorithm but starting from the list of all feasible solutions found by Greedy.

Note that the last three methods also return a lower bound on the optimal value hence, as a byproduct, they can provide a proof of optimality in some (easy) cases. This is true, in particular, when the root–node lower bound is very tight and the method starts with an (almost) optimal Greedy solution, meaning that just few branching nodes need to be explored.

According to Table 1, Greedy + Polish outperforms its competitors. As expected, Greedy-alone is always able to provide feasible solutions in very short computing times. In spite of its greedy nature, the solution quality is fair in many cases, in particular in the easiest scenarios where the greedy solution often turns out to be optimal. Nevertheless, for more difficult scenarios, there is room for big improvements—also because of the contribution of batteries that are exploited by the MIP model but not by the greedy.

Table 1. Percentage cost increase (% Incr) with respect to the Greedy-alone algorithm, and computing time (in CPU seconds); a negative increase corresponds to a better solution w.r.t. Greedy-alone
 GreedyCPLEXCPLEX + PolishGreedy + Polish
Set% Incr% STDTime% Incr% STDTime% Incr% STDTime% Incr% STDTime
  1. The reported values are arithmetic means over five random instances. Column % STD gives the percentage standard deviation of cost increase. Computing times for Greedy-alone are just negligible. Superscript k means proven optimality for k of five instances (proof of optimality, when available, being obtained by any of the exact methods).

HFBC 100.0 50.00.5252.9193.456.872.7 295.694.90.0 50.00.6
HFBC 20−0.50.52.450.280.43,054.413.441.23,223.2−9.44.8262.0
HFBC 30−0.60.56.41.84.79,585.8−5.13.49,966.5−6.1 13.2310.2
HFTC 100.0 50.00.494.0129.249.047.0 494.183.40.0 50.00.6
HFTC 20−1.71.22.358.049.92,213.0−1.421.32,387.4−22.2 11.8154.7
HFTC 30−0.60.36.6−12.31.446,439.1−19.02.646,904.7−21.2 12.5617.7
MFBC 100.0 50.00.3157.3 1146.75.238.8 251.415.40.0 50.01.3
MFBC 20−3.02.21.5160.145.935.224.424.290.0−13.87.8100.8
MFBC 30−0.80.53.744.411.565.10.78.3164.5−11.7 14.567.4
MFTC 100.0 50.00.3159.989.55.633.5 124.818.80.0 50.01.5
MFTC 20−1.21.21.554.821.852.5−8.413.6114.2−23.5 12.654.6
MFTC 30−1.00.33.716.224.8117.8−14.06.1232.7−22.01.6112.0

As to CPLEX, it has a great difficulty even in finding its first feasible solution—a task that takes a huge amount of time in the difficult cases. Significantly improved solutions are found by CPLEX + Polish, thus confirming the effectiveness of this heuristic. However, the full power of MIP refinement is only exploited when Greedy + Polish comes into play. This is due to two main factors: the speed of the greedy and the fact that several diversified solutions are passed to the polishing method.

Of course, we cannot claim that Greedy + Polish would outperform more sophisticated heuristic approaches from the literature on similar problems—for that, much more extensive computational comparisons would be needed. However, we believe our computational results support the message of this paper—sound matheuristics can be built around a simple greedy and an off-the-shelf MIP-refinement procedure.

6. Conclusions

  1. Top of page
  2. Abstract
  3. 1. Prologue
  4. 2. Introduction
  5. 3. Our MIP model
  6. 4. A greedy algorithm
  7. 5. Computational results
  8. 6. Conclusions
  9. Acknowledgments
  10. References

A simple MIP-and-refine matheuristic framework has been addressed, where a greedy heuristic is used to trigger a general purpose MIP-refinement procedure. Computational results on a smart grid energy management problem have been presented, showing that the method produces sound results.

The approach is based on two ingredients: an initial heuristic and MIP model. The heuristic need not be very effective, as its role is just to initialize a pool of feasible solutions—the more diversified the better. The MIP model itself need not be very sophisticated, as it is automatically resized by the general purpose MIP-refinement procedure. Nevertheless, the combination of the two can be much more effective than the sum of its parts, in the sense that the two modules work in a highly synergic way and can produce outcomes whose solution quality can only be matched by sophisticated ad hoc heuristics.

Future research on the topic will hopefully confirm the viability of the approach on other classes of very difficult problems.

Acknowledgments

  1. Top of page
  2. Abstract
  3. 1. Prologue
  4. 2. Introduction
  5. 3. Our MIP model
  6. 4. A greedy algorithm
  7. 5. Computational results
  8. 6. Conclusions
  9. Acknowledgments
  10. References

The research of the first author was supported by the “Progetto di Ateneo” on “Computational Integer Programming” of the University of Padova and by MiUR, Italy (PRIN project “Integrated Approaches to Discrete and Nonlinear Optimization”).

References

  1. Top of page
  2. Abstract
  3. 1. Prologue
  4. 2. Introduction
  5. 3. Our MIP model
  6. 4. A greedy algorithm
  7. 5. Computational results
  8. 6. Conclusions
  9. Acknowledgments
  10. References
  • Agnetis, A., Dellino, G., Detti, P., Innocenti, G., De Pascale, G., Vicino, A., 2011. Appliance operation scheduling for electricity consumption optimization. 50th IEEE Conference on Decision and Control and European Control Conference (CDC-ECC), December 12–15, Orlando, FL, pp. 58995904.
  • Barbato, A., Capone, A., Carello, G., Delfanti, M., Merlo, M., Zaminga, A., 2011. House energy demand optimization in single and multi-user scenarios. 2nd IEEE International Conference on Smart Grid Communications, SmartGridComm '11, Brussels, Belgium, October.
  • Barbato, A., Carpentieri, G., 2012. Model and algorithms for the real time management of residential electricity demand. IEEE International Conference and Exhibition, ENERGYCON '12, Florence, Italy, September.
  • Carpentieri, G., Carello, G., Amaldi, E., 2012. Optimization models for residential energy load management. Atti delle Giornate AIRO, Vietri.
  • Fang, X., Misra, S., Xue, G., , 2012. Smart grid—the new and improved power grid: a survey. IEEE Communications Surveys and Tutorials (COMST), 14, 944980.
  • Hatami, S., Pedram, M., 2010. Minimizing the electricity bill of cooperative users under a quasi-dynamic pricing model. SmartGridComm(tm)10, pp. 421426.
  • Rothberg, E., 2007. An evolutionary algorithm for polishing mixed integer programming solutions. INFORMS Journal on Computing, 19, 4, 534541.
  • Sartor, G., 2012. Optimal scheduling of smart home appliances using mixed-integer linear programming. Master's thesis, DEI, University of Padova.
  • Sou, K.C., Weimer, J., Sandberg, H., Johansson, K.H., 2011. Scheduling smart home appliances using mixed integer linear programming. 50th IEEE Conference on Decision and Control and European Control Conference (CDC-ECC), December 12–15, Orlando, FL, pp. 51445149.
  • Zhang, D., Papageorgiou, L.G., Samsatli, N.J., Shah, N., 2011. Optimal scheduling of smart homes energy consumption with microgrid. ENERGY 2011, The First International Conference on Smart Grids, Green Communications and IT Energy-aware Technologies, pp. 7075.