def _get_demand_array_construct(self): """ Returns a construct for an array of power demand data. """ bus_no = integer.setResultsName("bus_no") s_rating = real.setResultsName("s_rating") # MVA p_direction = real.setResultsName("p_direction") # p.u. q_direction = real.setResultsName("q_direction") # p.u. p_bid_max = real.setResultsName("p_bid_max") # p.u. p_bid_min = real.setResultsName("p_bid_min") # p.u. p_optimal_bid = Optional(real).setResultsName("p_optimal_bid") p_fixed = real.setResultsName("p_fixed") # $/hr p_proportional = real.setResultsName("p_proportional") # $/MWh p_quadratic = real.setResultsName("p_quadratic") # $/MW^2h q_fixed = real.setResultsName("q_fixed") # $/hr q_proportional = real.setResultsName("q_proportional") # $/MVArh q_quadratic = real.setResultsName("q_quadratic") # $/MVAr^2h commitment = boolean.setResultsName("commitment") cost_tie_break = real.setResultsName("cost_tie_break") # $/MWh cost_cong_up = real.setResultsName("cost_cong_up") # $/h cost_cong_down = real.setResultsName("cost_cong_down") # $/h status = Optional(boolean).setResultsName("status") demand_data = bus_no + s_rating + p_direction + q_direction + \ p_bid_max + p_bid_min + p_optimal_bid + p_fixed + \ p_proportional + p_quadratic + q_fixed + q_proportional + \ q_quadratic + commitment + cost_tie_break + cost_cong_up + \ cost_cong_down + status + scolon demand_data.setParseAction(self.push_demand) demand_array = Literal("Demand.con") + "=" + "[" + "..." + \ ZeroOrMore(demand_data + Optional("]" + scolon)) return demand_array
def _get_load_ramping_construct(self): """ Returns a construct for an array of load ramping data. """ bus_no = integer.setResultsName("bus_no") s_rating = real.setResultsName("s_rating") # MVA up_rate = real.setResultsName("up_rate") # p.u./h down_rate = real.setResultsName("down_rate") # p.u./h min_up_time = real.setResultsName("min_up_time") # min min_down_time = real.setResultsName("min_down_time") # min n_period_up = integer.setResultsName("n_period_up") n_period_down = integer.setResultsName("n_period_down") status = boolean.setResultsName("status") l_ramp_data = bus_no + s_rating + up_rate + down_rate + \ min_up_time + min_down_time + n_period_up + \ n_period_down + status + scolon l_ramp_array = Literal("Rmpl.con") + "=" + "[" + \ ZeroOrMore(l_ramp_data + Optional("]" + scolon)) return l_ramp_array
def _get_generator_ramping_construct(self): """ Returns a construct for an array of generator ramping data. """ supply_no = integer.setResultsName("supply_no") s_rating = real.setResultsName("s_rating") # MVA up_rate = real.setResultsName("up_rate") # p.u./h down_rate = real.setResultsName("down_rate") # p.u./h min_period_up = real.setResultsName("min_period_up") # h min_period_down = real.setResultsName("min_period_down") # h initial_period_up = integer.setResultsName("initial_period_up") initial_period_down = integer.setResultsName("initial_period_down") c_startup = real.setResultsName("c_startup") # $ status = boolean.setResultsName("status") g_ramp_data = supply_no + s_rating + up_rate + down_rate + \ min_period_up + min_period_down + initial_period_up + \ initial_period_down + c_startup + status + scolon g_ramp_array = Literal("Rmpg.con") + "=" + "[" + \ ZeroOrMore(g_ramp_data + Optional("]" + scolon)) return g_ramp_array
def _get_supply_array_construct(self): """ Returns a construct for an array of power supply data. """ bus_no = integer.setResultsName("bus_no") s_rating = real.setResultsName("s_rating") # MVA p_direction = real.setResultsName("p_direction") # CPF p_bid_max = real.setResultsName("p_bid_max") # p.u. p_bid_min = real.setResultsName("p_bid_min") # p.u. p_bid_actual = real.setResultsName("p_bid_actual") # p.u. p_fixed = real.setResultsName("p_fixed") # $/hr p_proportional = real.setResultsName("p_proportional") # $/MWh p_quadratic = real.setResultsName("p_quadratic") # $/MW^2h q_fixed = real.setResultsName("q_fixed") # $/hr q_proportional = real.setResultsName("q_proportional") # $/MVArh q_quadratic = real.setResultsName("q_quadratic") # $/MVAr^2h commitment = boolean.setResultsName("commitment") cost_tie_break = real.setResultsName("cost_tie_break") # $/MWh lp_factor = real.setResultsName( "lp_factor") # Loss participation factor q_max = real.setResultsName("q_max") # p.u. q_min = real.setResultsName("q_min") # p.u. cost_cong_up = real.setResultsName("cost_cong_up") # $/h cost_cong_down = real.setResultsName("cost_cong_down") # $/h status = Optional(boolean).setResultsName("status") supply_data = bus_no + s_rating + p_direction + p_bid_max + \ p_bid_min + p_bid_actual + p_fixed + p_proportional + \ p_quadratic + q_fixed + q_proportional + q_quadratic + \ commitment + cost_tie_break + lp_factor + q_max + q_min + \ cost_cong_up + cost_cong_down + status + scolon supply_data.setParseAction(self.push_supply) supply_array = Literal("Supply.con") + "=" + "[" + "..." + \ ZeroOrMore(supply_data + Optional("]" + scolon)) return supply_array
def _get_supply_array_construct(self): """ Returns a construct for an array of power supply data. """ bus_no = integer.setResultsName("bus_no") s_rating = real.setResultsName("s_rating") # MVA p_direction = real.setResultsName("p_direction") # CPF p_bid_max = real.setResultsName("p_bid_max") # p.u. p_bid_min = real.setResultsName("p_bid_min") # p.u. p_bid_actual = real.setResultsName("p_bid_actual") # p.u. p_fixed = real.setResultsName("p_fixed") # $/hr p_proportional = real.setResultsName("p_proportional") # $/MWh p_quadratic = real.setResultsName("p_quadratic") # $/MW^2h q_fixed = real.setResultsName("q_fixed") # $/hr q_proportional = real.setResultsName("q_proportional") # $/MVArh q_quadratic = real.setResultsName("q_quadratic") # $/MVAr^2h commitment = boolean.setResultsName("commitment") cost_tie_break = real.setResultsName("cost_tie_break") # $/MWh lp_factor = real.setResultsName("lp_factor")# Loss participation factor q_max = real.setResultsName("q_max") # p.u. q_min = real.setResultsName("q_min") # p.u. cost_cong_up = real.setResultsName("cost_cong_up") # $/h cost_cong_down = real.setResultsName("cost_cong_down") # $/h status = Optional(boolean).setResultsName("status") supply_data = bus_no + s_rating + p_direction + p_bid_max + \ p_bid_min + p_bid_actual + p_fixed + p_proportional + \ p_quadratic + q_fixed + q_proportional + q_quadratic + \ commitment + cost_tie_break + lp_factor + q_max + q_min + \ cost_cong_up + cost_cong_down + status + scolon supply_data.setParseAction(self.push_supply) supply_array = Literal("Supply.con") + "=" + "[" + "..." + \ ZeroOrMore(supply_data + Optional("]" + scolon)) return supply_array