Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.

Commit

Permalink
Rename episode_analytics into episode
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Renault committed Feb 24, 2020
1 parent 52b8084 commit 555e82f
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 8 deletions.
1 change: 1 addition & 0 deletions grid2kpi/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .episode import EpisodeAnalytics
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _make_df_from_data(self):
-------
res: :class:`tuple`
generated dataframes
"""
"""
size = len(self.actions)
timesteps = list(range(size))
load_size = size * len(self.observations[0].load_p)
Expand Down Expand Up @@ -133,10 +133,17 @@ def _make_df_from_data(self):

pos = time_step
# TODO : change with benjamin's count of actions
action_line = np.sum(act._switch_line_status)
action_line = np.sum(act._switch_line_status) + np.sum(act._set_line_status)
if action_line > 0:
line_action = "reconnect " + line_action
if action_line < 0:
line_action = "disconnect " + line_action
action_line = - action_line

# TODO: change with benjamin's count of actions
action_subs = int(np.any(act._change_bus_vect))
action_subs = int(np.any(act._change_bus_vect)) + int(np.any(act._set_topo_vect))
if action_line:
action_subs = 0

object_changed_set = self.get_object_changed(
act._set_topo_vect, topo_list)
Expand Down
1 change: 1 addition & 0 deletions grid2kpi/episode/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .EpisodeAnalytics import *
File renamed without changes.
Empty file.
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from setuptools import setup
from setuptools import setup, find_packages


setup(name='Grid2Kpi',
version='0.1.0',
description='Toto',
long_description='Tata',
version='0.1.0-rc3',
description='Grid2Kpi',
long_description='Grid2Kpi',
classifiers=[
'Development Status :: 4 - Beta',
'Programming Language :: Python :: 3.6',
Expand All @@ -16,7 +16,7 @@
"Natural Language :: English"
],
license='MPL',
packages=['grid2kpi'],
packages=['grid2kpi', 'grid2kpi.episode'],
include_package_data=True,
install_requires=["numpy", "pandas", "pandapower", "Grid2Op", "plotly"],
zip_safe=False)

0 comments on commit 555e82f

Please sign in to comment.