Closed amar-iastate closed 4 years ago
With the latest update https://github.com/RLGC-Project/RLGC/commit/9952d7f22251fdc76cb7610368d7ab1953396c0e, this bug should be fixed.
The environment definition are updated (v3 now) to based on the latest OpenAI Gym. Test codes are updated to show how it should be used properly.
Please update your local branch and try it out. @amar-iastate
Thanks for following this up RLGC Team. This particular error is not appearing anymore. However, the trainIEEE39LoadSheddingAgent.py
file does not run straight from the updated repo.
After a bit of debugging, the problem turned out to be in the RL configuration json file ( IEEE39_RL_loadShedding_3motor_2levels.json
). The variable faultBusCandidates
was missing. After adding a line in the json file "faultBusCandidates": ["Bus504"],
the code works. The command window running the jar file is giving the following output, which seems to suggest that it is ok.
Initial values of the observed states:
[0.98712668745297, 0.9748013683313521, 0.9731456890757114, 1.0089329691108317, 0.9813836367392125, 0.9712347933931141, 0.9652967656365352, 1.005561904995773]
Bus, initLoad, shedLoadFraction = Bus507, 2.338, -0.2
Bus, initLoad, shedLoadFraction = Bus518, 1.6320000000000001, -0.2
Bus, initLoad, shedLoadFraction = Bus504, 5.0, -0.2
Bus, initLoad, shedLoadFraction = Bus507, 2.338, -0.2
Bus, initLoad, shedLoadFraction = Bus518, 1.6320000000000001, -0.2
Bus, initLoad, shedLoadFraction = Bus504, 5.0, -0.2
Bus, initLoad, shedLoadFraction = Bus504, 5.0, -0.2
Bus, initLoad, shedLoadFraction = Bus507, 2.338, -0.2
Bus, initLoad, shedLoadFraction = Bus518, 1.6320000000000001, -0.2
Bus, initLoad, shedLoadFraction = Bus504, 5.0, -0.2
Bus, initLoad, shedLoadFraction = Bus507, 2.338, -0.2
Bus, initLoad, shedLoadFraction = Bus507, 2.338, -0.2
Bus, initLoad, shedLoadFraction = Bus518, 1.6320000000000001, -0.2
Jul 28, 2019 2:54:06 PM org.pnnl.gov.rl.action.LoadChangeActionProcessor applyAction
SEVERE: change fraction for bus =Bus507 is large than remaining fraction, it has been changed to : -5.551115123125783E-17
Bus, initLoad, shedLoadFraction = Bus504, 5.0, -0.2
Bus, initLoad, shedLoadFraction = Bus507, 2.338, -5.551115123125783E-17
Bus, initLoad, shedLoadFraction = Bus518, 1.6320000000000001, -0.2
Jul 28, 2019 2:54:06 PM org.pnnl.gov.rl.action.LoadChangeActionProcessor applyAction
SEVERE: change fraction for bus =Bus504 is large than remaining fraction, it has been changed to : -5.551115123125783E-17
Jul 28, 2019 2:54:06 PM org.pnnl.gov.rl.action.LoadChangeActionProcessor applyAction
SEVERE: change fraction for bus =Bus518 is large than remaining fraction, it has been changed to : -5.551115123125783E-17
Bus, initLoad, shedLoadFraction = Bus504, 5.0, -5.551115123125783E-17
Bus, initLoad, shedLoadFraction = Bus518, 1.6320000000000001, -5.551115123125783E-17
Jul 28, 2019 2:54:07 PM org.pnnl.gov.rl.action.LoadChangeActionProcessor applyAction
SEVERE: change fraction for bus =Bus504 is large than remaining fraction, it has been changed to : 0.0
Jul 28, 2019 2:54:07 PM org.pnnl.gov.rl.action.LoadChangeActionProcessor applyAction
SEVERE: change fraction for bus =Bus507 is large than remaining fraction, it has been changed to : 0.0
Jul 28, 2019 2:54:07 PM org.pnnl.gov.rl.action.LoadChangeActionProcessor applyAction
SEVERE: change fraction for bus =Bus504 is large than remaining fraction, it has been changed to : 0.0
Jul 28, 2019 2:54:07 PM org.pnnl.gov.rl.action.LoadChangeActionProcessor applyAction
SEVERE: change fraction for bus =Bus507 is large than remaining fraction, it has been changed to : 0.0
Jul 28, 2019 2:54:07 PM org.pnnl.gov.rl.action.LoadChangeActionProcessor applyAction
SEVERE: change fraction for bus =Bus507 is large than remaining fraction, it has been changed to : 0.0
Jul 28, 2019 2:54:07 PM org.pnnl.gov.rl.action.LoadChangeActionProcessor applyAction
SEVERE: change fraction for bus =Bus518 is large than remaining fraction, it has been changed to : 0.0
Jul 28, 2019 2:54:07 PM org.pnnl.gov.rl.action.LoadChangeActionProcessor applyAction
SEVERE: change fraction for bus =Bus504 is large than remaining fraction, it has been changed to : 0.0
Jul 28, 2019 2:54:09 PM org.pnnl.gov.rl.action.LoadChangeActionProcessor applyAction
SEVERE: change fraction for bus =Bus507 is large than remaining fraction, it has been changed to : 0.0
It would be nice if the various entries in the dynamics config and the RL config jsons file are explained briefly in a document. It would make it easy to understand the various options.
Thanks again for taking the time to rectify this.
Hi, There seems to be a name mismatch between the functions defined in the "IpssPyGateway.java" file and the functions called from the python files as methods of the "ipss_app" object. A few examples
After I tried to correct them manually in a few python files for running
python trainIEEE39LoadSheddingAgent.py
, I got the following error:Similarly, when I am trying to run
python trainKundur2areaGenBrakingAgent.py
, the following error is raised:I am not sure how to debug/rectify these errors to as it seems to be deeper in Java and I am not able to debug it from python.