Example #1
0
 def compute_b(self, PD_deck):
     # Build  matrix b[row = node, column = time]
     b = np.zeros((int(PD_deck.Num_Nodes), int(PD_deck.Num_TimeStep)))
     PD_deck.get_parameters_loading_ramp()
     if PD_deck.Loading_Flag == "RAMP":
         for x_i in range(len(self.x) -
                          PD_deck.Horizon_Factor, len(self.x)):
             for t_n in range(1, int(PD_deck.Num_TimeStep)):
                 b[x_i, t_n] = self.ramp_loading(PD_deck, t_n)
     else:
         logger.error(
             "There is a problem with the Boundary Conditions in your XML deck.")
     # print b
     self.b = b