albertjlguo / sfcNordic

Leeds bachelor final project: Centralized control algorithms for Nordic Smart Grid operation (Python x MATLAB).
GNU General Public License v3.0
3 stars 1 forks source link

Mistake in passing the parameters from the SFC function to the agc #4

Open apetros opened 5 years ago

apetros commented 5 years ago

The parameters for the AGC function (like list of gems) is defined under main. How are these passed then to the AGC?

albertjlguo commented 5 years ago

Yes, this issue confused me this Friday, and I found that: It works in Jupyter Notebook and failed in a normal python scripts.

Maybe Jupyter Notebook found these parameters under main is passed to sfc(kp, ki, td) and make them be the "hardcoded parameters" of sfc(kp, ki, td). Since function agc(...) is embedded inside the function sfc(kp, ki, td), so the parameters can pass to the function agc(...).

However, it doesn't work for normal python scripts.

In all, I will update it tonight.

apetros commented 5 years ago

Since the SFC does nothing more than to prepare and run AGC, you can merge them together. I believe all the parameters needed should be passed explicitly.

albertjlguo commented 5 years ago

I have updated this issue~