Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local mode switch #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

tf = 60 # fianl time
P = 20 # Prediction Horizon
m=GEKKO(remote=True)
m=GEKKO(remote=False)
m.time = np.linspace(0,P-1,P)

# Process Gain
Expand Down
4 changes: 2 additions & 2 deletions 01_Emulation/MPC_emulation/FOPDT/03_1_MIMO_MPC_Emulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

# Plant model

p=GEKKO(remote=True)
p=GEKKO(remote=False)
p.time = [0, 1]

# Process Gain
Expand Down Expand Up @@ -71,7 +71,7 @@
## MPC model (Gekko)
##----------------------------------
P = 20 # Prediction Horizon
m=GEKKO(remote=True)
m=GEKKO(remote=False)
m.time = np.linspace(0,P-1,P)

# Process Gain
Expand Down
Binary file modified 01_Emulation/MPC_emulation/FOPDT/MPC_FOPDT_emulation_result.pkl
Binary file not shown.
2 changes: 1 addition & 1 deletion 01_Emulation/MPC_emulation/TCLab/01Generate_MIMO.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"#########################################################\n",
"# Initialize Model\n",
"#########################################################\n",
"m = GEKKO(name='tclab-mpc',remote=True)\n",
"m = GEKKO(name='tclab-mpc',remote=False)\n",
"\n",
"# 60 second time horizon, steps of 3 sec\n",
"m.time = np.linspace(0,60,21)\n",
Expand Down
908 changes: 907 additions & 1 deletion 01_Emulation/MPC_emulation/TCLab/03Emulate_MIMO.ipynb

Large diffs are not rendered by default.

345 changes: 141 additions & 204 deletions 02_Surrogate/FOPDT/MIMO/00_FOPDT_MIMO_OpenLoop_Data.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions 02_Surrogate/FOPDT/MIMO/02_FOPDT_MIMO_MPC_Gekko.ipynb

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions 02_Surrogate/Roaster/Roaster_model_v2.2/Gekko_Roaster_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@


#%% GEKKO
m = GEKKO(remote=True)
m = GEKKO(remote=False)
m.time = [0,tstep] # for animated version
# m.time = np.linspace(0, tsim, nstep)

Expand Down Expand Up @@ -864,24 +864,24 @@ def process(input):
H_Out2_offgas[key] = np.array(list(delH_Out2_offgas[key]))*(np.array(list(yog2[key])))

# # %% plotting
# t_minute = m.time/60

# t_minute = np.array(m.time)/60
#
# plt.figure(1)
# plt.subplot(3,1,1)
# plt.plot(t_minute,data_input["Ore_amps"], color='tab:blue', linestyle='-', LineWidth=3,label='Ore_amps')
# plt.ylabel('Amps')
# plt.xlabel('time[min]')
# plt.legend(loc='best')
# plt.legend(loc='best')
# plt.subplot(3,1,2)
# plt.plot(t_minute,data_input["Sulfur_tph"], color='tab:blue', linestyle='-', LineWidth=3,label='Sulfur_tph')
# plt.ylabel('t/h')
# plt.xlabel('time[min]')
# plt.legend(loc='best')
# plt.legend(loc='best')
# plt.subplot(3,1,3)
# plt.plot(t_minute,data_input["O2_scfm"], color='tab:blue', linestyle='-', LineWidth=3,label='O2_scfm')
# plt.ylabel('SCFM[kg/h]')
# plt.xlabel('time[min]')
# plt.legend(loc='best')
# plt.legend(loc='best')

# plt.figure(2)
# plt.subplot(3,1,1)
Expand Down
6 changes: 3 additions & 3 deletions 03_HybridModel/TCLab_parameter_est_gekko.ipynb

Large diffs are not rendered by default.