ref_state = {("c_capture", ((), )): 0.52} c = NmpcGen(d_mod=bfb_dae, u=u, states=states, ref_state=ref_state, u_bounds=u_bounds) c.ss.dref = snap c.load_iguess_ss() c.solve_ss() c.load_d_s(c.d1) c.solve_d(c.d1) c.update_state_real() # update the current state c.find_target_ss() c.create_nmpc() c.update_targets_nmpc() c.compute_QR_nmpc(n=-1) c.new_weights_olnmpc(1000, 1e+06) # q_cov = {} # for i in range(1, nfet): # for j in range(1, ntrays + 1): # q_cov[("x", (j,)), ("x", (j,)), i] = 1e-05 # q_cov[("M", (j,)), ("M", (j,)), i] = 0.5 # # m_cov = {} # for i in range(1, nfet + 1): # for j in range(1, ntrays + 1): # m_cov[("T", (j,)), ("T", (j,)), i] = 6.25e-2
tfe = [i for i in range(1, nfet + 1)] c = NmpcGen(d_mod=DistDiehlNegrete, u=u, states=states, ref_state=ref_state, u_bounds=u_bounds) c.load_iguess_ss() c.solve_ss() c.load_d_s(c.d1) c.solve_d(c.d1) c.update_state_real() # update the current state c.find_target_ss() c.create_nmpc() c.update_targets_nmpc() c.compute_QR_nmpc(n=-1) c.new_weights_olnmpc(10000, 1e+06) c.d1.create_bounds() c.create_predictor() c.predictor_step(c.d1, "real") q_cov = {} for j in range(1, ntrays + 1): q_cov[("x", (j, ))] = 1e-05 q_cov[("M", (j, ))] = 1 c.make_noisy(q_cov)