Skip to main content
Log in

A two-level approach to large mixed-integer programs with application to cogeneration in energy-efficient buildings

  • Published:
Computational Optimization and Applications Aims and scope Submit manuscript

Abstract

We study a two-stage mixed-integer linear program (MILP) with more than 1 million binary variables in the second stage. We develop a two-level approach by constructing a semi-coarse model that coarsens with respect to variables and a coarse model that coarsens with respect to both variables and constraints. We coarsen binary variables by selecting a small number of prespecified on/off profiles. We aggregate constraints by partitioning them into groups and taking convex combination over each group. With an appropriate choice of coarsened profiles, the semi-coarse model is guaranteed to find a feasible solution of the original problem and hence provides an upper bound on the optimal solution. We show that solving a sequence of coarse models converges to the same upper bound with proven finite steps. This is achieved by adding violated constraints to coarse models until all constraints in the semi-coarse model are satisfied. We demonstrate the effectiveness of our approach in cogeneration for buildings. The coarsened models allow us to obtain good approximate solutions at a fraction of the time required by solving the original problem. Extensive numerical experiments show that the two-level approach scales to large problems that are beyond the capacity of state-of-the-art commercial MILP solvers.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Similar content being viewed by others

Notes

  1. For the full model, the longest horizon that can be solved is 84 days.

  2. The longest horizon that the full model can be solved for without fixing the first-stage solution is 84 days.

  3. For comparison, the annual discount factor is \(Y^{8760} \approx 97.044\,\%\), which is consistent with the \(3\,\%\) interest rate; and a ten-year discount factor is \(Y^{87600} \approx 74.082\,\%\).

References

  1. Alguacil, N., Motto, A.L., Conejo, A.J.: Transmission expansion planning: a mixed-integer LP approach. IEEE Trans. Power Syst. 18(3), 1070–1077 (2003)

    Article  Google Scholar 

  2. Balas, E.: An additive algorithm for solving linear programs with zero-one variables. Oper. Res. 13(4), 517–546 (1965)

    Article  MathSciNet  MATH  Google Scholar 

  3. Bard, J.F.: Short-term scheduling of thermal-electric generators using Lagrangian relaxation. Oper. Res. 36(5), 756–766 (1988)

    Article  MathSciNet  MATH  Google Scholar 

  4. Barnhart, C., Johnson, E.L., Nemhauser, G.L., Savelsbergh, M.W., Vance, P.H.: Branch-and-price: column generation for solving huge integer programs. Oper. Res. 46(3), 316–329 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  5. Birge, J.R.: Aggregation bounds in stochastic linear programming. Math. Program. 31(1), 25–41 (1985)

    Article  MathSciNet  MATH  Google Scholar 

  6. Birge, J.R., Louveaux, F.: Introduction to Stochastic Programming. Springer, Berlin (2011)

    Book  MATH  Google Scholar 

  7. Clay, R.L., Grossmann, I.E.: A disaggregation algorithm for the optimization of stochastic planning models. Comput. Chem. Eng. 21(7), 751–774 (1997)

    Article  Google Scholar 

  8. Crawley, D.B., Lawrie, L.K., Winkelmann, F.C., et al.: EnergyPlus: creating a new-generation building energy simulation program. Energy Build. 33(4), 319–331 (2001)

    Article  Google Scholar 

  9. Crawley, D.B., Pedersen, C.O., Lawrie, L.K., Winkelmann, F.C.: EnergyPlus: energy simulation program. ASHRAE J. 42, 49–56 (2000)

    Google Scholar 

  10. Edmunds, T.A., Bard, J.F.: An algorithm for the mixed-integer nonlinear bilevel programming problem. Ann. Oper. Res. 34(1), 149–162 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  11. Elhallaoui, I., Villeneuve, D., Soumis, F., Desaulniers, G.: Dynamic aggregation of set-partitioning constraints in column generation. Oper. Res. 53(4), 632–645 (2005)

    Article  MATH  Google Scholar 

  12. Energy Information Administration: Average retail price of electricity, monthly. http://www.eia.gov/electricity/data/browser/#/topic/7?agg=0,1&geo=vvvvvvvvvvvvo&endsec=vg&linechart=~ELEC.PRICE.IL-ALL.M&columnchart=ELEC.PRICE.US-ALL.M&map=ELEC.PRICE.US-ALL.M&freq=M&start=200101&end=201402&ctype=linechart&ltype=pin&rtype=s&maptype=0&rse=0&pin= (2015)

  13. Falgout, R.D.: An introduction to algebraic multigrid. Comput. Sci. Eng. 8(6), 24–33 (2006)

    Article  Google Scholar 

  14. Fisher, M.L.: The Lagrangian relaxation method for solving integer programming problems. Manag. Sci. 27(1), 1–18 (1981)

    Article  MathSciNet  MATH  Google Scholar 

  15. Fourer, R., Gay, D.M., Kernighan, B.W.: AMPL: A Modeling Language for Mathematical Programming. Cengage Learning, Boston (2012)

    MATH  Google Scholar 

  16. Gelman, E., Mandel, J.: On multilevel iterative methods for optimization problems. Math. Program. 48(1–3), 1–17 (1990)

    Article  MathSciNet  MATH  Google Scholar 

  17. Geoffrion, A.M.: An improved implicit enumeration approach for integer programming. Oper. Res. 17(3), 437–454 (1969)

    Article  MATH  Google Scholar 

  18. Geoffrion, A.M.: Lagrangean Relaxation for Integer Programming. Springer, Berlin (1974)

    Book  MATH  Google Scholar 

  19. Glover, F.: Surrogate constraints. Oper. Res. 16(4), 741–749 (1968)

    Article  MathSciNet  MATH  Google Scholar 

  20. Glover, F.: Heuristics for integer programming using surrogate constraints. Decis. Sci. 8(1), 156–166 (1977)

    Article  Google Scholar 

  21. Gratton, S., Sartenaer, A., Toint, P.L.: Recursive trust-region methods for multiscale nonlinear optimization. SIAM J. Optim. 19(1), 414–444 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  22. Hansen, P., Jaumard, B., Savard, G.: New branch-and-bound rules for linear bilevel programming. SIAM J. Sci. Stat. Comput. 13(5), 1194–1217 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  23. Hedman, K.W., Ferris, M.C., O’Neill, R.P., Fisher, E.B., Oren, S.S.: Co-optimization of generation unit commitment and transmission switching with N-1 reliability. IEEE Trans. Power Syst. 25(2), 1052–1063 (2010)

    Article  Google Scholar 

  24. Jain, A.K.: Data clustering: 50 years beyond K-means. Pattern Recognit. Lett. 31(8), 651–666 (2010)

    Article  Google Scholar 

  25. Mathews, G.B.: On the partition of numbers. Proc. Lond. Math. Soc. 1(1), 486–490 (1896)

    Article  MathSciNet  MATH  Google Scholar 

  26. Moore, J.T., Bard, J.F.: The mixed integer linear bilevel programming problem. Oper. Res. 38(5), 911–921 (1990)

    Article  MathSciNet  MATH  Google Scholar 

  27. Pinar, A., Meza, J., Donde, V., Lesieutre, B.: Optimization strategies for the vulnerability analysis of the electric power grid. SIAM J. Optim. 20(4), 1786–1810 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  28. Pruitt, K.A., Braun, R.J., Newman, A.M.: Evaluating shortfalls in mixed-integer programming approaches for the optimal design and dispatch of distributed generation systems. Appl. Energy 102, 386–398 (2013)

    Article  Google Scholar 

  29. Pruitt, K.A., Leyffer, S., Newman, A.M., Braun, R.J.: A mixed-integer nonlinear program for the optimal design and dispatch of distributed generation systems. Optim. Eng. 15, 167–197 (2014)

    Article  MathSciNet  MATH  Google Scholar 

  30. Ren, H., Gao, W.: A MILP model for integrated plan and evaluation of distributed energy systems. Appl. Energy 87(3), 1001–1014 (2010)

    Article  Google Scholar 

  31. Rogers, D.F., Plante, R.D., Wong, R.T., Evans, J.R.: Aggregation and disaggregation techniques and methodology in optimization. Oper. Res. 39(4), 553–582 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  32. Scaparra, M.P., Church, R.L.: A bilevel mixed-integer program for critical infrastructure protection planning. Comput. Oper. Res. 35(6), 1905–1923 (2008)

    Article  MATH  Google Scholar 

  33. Siddiqui, A.S., Marnay, C., Bailey, O., Hamachi LaCommare, K.: Optimal selection of on-site generation with combined heat and power applications. Int. J. Distrib. Energy Res. 1(1), 33–62 (2005)

    Google Scholar 

  34. Stadler, M., Marnay, C., Siddiqui, A., Lai, J., Coffey, B., Aki, H.: Effect of heat and electricity storage and reliability on microgrid viability: A study of commercial buildings in California and New York states. Lawrence Berkeley National Laboratory Technical Report LBNL-1334E (2009)

  35. Vicente, L.N., Calamai, P.H.: Bilevel and multilevel programming: a bibliography review. J. Glob. Optim. 5(3), 291–306 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  36. Wen, U.P., Hsu, S.T.: Linear bi-level programming problems—a review. J. Oper. Res. Soc. 42(2), 125–133 (1991)

    MATH  Google Scholar 

  37. Wen, U.P., Huang, A.D.: A simple tabu search method to solve the mixed-integer linear bilevel programming problem. Eur. J. Oper. Res. 88(3), 563–571 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  38. Wen, U.P., Yang, Y.H.: Algorithms for solving the mixed integer two-level linear programming problem. Comput. Oper. Res. 17(2), 133–142 (1990)

    Article  MathSciNet  MATH  Google Scholar 

  39. Wen, Z., Goldfarb, D.: A line search multigrid method for large-scale nonlinear optimization. SIAM J. Optim. 20(3), 1478–1503 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  40. Zipkin, P.H.: Bounds for row-aggregation in linear programming. Oper. Res. 28(4), 903–916 (1980)

    Article  MathSciNet  MATH  Google Scholar 

  41. Zipkin, P.H.: Bounds on the effect of aggregating variables in linear programs. Oper. Res. 28(2), 403–418 (1980)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgments

This material is based upon work supported by the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research, Applied Mathematics program under contract number DE-AC02-06CH11357. We thank the reviewers for their helpful comments. Fu Lin thanks Dr. Ralph Muehleisen for useful discussions on EnergyPlus.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Fu Lin.

Additional information

The submitted manuscript has been created by the UChicago Argonne, LLC, Operator of Argonne National Laboratory (“Argonne”) under Contract No. DE-AC02-06CH11357 with the U.S. Department of Energy. The U.S. Government retains for itself, and others acting on its behalf, a paid-up, nonexclusive, irrevocable worldwide license in said article to reproduce, prepare derivative works, distribute copies to the public, and perform publicly and display publicly, by or on behalf of the Government.

Appendices

Appendix 1: Periodic solutions

In this appendix, we show that the semi-coarse model is equivalent to the fine model under the idealistic assumption that the problem data is periodic and there is no coupling between time periods. Moreover, we show that the coarse model is equivalent to the semi-coarse model if the non-negative weights in the convex combination of constraints form a full rank matrix. This equivalence motivates the use of our algorithm on problems that have “nearly” periodic data.

Let us consider periodic coefficients in the objective function and constraints; that is, we can divide the second-stage data into \(n=N/\delta \) identical parts,

$$\begin{aligned} b = \left( \begin{array}{c}\mathbf{b}\\ \vdots \\ \mathbf{b}\end{array}\right) , \quad c = \left( \begin{array}{c}\mathbf{c}\\ \vdots \\ \mathbf{c}\end{array}\right) , \quad d = \left( \begin{array}{c}\mathbf{d}\\ \vdots \\ \mathbf{d}\end{array}\right) , \quad f = \left( \begin{array}{c}\mathbf {f} \\ \vdots \\ \mathbf {f} \end{array}\right) , \quad A = \left( \begin{array}{c}\mathbf{A}\\ \vdots \\ \mathbf{A}\end{array}\right) , \end{aligned}$$
(6.1)

where \(\mathbf{b}, \mathbf{c}, \mathbf{d}\in \mathbb {R}^\delta \), \(\mathbf{f} \in \mathbb {R}^\gamma \), and \(\mathbf{A}\in \mathbb {R}^{\gamma \times m}\). Similarly, we assume (without loss of generality) that the first-stage decisions impact all n time periods identically. We also assume that the second-stage matrices B, C, and D are block diagonal:

$$\begin{aligned} B = \left[ \begin{array}{ccc} \mathbf{B}&{}&{} \\ &{} \ddots &{} \\ &{}&{} \mathbf{B}\\ \end{array} \right] , \quad C = \left[ \begin{array}{ccc} \mathbf{C}&{}&{} \\ &{} \ddots &{} \\ &{}&{} \mathbf{C}\\ \end{array} \right] , \quad D = \left[ \begin{array}{ccc} \mathbf{D}&{}&{} \\ &{} \ddots &{} \\ &{}&{} \mathbf{D}\\ \end{array} \right] , \end{aligned}$$
(6.2)

where \(\mathbf{B}, \mathbf{C}, \mathbf{D}\in \mathbb {R}^{\gamma \times \delta }\) with \(N = n \delta \) and \(M = n \gamma \).

Lemma 2

Under the periodic data assumption (6.1)–(6.2), there exists an optimal solution to (1.1) that satisfies

$$\begin{aligned} \mathbf{x}^\star = \mathbf{x}_i^\star , \quad \mathbf{v}^\star = \mathbf{v}_i^\star , \quad \mathbf{w}^\star = \mathbf{w}_i^\star , \quad \hbox { for } \; i = 1,\ldots ,n. \end{aligned}$$
(6.3)

Proof

Suppose that \((x^\star ,v^\star ,w^\star )\) is an optimal solution that does not satisfy (6.3). That is, there exist \((\mathbf{x}_q^\star , \mathbf{v}_q^\star , \mathbf{w}_q^\star ) \ne (\mathbf{x}_p^\star , \mathbf{v}_p^\star , \mathbf{w}_p^\star )\) such that \(\mathbf{b}^T \mathbf{x}_q^\star + \mathbf{c}^T \mathbf{v}_q^\star + \mathbf{d}^T \mathbf{w}_q^\star \, \le \, \mathbf{b}^T \mathbf{x}_p^\star + \mathbf{c}^T \mathbf{v}_p^\star + \mathbf{d}^T \mathbf{w}_p^\star \) and \(\mathbf{A}y + \mathbf{B}\mathbf{x}_i + \mathbf{C}\mathbf{v}_i + \mathbf{D}\mathbf{w}_i \le \mathbf{f}\) for \(i=p\), q. Then one can construct another solution by replacing the set of variables \((\mathbf{x}_p^\star , \mathbf{v}_p^\star , \mathbf{w}_p^\star )\) with \((\mathbf{x}_q^\star , \mathbf{v}_q^\star , \mathbf{w}_q^\star )\), and repeat this process until the periodic solution (6.3) is obtained. \(\square \)

From Lemma 2, it follows that the periodic version of (1.1) can be equivalently written as

$$\begin{aligned} \begin{array}{ll} \displaystyle \mathop {\hbox {minimize}}_{\mathbf{v},\mathbf{w},\mathbf{x},y} &{} \displaystyle a^T y + n ( \mathbf{b}^T \mathbf{x}+ \mathbf{c}^T \mathbf{v}+ \mathbf{d}^T \mathbf{w}) \\ \hbox {subject to }&{} \mathbf{A}y + \mathbf{B}\mathbf{x}+ \mathbf{C}\mathbf{v}+ \mathbf{D}\mathbf{w}\le \mathbf {f} \\ &{} y \in \mathbb {Z}_+^m, \; \mathbf{x}\in \{ 0,1\}^\delta \\ &{} \mathbf{v}\in \mathbb {R}^\delta , \; L \mathbf{x}\le \mathbf{v}\le U \mathbf{x}\\ &{} \mathbf{w}\in \mathbb {R}^\delta , \; \mathbf{w}\ge 0 . \end{array} \end{aligned}$$
(6.4)

In other words, it suffices to solve the periodic version of (1.1) with the single period problem (6.4) under condition (6.1)–(6.2), that is, if the data is periodic and if there is no coupling between time periods.

In our algorithm, we obtain the \(\delta \)-profiles in (2.9) for \(\bar{X},\bar{V},\bar{W}\) by solving the following short-horizon problem:

$$\begin{aligned} \begin{array}{ll} \displaystyle \mathop {\hbox {minimize}}_{\mathbf{v}_i,\mathbf{w}_i,\mathbf{x}_i,y} &{} \displaystyle a^T y + \frac{n}{h} \left( \,\, \sum _{i \in \mathcal {D}} (\mathbf{b}^T \mathbf{x}_i + \mathbf{c}^T \mathbf{v}_i + \mathbf{d}^T \mathbf{w}_i) \right) \\ \hbox {subject to }&{} \mathbf{A}y + \mathbf{B}\mathbf{x}_i + \mathbf{C}\mathbf{v}_i + \mathbf{D}\mathbf{w}_i \le \mathbf{f} , \quad i \in \mathcal {D} \\ &{} y \in \mathbb {Z}_+^m, \; \mathbf{x}_i \in \{ 0,1\}^\delta , \quad i \in \mathcal {D} \\ &{} \mathbf{v}_i \in \mathbb {R}^\delta , \; L \mathbf{x}_i \le \mathbf{v}_i \le U \mathbf{x}_i, \quad i \in \mathcal {D} \\ &{} \mathbf{w}_i \in \mathbb {R}^\delta , \; \mathbf{w}_i \ge 0 , \quad i \in \mathcal {D} , \end{array} \end{aligned}$$
(6.5)

where \(\mathcal {D}\) is a small set of periods and h is the number of periods in \(\mathcal {D}\). (A more detailed description of the moving-horizon approach is provided in Sect. 3.4.) Similar to Lemma 2, we can show that the solution of (6.5) is equivalent to (6.4), independent of the choice of \(\mathcal {D}\).

We do not assume uniqueness of the periodic solution. However, since (6.4) and (6.5) are equivalent, we can assume that any solver returns the same solution no matter how we choose \(\mathcal {D}\). Hence, we will assume without loss of generality that a single periodic profile, \(({\bar{X}}, {\bar{V}}, {\bar{W}})\), is used for the semi-coarse model. By construction, we have

$$\begin{aligned} {\bar{X}}\in \{0,1\}^\delta , \quad L {\bar{X}}\le {\bar{V}}\le U {\bar{X}}, \quad {\bar{W}}\ge 0, \quad \hbox {and} \quad \mathbf{A}y + \mathbf{B}{\bar{X}}+ \mathbf{C}{\bar{V}}+ \mathbf{D}{\bar{W}}\le \mathbf{f}. \end{aligned}$$
(6.6)

Substituting \(\mathbf{x}_i = x_{i} {\bar{X}}\), \(\mathbf{v}_i = v_{i} {\bar{V}}\), and \(\mathbf{w}_i = w_{i} {\bar{W}}\) into the periodic version of (1.1) yields the semi-coarse model

$$\begin{aligned} \begin{array}{ll} \displaystyle \mathop {\hbox {minimize}}_{v,w,x,y} &{} \displaystyle a^T y + \sum _{i=1}^{n} \left( x_{i} \mathbf{b}^T {\bar{X}}+ v_{i} \mathbf{c}^T {\bar{V}}+ w_{i} \mathbf{d}^T {\bar{W}}\right) \\ \hbox {subject to }&{} \displaystyle \mathbf{A}y + \left( x_{i} \mathbf{B}{\bar{X}}+ v_{i} \mathbf{C}{\bar{V}}+ w_{i} \mathbf{D}{\bar{W}}\right) \le \mathbf{f}, \quad i=1,\ldots ,n \\ &{} y \in \mathbb {Z}_+^m, \quad x_{i} \in \{ 0,1\}, \quad v_{i} = x_{i}, \quad w_{i} \in [0,1], \quad i=1,\ldots ,n. \\ \end{array} \end{aligned}$$
(6.7)

Proposition 4

The solution of the semi-coarse model (6.7) is the optimal solution of (6.4) under the periodic data assumption (6.1)–(6.2).

Proof

Since \(({\bar{X}},{\bar{V}},{\bar{W}})\) is an optimal profile, that is, the periodic solution of the short-horizon problem (6.5), then setting \(x_{i}=v_{i}=w_{i}=1\) in (6.7) in conjunction with (6.6) reduces the semi-coarse model to the short-horizon problem (6.5) with the optimal profile \(({\bar{X}},{\bar{V}},{\bar{W}})\), which is equivalent to (6.4).

We next consider a convex combination of (row) constraints

$$\begin{aligned} \mathbf{A}y + x_{i} \mathbf{B}{\bar{X}}+ v_{i} \mathbf{C}{\bar{V}}+ w_{i} \mathbf{D}{\bar{W}}\le \mathbf{f}, \quad i = 1,\ldots ,n \end{aligned}$$
(6.8)

to define the coarse model constraints

$$\begin{aligned} \lambda _i^T \mathbf{A}y + x_{i} \lambda _i^T \mathbf{B}{\bar{X}}+ v_{i} \lambda _i^T \mathbf{C}{\bar{V}}+ w_{i} \lambda _i^T \mathbf{D}{\bar{W}}\le \lambda _i^T \mathbf{f} , \quad i = 1,\ldots ,n \end{aligned}$$
(6.9)

where the non-negative weights \(\lambda _i \in \mathbb {R}^\delta \) sum up to 1 for \(i=1,\ldots ,n\). We can easily show that if \(\lambda _i\) in (6.9) is such that \(\varLambda = [\lambda _1 \cdots \lambda _n] \in \mathbb {R}_+^{\delta \times n}\) is a full row-rank matrix, then the set of aggregated constraints (6.9) is equivalent to (6.8). This observation leads to the following result.

Proposition 5

Let the non-negative weights \(\lambda \)’s be such that \([\lambda _1,\ldots ,\lambda _n]\) has full row rank. Then the solution of the coarse model is feasible (hence optimal) to the solution of the semi-coarse model (6.7):

$$\begin{aligned} \begin{array}{ll} \displaystyle \mathop {\hbox {minimize}}_{v,w,x,y} &{} \displaystyle a^T y + \sum _{i=1}^{n} \left( x_{i} \mathbf{b}^T {\bar{X}}+ v_{i} \mathbf{c}^T {\bar{V}}+ w_{i} \mathbf{d}^T {\bar{W}}\right) \\ \hbox {subject to }&{} \displaystyle \mathbf{A}y + x_{i} \lambda ^T_i \mathbf{B}{\bar{X}}+ v_{i} \lambda ^T_i \mathbf{C}{\bar{V}}+ w_{i} \lambda ^T_i \mathbf{D}{\bar{W}}\le \lambda ^T_i \mathbf{f}, \quad i=1,\ldots ,n \\ &{} y \in \mathbb {Z}_+^m, \quad x_{i} \in \{ 0,1\}, \quad v_{i} = x_{i}, \quad w_{i} \in [0,1], \quad i=1,\ldots ,n. \\ \end{array} \end{aligned}$$
(6.10)

Thus, we have shown that if the data is periodic as in (6.1)–(6.2), then the full, semi-coarse, and coarse models are equivalent. Hence, our approach converges in one iteration. Our argument has assumed that there is no coupling between successive periods, resulting in a block-diagonal structure of B, C, and D. In the application of the cogeneration problem in Sect. 3, there exists coupling in time, for example, in the form of storage in the water tanks. In practice, the commercial buildings we consider indeed have periodic diurnal patterns, and hence coupling between successive days is relatively weak. We believe that our approach can be useful in cases where interdaily coupling is small.

Appendix 2: Full model for the cogeneration problem

For the sake of completeness, we describe here our cogeneration model.

Index sets. We use calligraphic upper-case letters for all sets. The set of technologies: batteries, boilers, CHP-SOFC, power SOFC, and water tank storage is denoted by \(\mathcal {J}\). We use batt, boil, pow, chp, and stor for shortcuts. The subset \(\mathcal {J}_g = \{ \hbox {power SOFC, CHP-SOFC} \}\) denotes SOFC generation technologies that require on/off operations at the second stage. Each technology \(j \in \mathcal {J}_g\) has a number of identical units, and the index set is denoted by \(\mathcal {U}_j\). \(\mathcal {T}\) is the index set of time, \(\mathcal {M}\) is the index set of months, and \(\mathcal {T}_m \subset \mathcal {T}\) is the index set of time for each month \(m \in \mathcal {M}\).

Variables. We use lower-case letters to denote variables. The first-stage variables in our model are the number of units of technology \(j \in \mathcal {J}\), which we denote by \(y_j \in \mathbb {Z}_+\). All other variables model operation of the installed units, and they are our second-stage variables. We use the subscript t to indicate the time period: \(b_t\) and \(b_t^\mathrm{IO}\) are the power storage and input/output for batteries, respectively; \(s_t\), and \(s_t^\mathrm{out}\) are the heat storage and output for water tanks, respectively; \(p_{jt}\) and \(q_{jt} \ge 0\) are the power and heat output of technology j, respectively; \(u_t \ge 0\) is the power purchased from the utility and \(u_m^\mathrm{max} \ge 0\) is the maximum power purchased in month m; \(x_{ijt} \in \{0,1\}\) indicates whether unit i of technology j operates in time period t; and \(w_{ijt} \in [0,1]\) is an auxiliary variable to indicate whether unit i of technology j switches from t to \(t+1\). Note that we do not impose a binary constraint on \(w_{ijt}\) because it takes a binary value at the solution due to the switching constraint (7.1g) and the binary constraint \(x_{ijt} \in \{0,1\}\). We use the convention \(t \in \mathcal {T}\), \(j \in \mathcal {J}\), \(i \in \mathcal {U}_j\), \(m \in \mathcal {M}\) unless explicitly mentioned.

Parameters. We use upper-case letters to denote parameters and constants: \(C_j\) is the capital and installation cost of technology j; H is the number of hours in the lifetime of technology (e.g., \(H = 87600\) for a ten-year model); T is the number of hours in the problem horizon; Y is the hourly discount factor with \(3\,\%\) annual interest rate (i.e., \(Y = 1 - 0.03/8760\)); I is the hourly increase factor with \(10\,\%\) annual increase rate (i.e., \(I^{8760} = 1.1\)); \(M_{j}\) is the operation and maintenance cost of technology j; \(P_t\) and \(G_t\) are the price for electricity and natural gas, respectively; \(P_m^\mathrm{max}\) is the peak demand price for power from the utility in month m; \(W_j\) is the cost of switching a unit of technology j on or off; \(S^c_j\) is the thermal capacity per unit for technology j; \(B^c\) is the power capacity per unit for batteries; \(D_t^P\) and \(D_t^Q\) are the power and heat demand in period t, respectively; \(R^\mathrm{min}_j\) and \(R^\mathrm{max}_j\) are the minimum and maximum power output when a unit of technology j is turned on, respectively; \(E_j^P\) and \(E_j^Q\) are the power and thermal efficiency of technology j, respectively; and \(L^P\) and \(L^Q\) are the average power loss in battery and heat loss in water tank storage, respectively.

Cost function. We now formulate the complete MILP model for the cogeneration problem in (7.1). The objective function consists of two parts: the capital and installation cost in the first stage and the operation cost in the second stage. The operation cost includes the peak power usage, operation and maintenance, switching units, gas, and purchased power costs. We discount the second-stage costs with an hourly discount factor based on a \(3\,\%\) annual interest rate; hence \(Y=1-0.03/8760\). Therefore, the cost incurred in hour t is multiplied by the discount factor \(Y^t\).Footnote 3 The peak demand charge at the end of month m is discounted with \(Y^{t_m}\).We take into account a \(10\,\%\) annually increase of the maintenance and switching costs over time. This is done by multiplying \(I^t\) to cost terms in (7.1a) where \(I = 1 + 1.088 \times 10^{-5}\). To compare cost over different time horizons T, we compute the average hourly cost and multiply the result with the lifetime of technologies, H, resulting in the factor H / T in the second-stage cost in (7.1).

Constraints. The constraints in the MILP model (7.1) can be divided into three groups. The first group of constraints couples first- and second-stage variables; in particular, the number of on-units for fuel cells and the capacity of battery, storage, and boiler are bounded by the number of units purchased in the first stage, as described in (7.1e), (7.1k), (7.1o), and (7.1p), respectively. The second group of constraints couples variables across technologies; in particular, technologies are coordinated to meet the power demand (7.1c) and the heat demand (7.1l). We note that dualizing these constraints results in decoupled variables for each technology; see, for example,  [3, 14]. However, MILP (7.1) does not lend itself to this Lagrangian relaxation approach because of coupling constraints in the third group. This group of constraints couples variables over time periods in the second stage. In particular, the battery and storage constraints (7.1i) and (7.1m) link variables over the entire horizon. The heat storage constraint (7.1m) is a combination of two constraints, namely, the storage equation \(s_{t+1} = (1 - L^Q) s_{t} - s^\mathrm{out}_{t} + E_\mathrm{chp}^Q s_t^\mathrm{in}\) and the upper bound on the heat generated by CHP-SOFC, \(s_t^\mathrm{in} \le p_{\mathrm{chp},t}/E_\mathrm{chp}^P\). Eliminating the heat input \(s_t^\mathrm{in}\) yields (7.1m). In addition, constraint (7.1h), which models the maximum power purchased from the utility in each months, links variables over time instances in each month. Moreover, constraint (7.1g), which models on/off switches of the generation units, couples binary variables \(x_{ijt}\) over two immediate time instances. Boundary conditions (7.1j) and (7.1n) for battery and storage couple variables at both ends of the entire horizon.

We conclude this subsection by explaining the rest of the constraints in (7.1). The number of purchased units is upper bounded in (7.1b). Since all units of the same technology are identical, we introduce a symmetry breaking constraint (7.1f) that states that if unit \(i+1\) is on, then unit i must be on as well. When unit i of technology j is turned on, the power generated \(p_{ijt}\) is bounded by the minimum and maximum capacity in (7.1d). The non-negativity constraint for variables is given by (7.1q).

$$\begin{aligned} \mathop {\hbox {minimize}}\quad&{} \displaystyle \sum _{j \in \mathcal {J}} C_j y_j + \frac{H}{T} \left\{ \sum _{m \in \mathcal {M}} Y^{t_m} P_m^{\mathrm{max}} u_m^{\mathrm{max}}\Bigg /\right. \nonumber \\&\left. + \displaystyle \sum _{t \in \mathcal {T}} Y^t \left[ \sum _{j \in \mathcal {J}_g} ({I^t \cdot M_{j} p_{jt} + \displaystyle \sum _{i \in \mathcal {U}_j} I^ t \cdot W_j w_{ijt}}) + G_t q_{t} + P_t u_t \right] \right\} \end{aligned}$$
(7.1a)
$$\begin{aligned} \hbox {subject to }\quad&y_j \in \mathbb {Z}, ~ 0 \le y_j \le |\mathcal {U}_j| \end{aligned}$$
(7.1b)
$$\begin{aligned}&\displaystyle \sum _{j \in \mathcal {J}_g} p_{jt} + u_t - b_t^\mathrm{IO} \ge D_t^P \end{aligned}$$
(7.1c)
$$\begin{aligned}&\displaystyle R_j^\mathrm{min} x_{ijt} \le p_{ijt} \le R_j^\mathrm{max} x_{ijt}, \quad p_{jt} = \displaystyle \sum _{i \in \mathcal {U}_j} p_{ijt} \qquad j \in \mathcal {J}_g \end{aligned}$$
(7.1d)
$$\begin{aligned}&x_{ijt} \in \{0,1\}, \quad \displaystyle \sum _{i \in \mathcal {U}_j} x_{ijt} \le y_j \qquad j \in \mathcal {J}_g \end{aligned}$$
(7.1e)
$$\begin{aligned}&x_{(i+1)jt} \le x_{ijt} \qquad j \in \mathcal {J}_g, i < |\mathcal {U}_j| \end{aligned}$$
(7.1f)
$$\begin{aligned}&x_{ij(t+1)} - x_{ijt} \le w_{ijt}, \, x_{ijt} - x_{ij(t+1)} \le w_{ijt}, \, 0 \le w_{ijt} \le 1, \; \; \qquad \nonumber \\&\quad j \in \mathcal {J}_g, t < |\mathcal {T}| \end{aligned}$$
(7.1g)
$$\begin{aligned}&0 \le u_t \le u_m^\mathrm{max}\qquad t \in \mathcal {T}_m \end{aligned}$$
(7.1h)
$$\begin{aligned}&b_{t+1} = (1 - L^P) b_{t} + b_t^\mathrm{IO} \qquad t < |\mathcal {T}| \end{aligned}$$
(7.1i)
$$\begin{aligned}&b_1 \,=\, b_{|\mathcal {T}|} \end{aligned}$$
(7.1j)
$$\begin{aligned}&0 \le b_t \le B^c y_\mathrm{batt} \end{aligned}$$
(7.1k)
$$\begin{aligned}&s^\mathrm{out}_{t} + q_{t} \ge D_t^Q \end{aligned}$$
(7.1l)
$$\begin{aligned}&s_{t+1} - (1 - L^Q) s_{t} + s^\mathrm{out}_{t} \le (E_\mathrm{chp}^Q /E_\mathrm{chp}^P) p_{\mathrm{chp},t} \qquad t < |\mathcal {T}| \end{aligned}$$
(7.1m)
$$\begin{aligned}&s_{1} = s_{|\mathcal {T}|} \end{aligned}$$
(7.1n)
$$\begin{aligned}&s^\mathrm{out}_{t} \le s_{t} \le S^c_\mathrm{stor} y_\mathrm{stor} \end{aligned}$$
(7.1o)
$$\begin{aligned}&q_{t} \le S^c_\mathrm{boil} y_\mathrm{boil} \end{aligned}$$
(7.1p)
$$\begin{aligned}&b_t, p_{jt}, q_{t}, s_t, s_t^\mathrm{out}, u_t \ge 0 \end{aligned}$$
(7.1q)

Appendix 3: Tables of numerical results

Table 7 Problem size and AMPL/CPLEX solution information for the cogeneration problem (7.1) for five buildings
Table 8 Problem size and AMPL/CPLEX solution information for the semi-coarse model (9.1) for five buildings
Table 9 Problem size and AMPL/CPLEX solution information for the first iteration of the coarse model (10.1) for five buildings
Table 10 Comparison between the full model (7.1) and the semi-coarse model (9.1) for five buildings
Table 11 Comparison between the full model (7.1) with and without fixing the first-stage solutions from the semi-coarse model (9.1) for five buildings

Appendix 4: Semi-coarse model for the cogeneration problem

$$\begin{aligned} \mathop {\hbox {minimize}}\quad&\displaystyle \sum _{j \in \mathcal {J}} C_j y_j + \frac{H}{T} \left\{ \sum _{m \in \mathcal {M}} Y^{t_m} P_m^\mathrm{max} u_m^\mathrm{max} + \displaystyle \sum _{d} \bar{Y}_d^T \left[ \sum _{j,i,k,l} \bar{p}_{ijdkl} M_{j} \bar{P}_{jkl} \right. \right. \nonumber \\&\quad \left. \left. + \displaystyle \sum _{d,j,i,k} \bar{x}_{ijdk} W_j \bar{W}_{jk} + \sum _{d, k \in \mathcal {P}_q} \bar{q}_{dk} \bar{Q}_{k} + \sum _{d,k \in \mathcal {P}_u} \bar{u}_{dk} \bar{U}_{k} \right] \right\} \end{aligned}$$
(9.1a)
$$\begin{aligned} \hbox {subject to }\quad&y_j \in \mathbb {Z}, ~ 0 \le y_j \le |\mathcal {U}_j| \qquad j \in \mathcal {J}\end{aligned}$$
(9.1b)
$$\begin{aligned}&\displaystyle \sum _{j,i,k,l} \bar{p}_{ijdkl} \bar{P}_{jkl} + \sum _{k \in \mathcal {P}_u} \bar{u}_{dk} \bar{U}_{k} - \sum _{k \in \mathcal {P}_b} \bar{b}_{dk} \bar{B}_{k}^\mathrm{IO} \ge \bar{D}_d^P \end{aligned}$$
(9.1c)
$$\begin{aligned}&\bar{x}_{ijdk} \in \{0,1\}, ~ \sum _{k \in \mathcal {P}_o} \bar{x}_{ijdk} \le 1 \end{aligned}$$
(9.1d)
$$\begin{aligned}&\displaystyle \sum _{i,k} \bar{x}_{ijdk} \bar{X}_{jk} \le y_j \mathbf{1} \end{aligned}$$
(9.1e)
$$\begin{aligned}&\sum _{k \in \mathcal {P}_o} \bar{x}_{(i+1)jdk} \bar{X}_{jk} \le \sum _{k \in \mathcal {P}_o} \bar{x}_{ijdk} \bar{X}_{jk}\qquad i < |\mathcal {U}_j| \end{aligned}$$
(9.1f)
$$\begin{aligned}&\bar{p}_{ijdk} \in [0,1], ~ \sum _{l \in \mathcal {P}_p} \bar{p}_{ijdkl} = \bar{x}_{ijdk}, ~ \sum _{k \in \mathcal {P}_o} \sum _{l \in \mathcal {P}_p} \bar{p}_{ijdkl} \le 1 \end{aligned}$$
(9.1g)
$$\begin{aligned}&0 \le \sum _{k \in \mathcal {P}_u} \bar{u}_{dk} \bar{U}_{k} \le u_m^\mathrm{max} \mathbf{1}\qquad d \in \mathcal {D}_m \end{aligned}$$
(9.1h)
$$\begin{aligned}&\sum _{k \in \mathcal {P}_b} \bar{b}_{(d+1)k} \bar{B}_k(1) = \sum _{k \in \mathcal {P}_b} \bar{b}_{dk} \big [ (1-L^P) \bar{B}_k(\delta ) + \bar{B}_k^\mathrm{IO}(\delta ) \big ]\qquad d < |\mathcal {D}| \end{aligned}$$
(9.1i)
$$\begin{aligned}&\sum _{k \in \mathcal {P}_b} \bar{b}_{1k} \bar{B}_{k}(1) \,=\, \sum _{k \in \mathcal {P}_b} \bar{b}_{|\mathcal {D}|k} \bar{B}_{k}(\delta ) \end{aligned}$$
(9.1j)
$$\begin{aligned}&\sum _{k \in \mathcal {P}_b} \bar{b}_{dk} \bar{B}_k \le B^c y_\mathrm{batt} \mathbf{1} \end{aligned}$$
(9.1k)
$$\begin{aligned}&\displaystyle \sum _{k \in \mathcal {P}_s} \bar{s}_{dk} \bar{S}^\mathrm{out}_{k} + \sum _{k \in \mathcal {P}_q} \bar{q}_{dk} \bar{Q}_{k} \ge \bar{D}_d^Q \end{aligned}$$
(9.1l)
$$\begin{aligned}&\sum _{k \in \mathcal {P}_s} \bar{s}_{dk} \big [ S_\delta - (1-L^Q)I_\delta \big ] \bar{S}_{k} + \sum _{k \in \mathcal {P}_s} \bar{s}_{(d+1)k} E_\delta \bar{S}_{k}\qquad d < |\mathcal {D}| \nonumber \\&\quad + \sum _{k \in \mathcal {P}_s} \bar{s}_{dk} \bar{S}^\mathrm{out}_{k} \le (E_{j}^Q /E_{j}^P) \sum _{i,k,l} \bar{p}_{ijdkl} \bar{P}_{jkl} \qquad j = \mathrm{chp} \end{aligned}$$
(9.1m)
$$\begin{aligned}&\sum _{k \in \mathcal {P}_s} \bar{s}_{1k} \bar{S}_{k}(1) \,=\, \sum _{k \in \mathcal {P}_s} \bar{s}_{|\mathcal {D}|k} \bar{S}_{k}(\delta ) \end{aligned}$$
(9.1n)
$$\begin{aligned}&\displaystyle \sum _{k \in \mathcal {P}_s} \bar{s}_{dk} \bar{S}^\mathrm{out}_{k} \le S^c_\mathrm{stor} y_\mathrm{stor} \mathbf{1} \end{aligned}$$
(9.1o)
$$\begin{aligned}&\displaystyle \sum _{k \in \mathcal {P}_q} \bar{q}_{dk} \bar{Q}_{k} \le S^c_\mathrm{boil} y_\mathrm{boil} \mathbf{1} \end{aligned}$$
(9.1p)
$$\begin{aligned}&\bar{u}_{dk}, ~\bar{b}_{dk}, ~\bar{s}_{dk}, ~\bar{q}_{dk} \in [0,1] \end{aligned}$$
(9.1q)
$$\begin{aligned}&\sum _{k \in \mathcal {P}_u} \bar{u}_{dk} \le 1, \sum _{k \in \mathcal {P}_b} \bar{b}_{dk} \le 1, \sum _{k \in \mathcal {P}_s} \bar{s}_{dk} \le 1, \sum _{k \in \mathcal {P}_q} \bar{q}_{dk} \le 1. \end{aligned}$$
(9.1r)

Appendix 5: Coarse model for the cogeneration problem

$$\begin{aligned} \mathop {\hbox {minimize}}\quad&\displaystyle \sum _{j \in \mathcal {J}} C_j y_j + \frac{H}{T} \left\{ \sum _{m \in \mathcal {M}} Y^{t_m} P_m^\mathrm{max} u_m^\mathrm{max} + \displaystyle \sum _{d} \bar{Y}_d^T \left[ \sum _{j,i,k,l} \bar{p}_{ijdkl} M_{j} \bar{P}_{jkl}\right. \right. \nonumber \\&\quad \left. \left. + \displaystyle \sum _{d,j,i,k} \bar{x}_{ijdk} W_j \bar{W}_{jk} + \sum _{d,k \in \mathcal {P}_u} \bar{u}_{dk} \bar{U}_{k} + \sum _{d, k \in \mathcal {P}_q} \bar{q}_{dk} \bar{Q}_{k} \right] \right\}&\end{aligned}$$
(10.1a)
$$\begin{aligned} \hbox {subject to }\quad&y_j \in \mathbb {Z}, ~ 0 \le y_j \le |\mathcal {U}_j| \qquad j \in \mathcal {J}\end{aligned}$$
(10.1b)
$$\begin{aligned}&\displaystyle \sum _{j,i,k,l} \bar{p}_{ijdkl} \hat{\bar{P}}_{jkl} + \sum _{k \in \mathcal {P}_u} \bar{u}_{dk} \hat{\bar{U}}_{k} - \sum _{k \in \mathcal {P}_b} \bar{b}_{dk} \hat{\bar{B}}_{k}^\mathrm{IO} \ge \hat{\bar{D}}_d^{P} \end{aligned}$$
(10.1c)
$$\begin{aligned}&\bar{x}_{ijdk} \in \{0,1\}, ~ \sum _{k \in \mathcal {P}_o} \bar{x}_{ijdk} \le 1 \end{aligned}$$
(10.1d)
$$\begin{aligned}&\displaystyle \sum _{i,k} \bar{x}_{ijdk} \hat{\bar{X}}_{jk} \le \delta \cdot y_j \end{aligned}$$
(10.1e)
$$\begin{aligned}&\sum _{k \in \mathcal {P}_o} \bar{x}_{ijdk} \hat{\bar{X}}_{jk} \ge \sum _{k \in \mathcal {P}_o} \bar{x}_{(i+1)jdk} \hat{\bar{X}}_{jk}\qquad i< |\mathcal {U}_j| \end{aligned}$$
(10.1f)
$$\begin{aligned}&\bar{p}_{ijdk} \in [0,1], ~ \sum _{l \in \mathcal {P}_p} \bar{p}_{ijdkl} = \bar{x}_{ijdk}, ~ \sum _{k \in \mathcal {P}_o} \sum _{l \in \mathcal {P}_p} \bar{p}_{ijdkl} \le 1 \end{aligned}$$
(10.1g)
$$\begin{aligned}&0 \le \sum _{k \in \mathcal {P}_u} \bar{u}_{dk} \hat{\bar{U}}_{k} \le \delta \cdot u_m^\mathrm{max} \qquad d\in \mathcal {D}_m \end{aligned}$$
(10.1h)
$$\begin{aligned}&\sum _{k \in \mathcal {P}_b} \bar{b}_{(d+1)k} \bar{B}_k(1) = \sum _{k \in \mathcal {P}_b} \bar{b}_{dk} \left( (1-L^P) \bar{B}_k(\delta ) + \bar{B}_k^\mathrm{IO}(\delta )\right) \quad d < |\mathcal {D}| \end{aligned}$$
(10.1i)
$$\begin{aligned}&\sum _{k \in \mathcal {P}_b} \bar{b}_{1k} \bar{B}_{k}(1) \,=\, \sum _{k \in \mathcal {P}_b} \bar{b}_{|\mathcal {D}|k} \bar{B}_{k} (\delta ) \end{aligned}$$
(10.1j)
$$\begin{aligned}&\sum _{k \in \mathcal {P}_b} \bar{b}_{dk} \hat{\bar{B}}_k \le \delta \cdot B^c y_\mathrm{batt} \end{aligned}$$
(10.1k)
$$\begin{aligned}&\displaystyle \sum _{k \in \mathcal {P}_s} \bar{s}_{dk} \hat{\bar{S}}^\mathrm{out}_{k} + \sum _{k \in \mathcal {P}_q} \bar{q}_{dk} \hat{\bar{Q}}_{k} \ge \hat{\bar{D}}_d^Q \end{aligned}$$
(10.1l)
$$\begin{aligned}&\sum _{k \in \mathcal {P}_s} \bar{s}_{dk} (L^Q\hat{\bar{S}}_{k}-\bar{S}_k(1)) + \sum _{k \in \mathcal {P}_s} \bar{s}_{(d+1)k} \bar{S}_{k}(1) \qquad d < |\mathcal {D}| \nonumber \\&+ \sum _{k \in \mathcal {P}_s} \bar{s}_{dk} \hat{\bar{S}}^\mathrm{out}_{k} \le (E_{j}^Q /E_{j}^P) \sum _{i,k,l} \bar{p}_{ijdkl} \hat{\bar{P}}_{jkl} \qquad j = \mathrm{chp}\end{aligned}$$
(10.1m)
$$\begin{aligned}&\sum _{k \in \mathcal {P}_s} \bar{s}_{1k} \bar{S}_{k}(1) \,=\, \sum _{k \in \mathcal {P}_s} \bar{s}_{|\mathcal {D}|k} \bar{S}_{k} (\delta ) \end{aligned}$$
(10.1n)
$$\begin{aligned}&\displaystyle \sum _{k \in \mathcal {P}_s} \bar{s}_{dk} \hat{\bar{S}}^\mathrm{out}_{k} \le \delta \cdot S^c_\mathrm{stor} y_\mathrm{stor} \end{aligned}$$
(10.1o)
$$\begin{aligned}&\displaystyle \sum _{k \in \mathcal {P}_q} \bar{q}_{dk} \hat{\bar{Q}}_{k} \le \delta \cdot S^c_\mathrm{boil} y_\mathrm{boil} \end{aligned}$$
(10.1p)
$$\begin{aligned}&\bar{u}_{dk}, ~\bar{b}_{dk}, ~\bar{s}_{dk}, ~\bar{q}_{dk} \in [0,1]\nonumber \\&\sum _{k \in \mathcal {P}_u} \bar{u}_{dk} \le 1, \sum _{k \in \mathcal {P}_b} \bar{b}_{dk} \le 1, \sum _{k \in \mathcal {P}_s} \bar{s}_{dk} \le 1, \sum _{k \in \mathcal {P}_q} \bar{q}_{dk} \le 1. \end{aligned}$$
(10.1q)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Lin, F., Leyffer, S. & Munson, T. A two-level approach to large mixed-integer programs with application to cogeneration in energy-efficient buildings. Comput Optim Appl 65, 1–46 (2016). https://doi.org/10.1007/s10589-016-9842-0

Download citation

  • Received:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10589-016-9842-0

Keywords

Mathematics Subject Classification

Navigation