Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Aug 12, 2023
1 parent 863fc72 commit a1007df
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 16 deletions.
9 changes: 5 additions & 4 deletions _modules/gym_electric_motor/core.html
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ <h1>Source code for gym_electric_motor.core</h1><div class="highlight"><pre>

<span class="sd"> Returns:</span>
<span class="sd"> The initial observation consisting of the initial state and initial reference.</span>
<span class="sd"> info(dict): Auxiliary information (optional) </span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="bp">self</span><span class="o">.</span><span class="n">_seed</span><span class="p">(</span><span class="n">seed</span><span class="p">)</span>
Expand Down Expand Up @@ -386,7 +387,7 @@ <h1>Source code for gym_electric_motor.core</h1><div class="highlight"><pre>
<span class="sd"> observation(Tuple(ndarray(float),ndarray(float)): Tuple of the new state and the next reference.</span>
<span class="sd"> reward(float): Amount of reward received for the last step.</span>
<span class="sd"> terminated(bool): Flag, indicating if a reset is required before new steps can be taken.</span>
<span class="sd"> {}: An empty dictionary for consistency with the OpenAi Gym interface.</span>
<span class="sd"> info(dict): Auxiliary information (optional) </span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="k">assert</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_terminated</span><span class="p">,</span> <span class="s1">&#39;A reset is required before the environment can perform further steps&#39;</span>
Expand Down Expand Up @@ -485,7 +486,7 @@ <h1>Source code for gym_electric_motor.core</h1><div class="highlight"><pre>
<span class="sd">&quot;&quot;&quot;The abstract base class for reference generators in gym electric motor environments.</span>

<span class="sd"> reference_space:</span>
<span class="sd"> Space of reference observations as defined in the OpenAI Gym Toolbox.</span>
<span class="sd"> Space of reference observations as defined in the Farama Gymnasium Toolbox.</span>

<span class="sd"> The reference generator is called twice per step.</span>

Expand Down Expand Up @@ -719,15 +720,15 @@ <h1>Source code for gym_electric_motor.core</h1><div class="highlight"><pre>
<span class="k">def</span> <span class="nf">action_space</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Returns:</span>
<span class="sd"> gymnasium.Space: An OpenAI Gym Space that describes the possible actions on the system.</span>
<span class="sd"> gymnasium.Space: An Farama Gymnasium Space that describes the possible actions on the system.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_action_space</span>

<span class="nd">@property</span>
<span class="k">def</span> <span class="nf">state_space</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Returns:</span>
<span class="sd"> gymnasium.Space: An OpenAI Gym Space that describes the possible states of the system.</span>
<span class="sd"> gymnasium.Space: An Farama Gymnasium Space that describes the possible states of the system.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_state_space</span>

Expand Down
11 changes: 6 additions & 5 deletions parts/core.html
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,8 @@ <h1>Core<a class="headerlink" href="#core" title="Permalink to this headline">
<dd><p>Reset of the environment and all its modules to an initial state.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>The initial observation consisting of the initial state and initial reference.</p>
<dd class="field-odd"><p>The initial observation consisting of the initial state and initial reference.
info(dict): Auxiliary information (optional)</p>
</dd>
</dl>
</dd></dl>
Expand Down Expand Up @@ -451,7 +452,7 @@ <h1>Core<a class="headerlink" href="#core" title="Permalink to this headline">
<dd class="field-even"><p>Tuple of the new state and the next reference.
reward(float): Amount of reward received for the last step.
terminated(bool): Flag, indicating if a reset is required before new steps can be taken.
{}: An empty dictionary for consistency with the OpenAi Gym interface.</p>
info(dict): Auxiliary information (optional)</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>observation(Tuple(ndarray(float),ndarray(float))</p>
Expand Down Expand Up @@ -502,7 +503,7 @@ <h1>Core<a class="headerlink" href="#core" title="Permalink to this headline">
<dt id="gym_electric_motor.core.PhysicalSystem.action_space">
<em class="property">property </em><code class="sig-name descname">action_space</code><a class="headerlink" href="#gym_electric_motor.core.PhysicalSystem.action_space" title="Permalink to this definition"></a></dt>
<dd><p>Returns:
gymnasium.Space: An OpenAI Gym Space that describes the possible actions on the system.</p>
gymnasium.Space: An Farama Gymnasium Space that describes the possible actions on the system.</p>
</dd></dl>

<dl class="method">
Expand Down Expand Up @@ -583,7 +584,7 @@ <h1>Core<a class="headerlink" href="#core" title="Permalink to this headline">
<dt id="gym_electric_motor.core.PhysicalSystem.state_space">
<em class="property">property </em><code class="sig-name descname">state_space</code><a class="headerlink" href="#gym_electric_motor.core.PhysicalSystem.state_space" title="Permalink to this definition"></a></dt>
<dd><p>Returns:
gymnasium.Space: An OpenAI Gym Space that describes the possible states of the system.</p>
gymnasium.Space: An Farama Gymnasium Space that describes the possible states of the system.</p>
</dd></dl>

<dl class="method">
Expand All @@ -607,7 +608,7 @@ <h1>Core<a class="headerlink" href="#core" title="Permalink to this headline">
<em class="property">class </em><code class="sig-prename descclassname">gym_electric_motor.core.</code><code class="sig-name descname">ReferenceGenerator</code><a class="reference internal" href="../_modules/gym_electric_motor/core.html#ReferenceGenerator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gym_electric_motor.core.ReferenceGenerator" title="Permalink to this definition"></a></dt>
<dd><p>The abstract base class for reference generators in gym electric motor environments.</p>
<dl class="simple">
<dt>reference_space:</dt><dd><p>Space of reference observations as defined in the OpenAI Gym Toolbox.</p>
<dt>reference_space:</dt><dd><p>Space of reference observations as defined in the Farama Gymnasium Toolbox.</p>
</dd>
</dl>
<p>The reference generator is called twice per step.</p>
Expand Down
5 changes: 3 additions & 2 deletions parts/environments/environment.html
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,8 @@ <h1>Environments<a class="headerlink" href="#environments" title="Permalink to t
<dd><p>Reset of the environment and all its modules to an initial state.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>The initial observation consisting of the initial state and initial reference.</p>
<dd class="field-odd"><p>The initial observation consisting of the initial state and initial reference.
info(dict): Auxiliary information (optional)</p>
</dd>
</dl>
</dd></dl>
Expand Down Expand Up @@ -631,7 +632,7 @@ <h1>Environments<a class="headerlink" href="#environments" title="Permalink to t
<dd class="field-even"><p>Tuple of the new state and the next reference.
reward(float): Amount of reward received for the last step.
terminated(bool): Flag, indicating if a reset is required before new steps can be taken.
{}: An empty dictionary for consistency with the OpenAi Gym interface.</p>
info(dict): Auxiliary information (optional)</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>observation(Tuple(ndarray(float),ndarray(float))</p>
Expand Down
4 changes: 2 additions & 2 deletions parts/physical_systems/physical_system.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ <h2>Physical System Base Class<a class="headerlink" href="#physical-system-base-
<dt id="gym_electric_motor.core.PhysicalSystem.action_space">
<em class="property">property </em><code class="sig-name descname">action_space</code><a class="headerlink" href="#gym_electric_motor.core.PhysicalSystem.action_space" title="Permalink to this definition"></a></dt>
<dd><p>Returns:
gymnasium.Space: An OpenAI Gym Space that describes the possible actions on the system.</p>
gymnasium.Space: An Farama Gymnasium Space that describes the possible actions on the system.</p>
</dd></dl>

<dl class="method">
Expand Down Expand Up @@ -195,7 +195,7 @@ <h2>Physical System Base Class<a class="headerlink" href="#physical-system-base-
<dt id="gym_electric_motor.core.PhysicalSystem.state_space">
<em class="property">property </em><code class="sig-name descname">state_space</code><a class="headerlink" href="#gym_electric_motor.core.PhysicalSystem.state_space" title="Permalink to this definition"></a></dt>
<dd><p>Returns:
gymnasium.Space: An OpenAI Gym Space that describes the possible states of the system.</p>
gymnasium.Space: An Farama Gymnasium Space that describes the possible states of the system.</p>
</dd></dl>

<dl class="method">
Expand Down
2 changes: 1 addition & 1 deletion parts/readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h2>Gym Electric Motor<a class="headerlink" href="#gym-electric-motor" title="Pe
<div class="section" id="overview">
<h3>Overview<a class="headerlink" href="#overview" title="Permalink to this headline"></a></h3>
<p>The gym-electric-motor (GEM) package is a Python toolbox for the simulation and control of various electric motors.
It is built upon <a class="reference external" href="https://gym.openai.com/">OpenAI Gym Environments</a>, and, therefore, can be used for both, classical control simulation and <a class="reference external" href="https://github.com/upb-lea/reinforcement_learning_course_materials">reinforcement learning</a> experiments. It allows you to construct a typical drive train with the usual building blocks, i.e., supply voltages, converters, electric motors and load models, and obtain not only a closed-loop simulation of this physical structure, but also a rich interface for plugging in any decision making algorithm, from linear feedback control to <a class="reference external" href="https://spinningup.openai.com/en/latest/algorithms/ddpg.html">Deep Deterministic Policy Gradient</a> agents.</p>
It is built upon <a class="reference external" href="https://gym.openai.com/">Faram Gymnasium Environments</a>, and, therefore, can be used for both, classical control simulation and <a class="reference external" href="https://github.com/upb-lea/reinforcement_learning_course_materials">reinforcement learning</a> experiments. It allows you to construct a typical drive train with the usual building blocks, i.e., supply voltages, converters, electric motors and load models, and obtain not only a closed-loop simulation of this physical structure, but also a rich interface for plugging in any decision making algorithm, from linear feedback control to <a class="reference external" href="https://spinningup.openai.com/en/latest/algorithms/ddpg.html">Deep Deterministic Policy Gradient</a> agents.</p>
</div>
<div class="section" id="getting-started">
<h3>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline"></a></h3>
Expand Down
2 changes: 1 addition & 1 deletion parts/reference_generators/reference_generator.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h2>Reference Generator Base Class<a class="headerlink" href="#reference-generat
<em class="property">class </em><code class="sig-prename descclassname">gym_electric_motor.core.</code><code class="sig-name descname">ReferenceGenerator</code><a class="reference internal" href="../../_modules/gym_electric_motor/core.html#ReferenceGenerator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gym_electric_motor.core.ReferenceGenerator" title="Permalink to this definition"></a></dt>
<dd><p>The abstract base class for reference generators in gym electric motor environments.</p>
<dl class="simple">
<dt>reference_space:</dt><dd><p>Space of reference observations as defined in the OpenAI Gym Toolbox.</p>
<dt>reference_space:</dt><dd><p>Space of reference observations as defined in the Farama Gymnasium Toolbox.</p>
</dd>
</dl>
<p>The reference generator is called twice per step.</p>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit a1007df

Please sign in to comment.