######################################################################## # This code is part of UCP_VALVE tube packing software # # Copyright (C) 2013 # JP Pedroso(*), M Kubo, A Viana # (*) Universidade do Porto, Faculdade de Ciencias # E-mail: . # # UCP_VALVE is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published # by the Free Software Foundation, either version 3 of the License, # or (at your option) any later version. # # UCP_VALVE is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with UCP_VALVE. If not, see . ######################################################################## """ ucp_data.py: data for ucp/load dispatch Based on: [1] Wood A, Wollenberg B. Power Generation, Operation, and Control. New York, NY: John Wiley & Sons; 1984. [2] Kazarlis SA, Bakirtzis AG, Petridis V. A genetic algorithm solution to the unit commitment problem. IEEE Transactions on Power Systems 1996;11:83-92. [3] dos Santos Coelho L, Mariani VC. An efficient cultural self-organizing migrating strategy for economic dispatch optimization with valve-point effect. Energy Conversion and Management 2010;51(12):2580 -7. Defines the following functions for returning UCP data: - kazarlis(times=1): make standard, kazarlis data [2] (no valve-point effect) - eld13(load=1800): load dispatch instance provided by [1] (valve-point effect) - eld40(load=10500): load dispatch instance provided by [3] (valve-point effect) - ucp10(periods): kazarlis data, complemented with parameters for valve effect - ucp5(periods): reduced kazarlis [2] data, complemented with parameters for valve effect - ucp13(periods): costs taken form eld13, with multiperiod data from kazarlis - ucp40(periods): costs taken form eld40, with multiperiod data from kazarlis - toy(periods): make data for toy instance, based on ucp10 """ from gurobipy import * def kazarlis(times=1): """kazarlis(times): make standard, kazarlis data [2] (no valve-point effect) Parameters: - 'times' is 1 for the standard (10 units) instance; 2 for two units of each, ... Returns: tuple (U, T, a, b, c, e, f, p_min, p_max, y_prev, t_cold, n_init, min_on, min_off, a_hot, a_cold, dem, res) where: - U: list of units - T: number of periods - a[u], b[u], c[u]: parameters characterizing unit 'u'; standard cost is: startup cost + a + b p + c p^2; - e[u], f[u]: 0 (valve-effect parameters); if nonzero, cost is: startup cost + a + b p + c p^2 + e sin(f(p_min-p)) - p_min[u], p_max[u]: power range for each unit - y_prev[u]: previous state of each unit - t_cold[u]: periods after which unit is cold - n_init[u]: number of consecutive periods spent on previous state - min_on[u], min_off[u]: minimum periods on (off) after switching on (off) - a_hot[u]: startup cost is hot - a_cold[u]: startup cost is cold - dem[t], res[t]: demand and reserve for period t """ U, a, b, c = multidict({ 1 : [ 1000, 16.19, 0.00048 ], 2 : [ 970, 17.26, 0.00031 ], 3 : [ 700, 16.60, 0.002 ], 4 : [ 680, 16.50, 0.00211 ], 5 : [ 450, 19.70, 0.00398 ], 6 : [ 370, 22.26, 0.00712 ], 7 : [ 480, 27.74, 0.00079 ], 8 : [ 660, 25.92, 0.00413 ], 9 : [ 665, 27.27, 0.00222 ], 10 : [ 670, 27.79, 0.00173 ], }) U, p_min, p_max, y_prev = multidict({ 1 : [ 150, 455, 1 ], 2 : [ 150, 455, 1 ], 3 : [ 20, 130, 0 ], 4 : [ 20, 130, 0 ], 5 : [ 25, 162, 0 ], 6 : [ 20, 80, 0 ], 7 : [ 25, 85, 0 ], 8 : [ 10, 55, 0 ], 9 : [ 10, 55, 0 ], 10 : [ 10, 55, 0 ], }) U, t_cold, n_init, min_on, min_off = multidict({ 1 : [ 5, 8, 8, 8 ], 2 : [ 5, 8, 8, 8 ], 3 : [ 4, 5, 5, 5 ], 4 : [ 4, 5, 5, 5 ], 5 : [ 4, 6, 6, 6 ], 6 : [ 2, 3, 3, 3 ], 7 : [ 2, 3, 3, 3 ], 8 : [ 0, 1, 1, 1 ], 9 : [ 0, 1, 1, 1 ], 10 : [ 0, 1, 1, 1 ], }) U, a_hot, a_cold = multidict({ 1 : [ 4500, 9000 ], 2 : [ 5000, 10000 ], 3 : [ 550, 1100 ], 4 : [ 560, 1120 ], 5 : [ 900, 1800 ], 6 : [ 170, 340 ], 7 : [ 260, 520 ], 8 : [ 30, 60 ], 9 : [ 30, 60 ], 10 : [ 30, 60 ], }) P, dem, res = multidict({ 1 : [ 700, 70 ], 2 : [ 750, 75 ], 3 : [ 850, 85 ], 4 : [ 950, 95 ], 5 : [ 1000, 100 ], 6 : [ 1100, 110 ], 7 : [ 1150, 115 ], 8 : [ 1200, 120 ], 9 : [ 1300, 130 ], 10 : [ 1400, 140 ], 11 : [ 1450, 145 ], 12 : [ 1500, 150 ], 13 : [ 1400, 140 ], 14 : [ 1300, 130 ], 15 : [ 1200, 120 ], 16 : [ 1050, 105 ], 17 : [ 1000, 100 ], 18 : [ 1100, 110 ], 19 : [ 1200, 120 ], 20 : [ 1400, 140 ], 21 : [ 1300, 130 ], 22 : [ 1100, 110 ], 23 : [ 900, 90 ], 24 : [ 800, 80 ], }) for i in range(1,times): for u in U: a[u+10*i] = a[u] b[u+10*i] = b[u] c[u+10*i] = c[u] p_min[u+10*i] = p_min[u] p_max[u+10*i] = p_max[u] y_prev[u+10*i] = y_prev[u] t_cold[u+10*i] = t_cold[u] n_init[u+10*i] = n_init[u] min_on[u+10*i] = min_on[u] min_off[u+10*i] = min_off[u] a_hot[u+10*i] = a_hot[u] a_cold[u+10*i] = a_cold[u] for t in dem: dem[t] *= times res[t] *= times # data for valve effect e,f = {}, {} for u in U: e[u] = 0; f[u] = 0 T = len(P) U = list(a.keys()) return U, T, a, b, c, e, f, p_min, p_max, y_prev, t_cold, n_init, min_on, min_off, a_hot, a_cold, dem, res def eld13(load=1800): """eld13(load): load dispatch instance provided by [1] (valve-point effect) Parameters: - 'load': demand to consider Returns: (see 'kazarlis') """ U, a, b, c, e, f = multidict({ 1 : [ 550, 8.1, 0.00028, 300, 0.035], 2 : [ 309, 8.1, 0.00056, 200, 0.042], 3 : [ 307, 8.1, 0.00056, 200, 0.042], 4 : [ 240, 7.74, 0.00324, 150, 0.063], 5 : [ 240, 7.74, 0.00324, 150, 0.063], 6 : [ 240, 7.74, 0.00324, 150, 0.063], 7 : [ 240, 7.74, 0.00324, 150, 0.063], 8 : [ 240, 7.74, 0.00324, 150, 0.063], 9 : [ 240, 7.74, 0.00324, 150, 0.063], 10 : [ 126, 8.6, 0.00284, 100, 0.084], 11 : [ 126, 8.6, 0.00284, 100, 0.084], 12 : [ 126, 8.6, 0.00284, 100, 0.084], 13 : [ 126, 8.6, 0.00284, 100, 0.084], }) U, p_min, p_max = multidict({ 1 : [ 0, 680 ], 2 : [ 0, 360 ], 3 : [ 0, 360 ], 4 : [ 60, 180 ], 5 : [ 60, 180 ], 6 : [ 60, 180 ], 7 : [ 60, 180 ], 8 : [ 60, 180 ], 9 : [ 60, 180 ], 10 : [ 40, 120 ], 11 : [ 40, 120 ], 12 : [ 55, 120 ], 13 : [ 55, 120 ], }) P, dem= multidict({ 1 : [ load], }) # data for ucp U_, y_prev, t_cold, n_init, min_on, min_off, a_hot, a_cold = multidict({ 1 : [ 1, 0, 1, 2, 1, 0, 0, ], 2 : [ 1, 0, 1, 2, 1, 0, 0, ], 3 : [ 1, 0, 1, 2, 1, 0, 0, ], 4 : [ 1, 0, 1, 2, 1, 0, 0, ], 5 : [ 1, 0, 1, 2, 1, 0, 0, ], 6 : [ 1, 0, 1, 2, 1, 0, 0, ], 7 : [ 1, 0, 1, 2, 1, 0, 0, ], 8 : [ 1, 0, 1, 2, 1, 0, 0, ], 9 : [ 1, 0, 1, 2, 1, 0, 0, ], 10 : [ 1, 0, 1, 2, 1, 0, 0, ], 11 : [ 1, 0, 1, 2, 1, 0, 0, ], 12 : [ 1, 0, 1, 2, 1, 0, 0, ], 13 : [ 1, 0, 1, 2, 1, 0, 0, ], }) res = {1: 0} # data for ucp T = len(P) U = list(a.keys()) return U, T, a, b, c, e, f, p_min, p_max, y_prev, t_cold, n_init, min_on, min_off, a_hot, a_cold, dem, res def eld40(load=10500): """eld40(load): load dispatch instance provided by [3] (valve-point effect) Parameters: - 'load': demand to consider Returns: (see 'kazarlis') """ U, a, b, c, e, f = multidict({ 1 : [ 94.705, 6.73, 0.00690, 100, 0.084], 2 : [ 94.705, 6.73, 0.00690, 100, 0.084], 3 : [ 309.54, 7.07, 0.02028, 100, 0.084], 4 : [ 369.03, 8.18, 0.00942, 150, 0.063], 5 : [ 148.89, 5.35, 0.01140, 120, 0.077], 6 : [ 222.33, 8.05, 0.01142, 100, 0.084], 7 : [ 287.71, 8.03, 0.00357, 200, 0.042], 8 : [ 391.98, 6.99, 0.00492, 200, 0.042], 9 : [ 455.76, 6.60, 0.00573, 200, 0.042], 10 : [ 722.82, 12.9, 0.00605, 200, 0.042], 11 : [ 635.20, 12.9, 0.00515, 200, 0.042], 12 : [ 654.69, 12.8, 0.00569, 200, 0.042], 13 : [ 913.40, 12.5, 0.00421, 300, 0.035], 14 : [ 1760.4, 8.84, 0.00752, 300, 0.035], 15 : [ 1728.3, 9.15, 0.00708, 300, 0.035], 16 : [ 1728.3, 9.15, 0.00708, 300, 0.035], 17 : [ 647.85, 7.97, 0.00313, 300, 0.035], 18 : [ 649.69, 7.95, 0.00313, 300, 0.035], 19 : [ 647.83, 7.97, 0.00313, 300, 0.035], 20 : [ 647.81, 7.97, 0.00313, 300, 0.035], 21 : [ 785.96, 6.63, 0.00298, 300, 0.035], 22 : [ 785.96, 6.63, 0.00298, 300, 0.035], 23 : [ 794.53, 6.66, 0.00284, 300, 0.035], 24 : [ 794.53, 6.66, 0.00284, 300, 0.035], 25 : [ 801.32, 7.10, 0.00277, 300, 0.035], 26 : [ 801.32, 7.10, 0.00277, 300, 0.035], 27 : [ 1055.1, 3.33, 0.52124, 120, 0.077], 28 : [ 1055.1, 3.33, 0.52124, 120, 0.077], 29 : [ 1055.1, 3.33, 0.52124, 120, 0.077], 30 : [ 148.89, 5.35, 0.01140, 120, 0.077], 31 : [ 222.92, 6.43, 0.00160, 150, 0.063], 32 : [ 222.92, 6.43, 0.00160, 150, 0.063], 33 : [ 222.92, 6.43, 0.00160, 150, 0.063], 34 : [ 107.87, 8.95, 0.00010, 200, 0.042], 35 : [ 116.58, 8.62, 0.00010, 200, 0.042], 36 : [ 116.58, 8.62, 0.00010, 200, 0.042], 37 : [ 307.45, 5.88, 0.01610, 80, 0.098], 38 : [ 307.45, 5.88, 0.01610, 80, 0.098], 39 : [ 307.45, 5.88, 0.01610, 80, 0.098], 40 : [ 647.83, 7.97, 0.00313, 300, 0.035], }) U, p_min, p_max = multidict({ 1 : [36, 114], 2 : [36, 114], 3 : [60, 120], 4 : [80, 190], 5 : [47, 97], 6 : [68, 140], 7 : [110, 300], 8 : [135, 300], 9 : [135, 300], 10 : [130, 300], 11 : [94, 375], 12 : [94, 375], 13 : [125, 500], 14 : [125, 500], 15 : [125, 500], 16 : [125, 500], 17 : [220, 500], 18 : [220, 500], 19 : [242, 550], 20 : [242, 550], 21 : [254, 550], 22 : [254, 550], 23 : [254, 550], 24 : [254, 550], 25 : [254, 550], 26 : [254, 550], 27 : [10, 150], 28 : [10, 150], 29 : [10, 150], 30 : [47, 97], 31 : [60, 190], 32 : [60, 190], 33 : [60, 190], 34 : [90, 200], 35 : [90, 200], 36 : [90, 200], 37 : [25, 110], 38 : [25, 110], 39 : [25, 110], 40 : [242, 550], }) P, dem= multidict({ 1 : [ load], }) # data for ucp U_, y_prev, t_cold, n_init, min_on, min_off, a_hot, a_cold = multidict({ 1 : [ 1, 0, 1, 2, 1, 0, 0, ], 2 : [ 1, 0, 1, 2, 1, 0, 0, ], 3 : [ 1, 0, 1, 2, 1, 0, 0, ], 4 : [ 1, 0, 1, 2, 1, 0, 0, ], 5 : [ 1, 0, 1, 2, 1, 0, 0, ], 6 : [ 1, 0, 1, 2, 1, 0, 0, ], 7 : [ 1, 0, 1, 2, 1, 0, 0, ], 8 : [ 1, 0, 1, 2, 1, 0, 0, ], 9 : [ 1, 0, 1, 2, 1, 0, 0, ], 10 : [ 1, 0, 1, 2, 1, 0, 0, ], 11 : [ 1, 0, 1, 2, 1, 0, 0, ], 12 : [ 1, 0, 1, 2, 1, 0, 0, ], 13 : [ 1, 0, 1, 2, 1, 0, 0, ], 14 : [ 1, 0, 1, 2, 1, 0, 0, ], 15 : [ 1, 0, 1, 2, 1, 0, 0, ], 16 : [ 1, 0, 1, 2, 1, 0, 0, ], 17 : [ 1, 0, 1, 2, 1, 0, 0, ], 18 : [ 1, 0, 1, 2, 1, 0, 0, ], 19 : [ 1, 0, 1, 2, 1, 0, 0, ], 20 : [ 1, 0, 1, 2, 1, 0, 0, ], 21 : [ 1, 0, 1, 2, 1, 0, 0, ], 22 : [ 1, 0, 1, 2, 1, 0, 0, ], 23 : [ 1, 0, 1, 2, 1, 0, 0, ], 24 : [ 1, 0, 1, 2, 1, 0, 0, ], 25 : [ 1, 0, 1, 2, 1, 0, 0, ], 26 : [ 1, 0, 1, 2, 1, 0, 0, ], 27 : [ 1, 0, 1, 2, 1, 0, 0, ], 28 : [ 1, 0, 1, 2, 1, 0, 0, ], 29 : [ 1, 0, 1, 2, 1, 0, 0, ], 30 : [ 1, 0, 1, 2, 1, 0, 0, ], 31 : [ 1, 0, 1, 2, 1, 0, 0, ], 32 : [ 1, 0, 1, 2, 1, 0, 0, ], 33 : [ 1, 0, 1, 2, 1, 0, 0, ], 34 : [ 1, 0, 1, 2, 1, 0, 0, ], 35 : [ 1, 0, 1, 2, 1, 0, 0, ], 36 : [ 1, 0, 1, 2, 1, 0, 0, ], 37 : [ 1, 0, 1, 2, 1, 0, 0, ], 38 : [ 1, 0, 1, 2, 1, 0, 0, ], 39 : [ 1, 0, 1, 2, 1, 0, 0, ], 40 : [ 1, 0, 1, 2, 1, 0, 0, ], }) res = {1: 0} # data for ucp T = len(P) U = list(a.keys()) return U, T, a, b, c, e, f, p_min, p_max, y_prev, t_cold, n_init, min_on, min_off, a_hot, a_cold, dem, res def ucp10(periods): """ucp10(periods): kazarlis data, complemented with parameters for valve effect Parameters: - periods: number of periods to consider (from 1 [equivalent to load dispatch] to 24) Returns: - (see 'kazarlis') """ U, a, b, c, e, f = multidict({ 1 : [ 1000, 16.19, 0.00048, 300, 0.035 ], 2 : [ 970, 17.26, 0.00031, 200, 0.042 ], 3 : [ 700, 16.60, 0.00200, 200, 0.042 ], 4 : [ 680, 16.50, 0.00211, 150, 0.063 ], 5 : [ 450, 19.70, 0.00398, 150, 0.063 ], 6 : [ 370, 22.26, 0.00712, 150, 0.063 ], 7 : [ 480, 27.74, 0.00079, 150, 0.063 ], 8 : [ 660, 25.92, 0.00413, 100, 0.084 ], 9 : [ 665, 27.27, 0.00222, 100, 0.084 ], 10 : [ 670, 27.79, 0.00173, 100, 0.084 ], }) U_, p_min, p_max, y_prev = multidict({ 1 : [ 150, 455, 1 ], 2 : [ 150, 455, 1 ], 3 : [ 20, 130, 0 ], 4 : [ 20, 130, 0 ], 5 : [ 25, 162, 0 ], 6 : [ 20, 80, 0 ], 7 : [ 25, 85, 0 ], 8 : [ 10, 55, 0 ], 9 : [ 10, 55, 0 ], 10 : [ 10, 55, 0 ], }) U_, t_cold, n_init, min_on, min_off = multidict({ 1 : [ 5, 8, 8, 8 ], 2 : [ 5, 8, 8, 8 ], 3 : [ 4, 5, 5, 5 ], 4 : [ 4, 5, 5, 5 ], 5 : [ 4, 6, 6, 6 ], 6 : [ 2, 3, 3, 3 ], 7 : [ 2, 3, 3, 3 ], 8 : [ 0, 1, 1, 1 ], 9 : [ 0, 1, 1, 1 ], 10 : [ 0, 1, 1, 1 ], }) U_, a_hot, a_cold = multidict({ 1 : [ 4500, 9000 ], 2 : [ 5000, 10000 ], 3 : [ 550, 1100 ], 4 : [ 560, 1120 ], 5 : [ 900, 1800 ], 6 : [ 170, 340 ], 7 : [ 260, 520 ], 8 : [ 30, 60 ], 9 : [ 30, 60 ], 10 : [ 30, 60 ], }) P_, dem, res = multidict({ 1 : [ 700, 70 ], 2 : [ 750, 75 ], 3 : [ 850, 85 ], 4 : [ 950, 95 ], 5 : [ 1000, 100 ], 6 : [ 1100, 110 ], 7 : [ 1150, 115 ], 8 : [ 1200, 120 ], 9 : [ 1300, 130 ], 10 : [ 1400, 140 ], 11 : [ 1450, 145 ], 12 : [ 1500, 150 ], 13 : [ 1400, 140 ], 14 : [ 1300, 130 ], 15 : [ 1200, 120 ], 16 : [ 1050, 105 ], 17 : [ 1000, 100 ], 18 : [ 1100, 110 ], 19 : [ 1200, 120 ], 20 : [ 1400, 140 ], 21 : [ 1300, 130 ], 22 : [ 1100, 110 ], 23 : [ 900, 90 ], 24 : [ 800, 80 ], }) T = periods U = list(a.keys()) return U, T, a, b, c, e, f, p_min, p_max, y_prev, t_cold, n_init, min_on, min_off, a_hot, a_cold, dem, res def ucp5(periods): """ucp5(periods): reduced kazarlis [2] data, complemented with parameters for valve effect Parameters: - periods: number of periods to consider (from 1 [equivalent to load dispatch] to 24) Returns: - (see 'kazarlis') """ U, a, b, c, e, f = multidict({ 1 : [ 1000, 16.19, 0.00048, 300, 0.035 ], 3 : [ 700, 16.60, 0.00200, 200, 0.042 ], 5 : [ 450, 19.70, 0.00398, 150, 0.063 ], 7 : [ 480, 27.74, 0.00079, 150, 0.063 ], 9 : [ 665, 27.27, 0.00222, 100, 0.084 ], }) U_, p_min, p_max, y_prev = multidict({ 1 : [ 150, 455, 1 ], 3 : [ 20, 130, 0 ], 5 : [ 25, 162, 0 ], 7 : [ 25, 85, 0 ], 9 : [ 10, 55, 0 ], }) U_, t_cold, n_init, min_on, min_off = multidict({ 1 : [ 5, 8, 8, 8 ], 3 : [ 4, 5, 5, 5 ], 5 : [ 4, 6, 6, 6 ], 7 : [ 2, 3, 3, 3 ], 9 : [ 0, 1, 1, 1 ], }) U_, a_hot, a_cold = multidict({ 1 : [ 4500, 9000 ], 3 : [ 550, 1100 ], 5 : [ 900, 1800 ], 7 : [ 260, 520 ], 9 : [ 30, 60 ], }) P_, dem, res = multidict({ 1 : [ 370, 37 ], 2 : [ 400, 40 ], 3 : [ 450, 45 ], 4 : [ 510, 51 ], 5 : [ 530, 53 ], 6 : [ 590, 59 ], 7 : [ 610, 61 ], 8 : [ 640, 64 ], 9 : [ 690, 69 ], 10 : [ 750, 75 ], 11 : [ 770, 77 ], 12 : [ 800, 80 ], 13 : [ 750, 75 ], 14 : [ 690, 69 ], 15 : [ 640, 64 ], 16 : [ 560, 56 ], 17 : [ 530, 53 ], 18 : [ 590, 59 ], 19 : [ 640, 64 ], 20 : [ 750, 75 ], 21 : [ 690, 69 ], 22 : [ 590, 59 ], 23 : [ 480, 48 ], 24 : [ 430, 43 ], }) T = periods U = list(a.keys()) return U, T, a, b, c, e, f, p_min, p_max, y_prev, t_cold, n_init, min_on, min_off, a_hot, a_cold, dem, res def ucp13(periods): """ucp13(periods): costs taken form eld13, with multiperiod data from kazarlis Parameters: - periods: number of periods to consider (from 1 [equivalent to load dispatch] to 24) Returns: - (see 'kazarlis') """ U, a, b, c, e, f = multidict({ 1 : [ 550, 8.1, 0.00028, 300, 0.035], 2 : [ 309, 8.1, 0.00056, 200, 0.042], 3 : [ 307, 8.1, 0.00056, 200, 0.042], 4 : [ 240, 7.74, 0.00324, 150, 0.063], 5 : [ 240, 7.74, 0.00324, 150, 0.063], 6 : [ 240, 7.74, 0.00324, 150, 0.063], 7 : [ 240, 7.74, 0.00324, 150, 0.063], 8 : [ 240, 7.74, 0.00324, 150, 0.063], 9 : [ 240, 7.74, 0.00324, 150, 0.063], 10 : [ 126, 8.6, 0.00284, 100, 0.084], 11 : [ 126, 8.6, 0.00284, 100, 0.084], 12 : [ 126, 8.6, 0.00284, 100, 0.084], 13 : [ 126, 8.6, 0.00284, 100, 0.084], }) U_, p_min, p_max, y_prev = multidict({ # corresp. in kazarlis 1 : [ 0, 680, 1 ], # 1 2 : [ 0, 360, 1 ], # 2 3 : [ 0, 360, 0 ], # 3 4 : [ 60, 180, 1 ], # 1 5 : [ 60, 180, 1 ], # 2 6 : [ 60, 180, 0 ], # 3 7 : [ 60, 180, 0 ], # 4 8 : [ 60, 180, 0 ], # 5 9 : [ 60, 180, 0 ], # 6 10 : [ 40, 120, 0 ], # 7 11 : [ 40, 120, 0 ], # 8 12 : [ 55, 120, 0 ], # 9 13 : [ 55, 120, 0 ], # 10 }) U_, t_cold, n_init, min_on, min_off = multidict({ # corresp. in kazarlis 1 : [ 5, 8, 8, 8 ], # 1 2 : [ 5, 8, 8, 8 ], # 2 3 : [ 4, 5, 5, 5 ], # 3 4 : [ 5, 8, 8, 8 ], # 1 5 : [ 5, 8, 8, 8 ], # 2 6 : [ 4, 5, 5, 5 ], # 3 7 : [ 4, 5, 5, 5 ], # 4 8 : [ 4, 6, 6, 6 ], # 5 9 : [ 2, 3, 3, 3 ], # 6 10 : [ 2, 3, 3, 3 ], # 7 11 : [ 0, 1, 1, 1 ], # 8 12 : [ 0, 1, 1, 1 ], # 9 13 : [ 0, 1, 1, 1 ], # 10 }) U_, a_hot, a_cold = multidict({ # corresp. in kazarlis 1 : [ 4500, 9000 ], # 1 2 : [ 5000, 10000 ], # 2 3 : [ 550, 1100 ], # 3 4 : [ 4500, 9000 ], # 1 5 : [ 5000, 10000 ], # 2 6 : [ 550, 1100 ], # 3 7 : [ 560, 1120 ], # 4 8 : [ 900, 1800 ], # 5 9 : [ 170, 340 ], # 6 10 : [ 260, 520 ], # 7 11 : [ 30, 60 ], # 8 12 : [ 30, 60 ], # 9 13 : [ 30, 60 ], # 10 }) P, dem, res = multidict({ 1 : [ 1250, 125 ], 2 : [ 1340, 134 ], 3 : [ 1510, 151 ], 4 : [ 1690, 169 ], 5 : [ 1780, 178 ], 6 : [ 1960, 196 ], 7 : [ 2050, 205 ], 8 : [ 2140, 214 ], 9 : [ 2320, 232 ], 10 : [ 2490, 249 ], 11 : [ 2580, 258 ], 12 : [ 2670, 267 ], 13 : [ 2490, 249 ], 14 : [ 2320, 232 ], 15 : [ 2140, 214 ], 16 : [ 1870, 187 ], 17 : [ 1780, 178 ], 18 : [ 1960, 196 ], 19 : [ 2140, 214 ], 20 : [ 2490, 249 ], 21 : [ 2320, 232 ], 22 : [ 1960, 196 ], 23 : [ 1600, 160 ], 24 : [ 1420, 142 ], }) T = periods U = list(a.keys()) return U, T, a, b, c, e, f, p_min, p_max, y_prev, t_cold, n_init, min_on, min_off, a_hot, a_cold, dem, res def ucp40(periods): """ucp40(periods): costs taken form eld40, with multiperiod data from kazarlis Parameters: - periods: number of periods to consider (from 1 [equivalent to load dispatch] to 24) Returns: - (see 'kazarlis') """ U, a, b, c, e, f = multidict({ 1 : [ 94.705, 6.73, 0.00690, 100, 0.084], 2 : [ 94.705, 6.73, 0.00690, 100, 0.084], 3 : [ 309.54, 7.07, 0.02028, 100, 0.084], 4 : [ 369.03, 8.18, 0.00942, 150, 0.063], 5 : [ 148.89, 5.35, 0.01140, 120, 0.077], 6 : [ 222.33, 8.05, 0.01142, 100, 0.084], 7 : [ 287.71, 8.03, 0.00357, 200, 0.042], 8 : [ 391.98, 6.99, 0.00492, 200, 0.042], 9 : [ 455.76, 6.60, 0.00573, 200, 0.042], 10 : [ 722.82, 12.9, 0.00605, 200, 0.042], 11 : [ 635.20, 12.9, 0.00515, 200, 0.042], 12 : [ 654.69, 12.8, 0.00569, 200, 0.042], 13 : [ 913.40, 12.5, 0.00421, 300, 0.035], 14 : [ 1760.4, 8.84, 0.00752, 300, 0.035], 15 : [ 1728.3, 9.15, 0.00708, 300, 0.035], 16 : [ 1728.3, 9.15, 0.00708, 300, 0.035], 17 : [ 647.85, 7.97, 0.00313, 300, 0.035], 18 : [ 649.69, 7.95, 0.00313, 300, 0.035], 19 : [ 647.83, 7.97, 0.00313, 300, 0.035], 20 : [ 647.81, 7.97, 0.00313, 300, 0.035], 21 : [ 785.96, 6.63, 0.00298, 300, 0.035], 22 : [ 785.96, 6.63, 0.00298, 300, 0.035], 23 : [ 794.53, 6.66, 0.00284, 300, 0.035], 24 : [ 794.53, 6.66, 0.00284, 300, 0.035], 25 : [ 801.32, 7.10, 0.00277, 300, 0.035], 26 : [ 801.32, 7.10, 0.00277, 300, 0.035], 27 : [ 1055.1, 3.33, 0.52124, 120, 0.077], 28 : [ 1055.1, 3.33, 0.52124, 120, 0.077], 29 : [ 1055.1, 3.33, 0.52124, 120, 0.077], 30 : [ 148.89, 5.35, 0.01140, 120, 0.077], 31 : [ 222.92, 6.43, 0.00160, 150, 0.063], 32 : [ 222.92, 6.43, 0.00160, 150, 0.063], 33 : [ 222.92, 6.43, 0.00160, 150, 0.063], 34 : [ 107.87, 8.95, 0.00010, 200, 0.042], 35 : [ 116.58, 8.62, 0.00010, 200, 0.042], 36 : [ 116.58, 8.62, 0.00010, 200, 0.042], 37 : [ 307.45, 5.88, 0.01610, 80, 0.098], 38 : [ 307.45, 5.88, 0.01610, 80, 0.098], 39 : [ 307.45, 5.88, 0.01610, 80, 0.098], 40 : [ 647.83, 7.97, 0.00313, 300, 0.035], }) U_, p_min, p_max, y_prev = multidict({ # corresp. in kazarlis 1 : [36, 114, 1 ], # 1 2 : [36, 114, 1 ], # 2 3 : [60, 120, 0 ], # 3 4 : [80, 190, 0 ], # 4 5 : [47, 97 , 0 ], # 5 6 : [68, 140, 0 ], # 6 7 : [110, 300, 0 ], # 7 8 : [135, 300, 0 ], # 8 9 : [135, 300, 0 ], # 9 10 : [130, 300, 0 ], # 10 11 : [94, 375, 1 ], # 1 12 : [94, 375, 1 ], # 2 13 : [125, 500, 0 ], # 3 14 : [125, 500, 0 ], # 4 15 : [125, 500, 0 ], # 5 16 : [125, 500, 0 ], # 6 17 : [220, 500, 0 ], # 7 18 : [220, 500, 0 ], # 8 19 : [242, 550, 0 ], # 9 20 : [242, 550, 0 ], # 10 21 : [254, 550, 1 ], # 1 22 : [254, 550, 1 ], # 2 23 : [254, 550, 0 ], # 3 24 : [254, 550, 0 ], # 4 25 : [254, 550, 0 ], # 5 26 : [254, 550, 0 ], # 6 27 : [10, 150, 0 ], # 7 28 : [10, 150, 0 ], # 8 29 : [10, 150, 0 ], # 9 30 : [47, 97 , 0 ], # 10 31 : [60, 190, 1 ], # 1 32 : [60, 190, 1 ], # 2 33 : [60, 190, 0 ], # 3 34 : [90, 200, 0 ], # 4 35 : [90, 200, 0 ], # 5 36 : [90, 200, 0 ], # 6 37 : [25, 110, 0 ], # 7 38 : [25, 110, 0 ], # 8 39 : [25, 110, 0 ], # 9 40 : [242, 550, 0 ], # 10 }) U_, t_cold, n_init, min_on, min_off = multidict({ # corresp. in kazarlis 1 : [ 5, 8, 8, 8 ], # 1 2 : [ 5, 8, 8, 8 ], # 2 3 : [ 4, 5, 5, 5 ], # 3 4 : [ 4, 5, 5, 5 ], # 4 5 : [ 4, 6, 6, 6 ], # 5 6 : [ 2, 3, 3, 3 ], # 6 7 : [ 2, 3, 3, 3 ], # 7 8 : [ 0, 1, 1, 1 ], # 8 9 : [ 0, 1, 1, 1 ], # 9 10 : [ 0, 1, 1, 1 ], # 10 11 : [ 5, 8, 8, 8 ], # 1 12 : [ 5, 8, 8, 8 ], # 2 13 : [ 4, 5, 5, 5 ], # 3 14 : [ 4, 5, 5, 5 ], # 4 15 : [ 4, 6, 6, 6 ], # 5 16 : [ 2, 3, 3, 3 ], # 6 17 : [ 2, 3, 3, 3 ], # 7 18 : [ 0, 1, 1, 1 ], # 8 19 : [ 0, 1, 1, 1 ], # 9 20 : [ 0, 1, 1, 1 ], # 10 21 : [ 5, 8, 8, 8 ], # 1 22 : [ 5, 8, 8, 8 ], # 2 23 : [ 4, 5, 5, 5 ], # 3 24 : [ 4, 5, 5, 5 ], # 4 25 : [ 4, 6, 6, 6 ], # 5 26 : [ 2, 3, 3, 3 ], # 6 27 : [ 2, 3, 3, 3 ], # 7 28 : [ 0, 1, 1, 1 ], # 8 29 : [ 0, 1, 1, 1 ], # 9 30 : [ 0, 1, 1, 1 ], # 10 31 : [ 5, 8, 8, 8 ], # 1 32 : [ 5, 8, 8, 8 ], # 2 33 : [ 4, 5, 5, 5 ], # 3 34 : [ 4, 5, 5, 5 ], # 4 35 : [ 4, 6, 6, 6 ], # 5 36 : [ 2, 3, 3, 3 ], # 6 37 : [ 2, 3, 3, 3 ], # 7 38 : [ 0, 1, 1, 1 ], # 8 39 : [ 0, 1, 1, 1 ], # 9 40 : [ 0, 1, 1, 1 ], # 10 }) U_, a_hot, a_cold = multidict({ # corresp. in kazarlis 1: [ 4500, 9000 ], # 1 2: [ 5000, 10000 ], # 2 3: [ 550, 1100 ], # 3 4: [ 560, 1120 ], # 4 5: [ 900, 1800 ], # 5 6: [ 170, 340 ], # 6 7: [ 260, 520 ], # 7 8: [ 30, 60 ], # 8 9: [ 30, 60 ], # 9 10: [ 30, 60 ], # 10 11: [ 4500, 9000 ], # 1 12: [ 5000, 10000 ], # 2 13: [ 550, 1100 ], # 3 14: [ 560, 1120 ], # 4 15: [ 900, 1800 ], # 5 16: [ 170, 340 ], # 6 17: [ 260, 520 ], # 7 18: [ 30, 60 ], # 8 19: [ 30, 60 ], # 9 20: [ 30, 60 ], # 10 21: [ 4500, 9000 ], # 1 22: [ 5000, 10000 ], # 2 23: [ 550, 1100 ], # 3 24: [ 560, 1120 ], # 4 25: [ 900, 1800 ], # 5 26: [ 170, 340 ], # 6 27: [ 260, 520 ], # 7 28: [ 30, 60 ], # 8 29: [ 30, 60 ], # 9 30: [ 30, 60 ], # 10 31: [ 4500, 9000 ], # 1 32: [ 5000, 10000 ], # 2 33: [ 550, 1100 ], # 3 34: [ 560, 1120 ], # 4 35: [ 900, 1800 ], # 5 36: [ 170, 340 ], # 6 37: [ 260, 520 ], # 7 38: [ 30, 60 ], # 8 39: [ 30, 60 ], # 9 40: [ 30, 60 ], # 10 }) P, dem, res = multidict({ 1 : [ 5360, 536 ], 2 : [ 5740, 574 ], 3 : [ 6510, 651 ], 4 : [ 7270, 727 ], 5 : [ 7650, 765 ], 6 : [ 8420, 842 ], 7 : [ 8800, 880 ], 8 : [ 9190, 919 ], 9 : [ 9950, 995 ], 10 : [ 10720, 1072 ], 11 : [ 11100, 1110 ], 12 : [ 11480, 1148 ], 13 : [ 10720, 1072 ], 14 : [ 9950, 995 ], 15 : [ 9190, 919 ], 16 : [ 8040, 804 ], 17 : [ 7650, 765 ], 18 : [ 8420, 842 ], 19 : [ 9190, 919 ], 20 : [ 10720, 1072 ], 21 : [ 9950, 995 ], 22 : [ 8420, 842 ], 23 : [ 6890, 689 ], 24 : [ 6120, 612 ], }) T = periods U = list(a.keys()) return U, T, a, b, c, e, f, p_min, p_max, y_prev, t_cold, n_init, min_on, min_off, a_hot, a_cold, dem, res def toy(periods): """toy(periods): make data for toy instance, based on ucp10 Parameters: - 'periods': number of periods to consider, from 1 to 24 Returns: (see 'kazarlis') """ U, a, b, c, e, f = multidict({ 1 : [ 1000, 16.19, 0.00048, 300, 0.035 ], 2 : [ 970, 17.26, 0.00031, 200, 0.042 ], 3 : [ 700, 16.60, 0.00200, 200, 0.042 ], }) U_, p_min, p_max, y_prev = multidict({ 1 : [ 150, 455, 1 ], 2 : [ 150, 455, 1 ], 3 : [ 20, 1300, 0 ], # 130 ---> 1300 (for feasibility) }) U_, t_cold, n_init, min_on, min_off = multidict({ 1 : [ 5, 8, 8, 8 ], 2 : [ 5, 8, 8, 8 ], 3 : [ 4, 5, 5, 5 ], }) U_, a_hot, a_cold = multidict({ 1 : [ 4500, 9000 ], 2 : [ 5000, 10000 ], 3 : [ 550, 1100 ], }) P_, dem, res = multidict({ 1 : [ 700, 70 ], 2 : [ 750, 75 ], 3 : [ 850, 85 ], 4 : [ 950, 95 ], 5 : [ 1000, 100 ], 6 : [ 1100, 110 ], 7 : [ 1150, 115 ], 8 : [ 1200, 120 ], 9 : [ 1300, 130 ], 10 : [ 1400, 140 ], 11 : [ 1450, 145 ], 12 : [ 1500, 150 ], 13 : [ 1400, 140 ], 14 : [ 1300, 130 ], 15 : [ 1200, 120 ], 16 : [ 1050, 105 ], 17 : [ 1000, 100 ], 18 : [ 1100, 110 ], 19 : [ 1200, 120 ], 20 : [ 1400, 140 ], 21 : [ 1300, 130 ], 22 : [ 1100, 110 ], 23 : [ 900, 90 ], 24 : [ 800, 80 ], }) T = periods U = list(a.keys()) return U, T, a, b, c, e, f, p_min, p_max, y_prev, t_cold, n_init, min_on, min_off, a_hot, a_cold, dem, res