Skip to content

Commit

Permalink
fix the function error; update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
whoiszyc committed May 27, 2022
1 parent 119490b commit 60142bb
Show file tree
Hide file tree
Showing 89 changed files with 3,094 additions and 6,413 deletions.
Binary file modified docs/build/doctrees/about.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/build/doctrees/autoapi/gym_power_res/envs/index.doctree
Binary file not shown.
Binary file not shown.
Binary file modified docs/build/doctrees/autoapi/gym_power_res/index.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/autoapi/gym_power_res/sorces/index.doctree
Binary file not shown.
Binary file not shown.
Binary file modified docs/build/doctrees/autoapi/index.doctree
Binary file not shown.
Binary file not shown.
Binary file modified docs/build/doctrees/autoapi/project_dis_restoration/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/function.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/install.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/tutorial.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: c6fe713e7023aba90a76f429f2752a9a
config: 3d3df99b1c0acfa6364caedccfe50474
tags: 645f666f9bcd5a90fca523b33c5a78b7
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:mod:`gym_power_res.envs.DS_pyomo`
==================================
:py:mod:`gym_power_res.envs.DS_pyomo`
=====================================

.. py:module:: gym_power_res.envs.DS_pyomo
Expand All @@ -26,92 +26,91 @@ Attributes
gym_power_res.envs.DS_pyomo.ppc


.. class:: SolutionDict

.. py:class:: SolutionDict
Bases: :py:obj:`collections.OrderedDict`

Solution dictionary is an ordered dictionary that stores the optimization results
Solution dictionary struture: D[name key]=time series data

.. method:: copy_data(self, DictData)
.. py:method:: copy_data(self, DictData)
.. method:: plot_2d(self, x_str='Time', y_str='Value', title_str='Results', figsize=(15, 7), legendlist=None, show=True, save=False, folder=None)
.. py:method:: plot_2d(self, x_str='Time', y_str='Value', title_str='Results', figsize=(15, 7), legendlist=None, show=True, save=False, folder=None)
step plot


.. method:: plot_step_2d(self, x_str='Time', y_str='Value', title_str='Results', figsize=(15, 7), legendlist=None, show=True, save=False, folder=None)
.. py:method:: plot_step_2d(self, x_str='Time', y_str='Value', title_str='Results', figsize=(15, 7), legendlist=None, show=True, save=False, folder=None)
step plot


.. method:: plot_bin_2d(self, x_str='Time', y_str='Value', title_str='Results', figsize=(15, 7), show=True, save=False, folder=None)
.. py:method:: plot_bin_2d(self, x_str='Time', y_str='Value', title_str='Results', figsize=(15, 7), show=True, save=False, folder=None)
step plot



.. class:: OutageManage
.. py:class:: OutageManage
Distribution system restoration class

.. attribute:: BigM
.. py:attribute:: BigM
:annotation: = 100



.. attribute:: FicFlowBigM
.. py:attribute:: FicFlowBigM
:annotation: = 100



.. attribute:: epsilon
.. py:attribute:: epsilon
:annotation: = 0.1



.. attribute:: BasePower
.. py:attribute:: BasePower
:annotation: = 1000



.. method:: data_preparation(self, ppc, line_damaged, VS=1.05, dV=0.05)
.. py:method:: data_preparation(self, ppc, line_damaged, VS=1.05, dV=0.05)
read data of distribution network and vehicle routing problem
Data is in the format of dictionary


.. method:: solve_network_restoration_varcon(self, Total_Step, Line_Initial, VarCon_Initial, Load_Initial)
.. py:method:: solve_network_restoration_varcon(self, Total_Step, Line_Initial, VarCon_Initial, Load_Initial)
solve a full-step restoration problem with reactive power dispatch
:param Total_Step: total step of the problem
:param Line_Initial: initial line status
:return: restoration plan


.. method:: solve_network_restoration(self, Total_Step, Line_Initial, Load_Initial)
.. py:method:: solve_network_restoration(self, Total_Step, Line_Initial, Load_Initial)
solve a full-step restoration problem
:param Total_Step: total step of the problem
:param Line_Initial: initial line status
:return: restoration plan


.. method:: solve_load_pickup(self, line_status, load_status=None)
.. py:method:: solve_load_pickup(self, line_status, load_status=None)
Given fixed line status, obtain optimal load status
-- line status should be a dict with "key" as line name and "int or array" describing status over time interval


.. method:: solve_load_pickup_varcon(self, line_status, varcon, load_status=None)
.. py:method:: solve_load_pickup_varcon(self, line_status, varcon, load_status=None)
Given fixed line status and reactive power dispatch, obtain optimal load status
-- line status should be a dict with "key" as line name and "int or array" describing status over time interval


.. method:: get_solution_2d(self, VariableName, NameKey, ListIndex, SolDict=None)
.. py:method:: get_solution_2d(self, VariableName, NameKey, ListIndex, SolDict=None)
get solution and store into a one name key structured dictionary
:param VariableName: variable name in string format
Expand All @@ -122,7 +121,7 @@ Attributes



.. data:: ppc
.. py:data:: ppc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:mod:`gym_power_res.envs.GYM_ENV_restoration_distribution`
==========================================================
:py:mod:`gym_power_res.envs.GYM_ENV_restoration_distribution`
=============================================================

.. py:module:: gym_power_res.envs.GYM_ENV_restoration_distribution
Expand All @@ -20,19 +20,18 @@ Classes



.. class:: RestorationDisEnvRL(max_disturbance, min_disturbance)

.. py:class:: RestorationDisEnvRL(max_disturbance, min_disturbance)
Bases: :py:obj:`gym.Env`

Restoration env for StableBaseline3 (reinforcement learning algorithm collections)

.. attribute:: metadata
.. py:attribute:: metadata
.. method:: seed(self, seed=None)
.. py:method:: seed(self, seed=None)
Sets the seed for this env's random number generator(s).

Expand All @@ -49,22 +48,22 @@ Classes
this won't be true if seed=None, for example.


.. method:: reset(self, disturbance=None)
.. py:method:: reset(self, disturbance=None)
Here we should setup the episode control for the total time horizon, which will be independent of individual segment simulation


.. method:: step(self, action)
.. py:method:: step(self, action)
Apply the given actions to the environment for one step


.. method:: dict2list(self, dict)
.. py:method:: dict2list(self, dict)
convert an order dict to a list


.. method:: render(self, mode='human')
.. py:method:: render(self, mode='human')
Renders the environment.

Expand Down Expand Up @@ -103,7 +102,7 @@ Classes
super(MyEnv, self).render(mode=mode) # just raise an exception


.. method:: close(self)
.. py:method:: close(self)
Override close in your subclass to perform any necessary cleanup.

Expand All @@ -112,19 +111,18 @@ Classes



.. class:: RestorationDisEnv(max_disturbance, min_disturbance)

.. py:class:: RestorationDisEnv(max_disturbance, min_disturbance)
Bases: :py:obj:`gym.Env`

Restoration env for imitation learning

.. attribute:: metadata
.. py:attribute:: metadata
.. method:: seed(self, seed=None)
.. py:method:: seed(self, seed=None)
Sets the seed for this env's random number generator(s).

Expand All @@ -141,22 +139,22 @@ Classes
this won't be true if seed=None, for example.


.. method:: reset(self, disturbance=None)
.. py:method:: reset(self, disturbance=None)
Here we should setup the episode control for the total time horizon, which will be independent of individual segment simulation


.. method:: step(self, action)
.. py:method:: step(self, action)
Apply the given actions to the environment for one step


.. method:: dict2list(self, dict)
.. py:method:: dict2list(self, dict)
convert an order dict to a list


.. method:: render(self, mode='human')
.. py:method:: render(self, mode='human')
Renders the environment.

Expand Down Expand Up @@ -195,7 +193,7 @@ Classes
super(MyEnv, self).render(mode=mode) # just raise an exception


.. method:: close(self)
.. py:method:: close(self)
Override close in your subclass to perform any necessary cleanup.

Expand All @@ -204,19 +202,18 @@ Classes



.. class:: RestorationDisEnv119(max_disturbance, min_disturbance)

.. py:class:: RestorationDisEnv119(max_disturbance, min_disturbance)
Bases: :py:obj:`gym.Env`

Restoration env for imitation learning

.. attribute:: metadata
.. py:attribute:: metadata
.. method:: seed(self, seed=None)
.. py:method:: seed(self, seed=None)
Sets the seed for this env's random number generator(s).

Expand All @@ -233,22 +230,22 @@ Classes
this won't be true if seed=None, for example.


.. method:: reset(self, disturbance=None)
.. py:method:: reset(self, disturbance=None)
Here we should setup the episode control for the total time horizon, which will be independent of individual segment simulation


.. method:: step(self, action)
.. py:method:: step(self, action)
Apply the given actions to the environment for one step


.. method:: dict2list(self, dict)
.. py:method:: dict2list(self, dict)
convert an order dict to a list


.. method:: render(self, mode='human')
.. py:method:: render(self, mode='human')
Renders the environment.

Expand Down Expand Up @@ -287,7 +284,7 @@ Classes
super(MyEnv, self).render(mode=mode) # just raise an exception


.. method:: close(self)
.. py:method:: close(self)
Override close in your subclass to perform any necessary cleanup.

Expand All @@ -296,19 +293,18 @@ Classes



.. class:: RestorationDisVarConEnv(max_disturbance, min_disturbance)

.. py:class:: RestorationDisVarConEnv(max_disturbance, min_disturbance)
Bases: :py:obj:`gym.Env`

Restoration env with tieline and reactive power dispatch control

.. attribute:: metadata
.. py:attribute:: metadata
.. method:: seed(self, seed=None)
.. py:method:: seed(self, seed=None)
Sets the seed for this env's random number generator(s).

Expand All @@ -325,21 +321,21 @@ Classes
this won't be true if seed=None, for example.


.. method:: reset(self, disturbance=None)
.. py:method:: reset(self, disturbance=None)
Here we should setup the episode control for the total time horizon, which will be independent of individual segment simulation


.. method:: step(self, action, logger=None)
.. py:method:: step(self, action, logger=None)
Apply the given actions to the environment for one step
Action here is a dictionary with "tieline" and "varcon"


.. method:: view_grid(self)
.. py:method:: view_grid(self)
.. method:: render(self, mode='human')
.. py:method:: render(self, mode='human')
Renders the environment.

Expand Down Expand Up @@ -378,7 +374,7 @@ Classes
super(MyEnv, self).render(mode=mode) # just raise an exception


.. method:: close(self)
.. py:method:: close(self)
Override close in your subclass to perform any necessary cleanup.

Expand Down
Loading

0 comments on commit 60142bb

Please sign in to comment.