code: def _update_case(self, bs, ln, gn, base_mva, Bf, Pfinj, Va, Pg, lmbda):
          
          Pmis = self.om.get_lin_constraint("Pmis")
          Pf = self.om.get_lin_constraint("Pf")
          Pt = self.om.get_lin_constraint("Pt")
          Pg_v = self.om.get_var("Pg")
  
          mu_l = lmbda["mu_l"]
          mu_u = lmbda["mu_u"]
          lower = lmbda["lower"]
          upper = lmbda["upper"]
  
          for i, bus in enumerate(bs):
              bus.v_angle = Va[i] * 180.0 / pi
  
              bus.p_lmbda = (mu_u[Pmis.i1:Pmis.iN + 1][i] -
                             mu_l[Pmis.i1:Pmis.iN + 1][i]) / base_mva
  
          for l, branch in enumerate(ln):
              branch.p_from = (Bf * Va + Pfinj)[l] * base_mva
              branch.p_to = -branch.p_from
  
              branch.mu_s_from = mu_u[Pf.i1:Pf.iN + 1][l] / base_mva
              branch.mu_s_to = mu_u[Pt.i1:Pt.iN + 1][l] / base_mva
  
          for k, generator in enumerate(gn):
              generator.p = Pg[k] * base_mva
  
              generator.mu_pmin = lower[Pg_v.i1:Pg_v.iN + 1][k] / base_mva
              generator.mu_pmax = upper[Pg_v.i1:Pg_v.iN + 1][k] / base_mva
docs: Calculates the result attribute values.