diff --git a/docs/build/doctrees/README.doctree b/docs/build/doctrees/README.doctree new file mode 100644 index 000000000..4e2f5e0d1 Binary files /dev/null and b/docs/build/doctrees/README.doctree differ diff --git a/docs/build/doctrees/analysis.doctree b/docs/build/doctrees/analysis.doctree index 6f3870c9d..d4bd93f4b 100644 Binary files a/docs/build/doctrees/analysis.doctree and b/docs/build/doctrees/analysis.doctree differ diff --git a/docs/build/doctrees/charging_sim.doctree b/docs/build/doctrees/charging_sim.doctree index ee4f1ac92..8b7023af7 100644 Binary files a/docs/build/doctrees/charging_sim.doctree and b/docs/build/doctrees/charging_sim.doctree differ diff --git a/docs/build/doctrees/environment.pickle b/docs/build/doctrees/environment.pickle index b4d34e398..de6b716f8 100644 Binary files a/docs/build/doctrees/environment.pickle and b/docs/build/doctrees/environment.pickle differ diff --git a/docs/build/doctrees/examples.doctree b/docs/build/doctrees/examples.doctree new file mode 100644 index 000000000..c38350e20 Binary files /dev/null and b/docs/build/doctrees/examples.doctree differ diff --git a/docs/build/doctrees/feeder_population.doctree b/docs/build/doctrees/feeder_population.doctree index 2dc9c2125..8af74bbbe 100644 Binary files a/docs/build/doctrees/feeder_population.doctree and b/docs/build/doctrees/feeder_population.doctree differ diff --git a/docs/build/doctrees/index.doctree b/docs/build/doctrees/index.doctree index e61d50eef..0b20731a7 100644 Binary files a/docs/build/doctrees/index.doctree and b/docs/build/doctrees/index.doctree differ diff --git a/docs/build/doctrees/modules.doctree b/docs/build/doctrees/modules.doctree index b12e39a5b..deba12fb2 100644 Binary files a/docs/build/doctrees/modules.doctree and b/docs/build/doctrees/modules.doctree differ diff --git a/docs/build/doctrees/test_cases.base_case.doctree b/docs/build/doctrees/test_cases.base_case.doctree index 568a7ba20..a0c9e3570 100644 Binary files a/docs/build/doctrees/test_cases.base_case.doctree and b/docs/build/doctrees/test_cases.base_case.doctree differ diff --git a/docs/build/doctrees/test_cases.battery.doctree b/docs/build/doctrees/test_cases.battery.doctree index 72be411d7..2a79bae66 100644 Binary files a/docs/build/doctrees/test_cases.battery.doctree and b/docs/build/doctrees/test_cases.battery.doctree differ diff --git a/docs/build/doctrees/test_cases.battery.feeder_population.doctree b/docs/build/doctrees/test_cases.battery.feeder_population.doctree index 0fcfd73df..36b35382d 100644 Binary files a/docs/build/doctrees/test_cases.battery.feeder_population.doctree and b/docs/build/doctrees/test_cases.battery.feeder_population.doctree differ diff --git a/docs/build/doctrees/test_cases.doctree b/docs/build/doctrees/test_cases.doctree index 71a7b5ffd..85129a00e 100644 Binary files a/docs/build/doctrees/test_cases.doctree and b/docs/build/doctrees/test_cases.doctree differ diff --git a/docs/build/doctrees/usage.doctree b/docs/build/doctrees/usage.doctree new file mode 100644 index 000000000..2447f47b0 Binary files /dev/null and b/docs/build/doctrees/usage.doctree differ diff --git a/docs/build/html/.buildinfo b/docs/build/html/.buildinfo index a258f4103..db3b6264b 100644 --- a/docs/build/html/.buildinfo +++ b/docs/build/html/.buildinfo @@ -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: 1d08c41284c9e8e0e594f44030babcfe +config: 9a5ab9220eaba148dacb38eb81465b8e tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/build/html/README.html b/docs/build/html/README.html new file mode 100644 index 000000000..b79b693e6 --- /dev/null +++ b/docs/build/html/README.html @@ -0,0 +1,272 @@ + + + + + + + EV-Ecosim platform — EV-Ecosim 1.0.0 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ +
+

EV-Ecosim platform

+

A grid-aware co-simulation platform for the design and optimization of electric vehicle charging stations. +Paper: https://doi.org/10.36227/techrxiv.23596725.v2

+

sim_frame.png

+
+

Authors

+

Emmanuel Balogun: ebalogun@stanford.edu, Lily Buechler: ebuech@stanford.edu

+
+
+

Requirements

+

GiSMo SLAC GridLAB-D installation (master branch): https://github.com/arras-energy/gridlabd. +This GridLAB-D version is required for the python co-simulation functionality. Recommended use with AWS EC2 SLAC +GiSMo HiPAS GridLAB-D AMI (beauharnois-X).

+
+
+

Folder descriptions

+
+

ambient_data

+

Hosts ambient temperature data for capturing the effects of environmental conditions on subsystems, such as battery, +transformers, charging stations.

+
+
+

base_load_data

+

Includes existing base case building/home load (usually uncontrollable) within the distribution grid. This work uses +proprietary Pecan Street Data. Below is an exmaple data prototype for the base load data. Note that column fields are +case-sensitive. The data used in the original paper has a minute resolution, as is the power system simulation. ``

+Base load data prototype.
+
+

batt_sys_identification

+

Battery system identification module. Hosts the class for generating battery system identification parameters +from experimental data. This module leverages a genetic algorithm to optimize the battery model parameters. +The battery model is a 2nd order RC Equivalent circuit model (ECM). One can this module to generate custom NMC +battery parameters by uploading experimental data to the batt_sys_identification/data folder and running the module. +The module will generate a .csv file with the battery parameters in the batt_sys_identification/params folder. +The data prototype is shown below. Note that column fields are case-sensitive.

+

batt_sys_data_proto.png

+

The module will save a new .csv file with an additional field for the corrected open circuit voltage (OCV) values; +this field (column) will be labelled ocv_corr within the new battery data csv, including the existing columns as shown +in the data prototype above.

+

Once the battery parameters are generated, they can be used in the battery_data folder and configs/battery.json can +be modified so the model runs using the new custom parameters.

+
+
+

charging_sim

+

This contains the configs folder which includes the configuration files for all the relevant modules.Hosts the implementation of the physical modules, including:

+
+

battery.py - Battery cell module.

+
+
+

batterypack.py - Battery pack module.

+
+
+

batteryAgingSim.py - Battery aging module.

+
+
+

controller.py - Controller module.

+
+
+

chargingStation.py - Charging station module.

+
+
+

electricityPrices.py - Electricity prices module.

+
+
+

optimization.py - Optimization module.

+
+
+

orchestrator.py - Simulation orchestrator module.

+
+
+

solar.py - Solar PV module.

+
+
+

utils.py - Hosts utility functions used by some modules.

+
+
+

simulate.py - Offline DER control optimization for cost minimization (this is run for offline mode (no state feedback)).

+
+
+
+

DLMODELS

+

This includes legacy load forecasts models developed (not needed).

+
+
+

elec_rates

+

Includes .csv files for electricity Time-of-use (TOU) rates. The input data prototype for electricity rates +is shown below. User must upload a normal full-year sized data (for 365 days) to avoid +any errors.

+

The data required must be in the format shown above. The electricityPrices.py module will read the data and sample +prices during optimization and simulation. The data should be one full year of TOU rate prices at 15 minute resolution. +The electricityPrices.py module can also help with downscaling the data to 15 minute resolution if the data is at a +much coarser resolution. The module will save the downscaled data in the elec_rates folder.

+
+
+

feeders

+

Library of IEEE test feeders and PNNL taxonomy feeders for distribution systems in the GridLAB-D .glm format. +IEEE feeders have spot loads specified at primary distribution level. PNNL taxonomy feeders have spot loads specified at +primary or secondary distribution level.

+
+
+

feeder_population

+

Scripts for populating base feeder models with time-varying loads and resources using the load data in base_load_data. +feeder_population.py generates the necessary files for a co-simulation run based on the parameters specified in +feeder_population/config.txt. This module uses the +Requires residential load data not included in repo (limited access).

+
+
+

solar_data

+

Includes solar irradiance data for capturing the effects of environmental conditions on overall system cost. Default +data for solar irradiance is from the National Solar Radiation Database (NSRDB) for the San Francisco Bay Area. +The data prototype is from the National Renewable Energy Laboratory (NREL) and is shown below. Note that column fields +are case-sensitive.

+

solar_data_proto.png

+

Month labels are indexed from 1 to 12, inclusive; 1 - January, 12 - December. The original data is in hourly resolution. +The EV-Ecosim data prototype is in 15 minute intervals by default, with irradiance oversampled 4 times from hourly +dataset. The GHI represents the “Global Horizontal Irradiance” in W/m^2, which is the total amount of shortwave radiation +received from above by a surface horizontal to the ground.

+
+
+

test_cases

+
+

Co-simulation cases.

+

base_case- Reads voltage from GridLAB-D and writes power injections at each timestep (no EV charging or DER).

+

rlsf - base_case plus implements a recursive least squares filter to estimate network model online (not used)

+

battery - base_case plus transformer thermal model plus DER integration (included battery and solar).

+

transformer - base_case plus simulation of transformer thermal model for each transformer in GridLAB-D model (not used).

+
+
+
+

analysis

+

Scripts for plotting and analysis of co-simulation results. Includes post optimization and simulation cost +calculation modules and voltage impacts on the distribution grid.

+

plot_results.py - This module is used post-simulation to parse the voltages from the power-simulation to calculate the percentage +voltage violations per ANSI C84.1. The file also generates voltage distribution plots. A user can modify the +SIMULATION_FOLDER variable which is the string of the path where the powerflow simulation output voltages at each node +exist.

+

load_post_opt_costs.py - This module is calculates the levelized cost of energy and populates into tables/cost matrices, which are saved in the +respective files and folders. The module also generates plots for the cost analysis.

+

cost_analysis.py - This module contains the CostEstimator class, which estimates the cost of the different grid and DER components +from the simulation.

+
+
+
+

How to run

+

Create a new environment using conda env create --name <your env name> -f environment.ymlOR +install packages listed in the environment manually (RECOMMENDED) +Ensure gridlabd is installed by following recommended installation method.

+

For battery test case:

+
    +
  • Navigate to test_cases/battery/feeder_population and run feeder_population.py. This uses the +test_cases/battery/feeder_population/config.txt settings to prepare the power system and populate the secondary +distribution network with time-varying base loads, EV charging stations, with the required transformers.

  • +
  • Once confirmed that feeder_population.py has run successfully and generates the required IEEE123_secondary.glm and +IEEE123_populated.glm files, you are done with the initial pre-simulation run prep.

  • +
  • Now navigate one level of out /feeder_population and run scenarios.py using python3 scenarios.py

  • +
+

For base case:

+
    +
  • Navigate to EV50_cosimulation/feeder_population and run feeder_population.py. This uses the +./feeder_population/config.txt settings to prepare the power system and populate the secondary distribution network
    with time-varying base loads

  • +
  • Navigate to test_cases/base_case and run master_sim.py using python3 master_sim.py

  • +
+
+
+

Post-simulation analysis

+
    +
  • This is done with the modules in the analysis folder. Please see the analysis folder section for more details.

  • +
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/build/html/_images/sim_frame.png b/docs/build/html/_images/sim_frame.png new file mode 100644 index 000000000..97deaca2a Binary files /dev/null and b/docs/build/html/_images/sim_frame.png differ diff --git a/docs/build/html/_modules/charging_sim/capacitor.html b/docs/build/html/_modules/charging_sim/capacitor.html index 746799fd4..f6b75fbb7 100644 --- a/docs/build/html/_modules/charging_sim/capacitor.html +++ b/docs/build/html/_modules/charging_sim/capacitor.html @@ -1,33 +1,74 @@ - - - - - - charging_sim.capacitor — EV-Ecosim 1.0.0 documentation - - - - - - - - - + + + + + charging_sim.capacitor — EV-Ecosim 1.0.0 documentation + + + - - + + + + + + + + + - - + +
+ + +
+ +
+
+
+ +
+
+
+
+

Source code for charging_sim.capacitor

 """This file hosts the class for capacitors. Future work"""
 #TODO: develop new class for super-caps for future study: Modelling, constraints, and features
@@ -37,69 +78,31 @@ 

Source code for charging_sim.capacitor

         self.name = name
+
- -
-
- -
-
- - - - - - + + + + + \ No newline at end of file diff --git a/docs/build/html/_modules/feeder_population/glm_mod_functions.html b/docs/build/html/_modules/feeder_population/glm_mod_functions.html index 98b065246..63238f435 100644 --- a/docs/build/html/_modules/feeder_population/glm_mod_functions.html +++ b/docs/build/html/_modules/feeder_population/glm_mod_functions.html @@ -41,7 +41,8 @@ diff --git a/docs/build/html/_modules/index.html b/docs/build/html/_modules/index.html index 3cdc0ed73..4f4da7391 100644 --- a/docs/build/html/_modules/index.html +++ b/docs/build/html/_modules/index.html @@ -10,11 +10,11 @@ - - - - - + + + + + @@ -41,7 +41,8 @@ diff --git a/docs/build/html/_modules/test_cases/battery/feeder_population/glm_mod_functions.html b/docs/build/html/_modules/test_cases/battery/feeder_population/glm_mod_functions.html index cd3ac0ea2..70a287a4e 100644 --- a/docs/build/html/_modules/test_cases/battery/feeder_population/glm_mod_functions.html +++ b/docs/build/html/_modules/test_cases/battery/feeder_population/glm_mod_functions.html @@ -41,7 +41,8 @@ diff --git a/docs/build/html/_sources/README.md.txt b/docs/build/html/_sources/README.md.txt new file mode 100644 index 000000000..426c10499 --- /dev/null +++ b/docs/build/html/_sources/README.md.txt @@ -0,0 +1,170 @@ +# EV-Ecosim platform + +A grid-aware co-simulation platform for the design and optimization of electric vehicle charging stations. +Paper: https://doi.org/10.36227/techrxiv.23596725.v2 + +[//]: # () + +![sim_frame.png](doc_images%2Fsim_frame.png) + +[//]: # (EV-Ecosim Framework Description) + +## Authors +Emmanuel Balogun: ebalogun@stanford.edu, Lily Buechler: ebuech@stanford.edu + + +## Requirements + +GiSMo SLAC GridLAB-D installation (master branch): https://github.com/arras-energy/gridlabd. +This GridLAB-D version is required for the python co-simulation functionality. Recommended use with AWS EC2 SLAC +GiSMo HiPAS GridLAB-D AMI (beauharnois-X). + +## Folder descriptions + +### ambient_data + +Hosts ambient temperature data for capturing the effects of environmental conditions on subsystems, such as battery, +transformers, charging stations. + + +### base_load_data + +Includes existing base case building/home load (usually uncontrollable) within the distribution grid. This work uses +proprietary Pecan Street Data. Below is an exmaple data prototype for the base load data. Note that column fields are +case-sensitive. The data used in the original paper has a minute resolution, as is the power system simulation. `` + +Base load data prototype. + +[//]: # (![baseload_data_proto.png](doc_images%2Fbaseload_data_proto.png)) + + +### batt_sys_identification +Battery system identification module. Hosts the class for generating battery system identification parameters +from experimental data. This module leverages a genetic algorithm to optimize the battery model parameters. +The battery model is a 2nd order RC Equivalent circuit model (ECM). One can this module to generate custom NMC +battery parameters by uploading experimental data to the `batt_sys_identification/data` folder and running the module. +The module will generate a `.csv` file with the battery parameters in the `batt_sys_identification/params` folder. +The data prototype is shown below. Note that column fields are case-sensitive. + +![batt_sys_data_proto.png](doc_images%2Fbatt_sys_data_proto.png) + +The module will save a new `.csv` file with an additional field for the corrected open circuit voltage (OCV) values; +this field (column) will be labelled `ocv_corr` within the new battery data csv, including the existing columns as shown +in the data prototype above. + +Once the battery parameters are generated, they can be used in the `battery_data` folder and `configs/battery.json` can +be modified so the model runs using the new custom parameters. + +### charging_sim + +This contains the `configs` folder which includes the configuration files for all the relevant modules.Hosts the implementation of the physical modules, including: +##### `battery.py` - Battery cell module. +##### `batterypack.py` - Battery pack module. +##### `batteryAgingSim.py` - Battery aging module. +##### `controller.py` - Controller module. +##### `chargingStation.py` - Charging station module. +##### `electricityPrices.py` - Electricity prices module. +##### `optimization.py` - Optimization module. +##### `orchestrator.py` - Simulation orchestrator module. +##### `solar.py` - Solar PV module. +##### `utils.py` - Hosts utility functions used by some modules. +##### `simulate.py` - Offline DER control optimization for cost minimization (this is run for offline mode (no state feedback)). + + +### DLMODELS + +This includes legacy load forecasts models developed (not needed). + + +### elec_rates + +Includes .csv files for electricity Time-of-use (TOU) rates. The input data prototype for electricity rates +is shown below. User must upload a normal full-year sized data (for 365 days) to avoid +any errors. + + + +The data required must be in the format shown above. The `electricityPrices.py` module will read the data and sample +prices during optimization and simulation. The data should be one full year of TOU rate prices at 15 minute resolution. +The `electricityPrices.py` module can also help with downscaling the data to 15 minute resolution if the data is at a +much coarser resolution. The module will save the downscaled data in the `elec_rates` folder. + +### feeders +Library of IEEE test feeders and PNNL taxonomy feeders for distribution systems in the GridLAB-D `.glm` format. +IEEE feeders have spot loads specified at primary distribution level. PNNL taxonomy feeders have spot loads specified at +primary or secondary distribution level. + + +### feeder_population +Scripts for populating base feeder models with time-varying loads and resources using the load data in base_load_data. +`feeder_population.py` generates the necessary files for a co-simulation run based on the parameters specified in +`feeder_population/config.txt`. This module uses the +Requires residential load data not included in repo (limited access). + + + +### solar_data +Includes solar irradiance data for capturing the effects of environmental conditions on overall system cost. Default +data for solar irradiance is from the National Solar Radiation Database (NSRDB) for the San Francisco Bay Area. +The data prototype is from the National Renewable Energy Laboratory (NREL) and is shown below. Note that column fields +are case-sensitive. + +![solar_data_proto.png](doc_images%2Fsolar_data_proto.png) + +Month labels are indexed from 1 to 12, inclusive; 1 - January, 12 - December. The original data is in hourly resolution. +The *EV-Ecosim* data prototype is in 15 minute intervals by default, with irradiance oversampled 4 times from hourly +dataset. The GHI represents the "Global Horizontal Irradiance" in W/m^2, which is the total amount of shortwave radiation +received from above by a surface horizontal to the ground. + +### test_cases + +#### Co-simulation cases. + `base_case`- Reads voltage from GridLAB-D and writes power injections at each timestep (no EV charging or DER). + +`rlsf` - base_case plus implements a recursive least squares filter to estimate network model online (not used) + +`battery` - base_case plus transformer thermal model plus DER integration (included battery and solar). + +`transformer` - base_case plus simulation of transformer thermal model for each transformer in GridLAB-D model (not used). + + + +### analysis + +Scripts for plotting and analysis of co-simulation results. Includes post optimization and simulation cost +calculation modules and voltage impacts on the distribution grid. + +`plot_results.py` - This module is used post-simulation to parse the voltages from the power-simulation to calculate the percentage +voltage violations per ANSI C84.1. The file also generates voltage distribution plots. A user can modify the +SIMULATION_FOLDER variable which is the string of the path where the powerflow simulation output voltages at each node +exist. + +`load_post_opt_costs.py` - This module is calculates the levelized cost of energy and populates into tables/cost matrices, which are saved in the +respective files and folders. The module also generates plots for the cost analysis. + +`cost_analysis.py` - This module contains the `CostEstimator` class, which estimates the cost of the different grid and DER components +from the simulation. + + +## How to run +Create a new environment using `conda env create --name -f environment.yml`OR +install packages listed in the environment manually (RECOMMENDED) +Ensure gridlabd is installed by following recommended installation method. + +For battery test case: +* Navigate to `test_cases/battery/feeder_population` and run `feeder_population.py`. This uses the + `test_cases/battery/feeder_population/config.txt` settings to prepare the power system and populate the secondary + distribution network with time-varying base loads, EV charging stations, with the required transformers. +* Once confirmed that `feeder_population.py` has run successfully and generates the required `IEEE123_secondary.glm` and + `IEEE123_populated.glm` files, you are done with the initial pre-simulation run prep. +* Now navigate one level of out `/feeder_population` and run scenarios.py using `python3 scenarios.py` + +For base case: +* Navigate to `EV50_cosimulation/feeder_population` and run `feeder_population.py`. This uses the + `./feeder_population/config.txt` settings to prepare the power system and populate the secondary distribution network \ + with time-varying base loads +* Navigate to `test_cases/base_case` and run master_sim.py using `python3 master_sim.py` + +## Post-simulation analysis + * This is done with the modules in the `analysis` folder. Please see the `analysis` folder section for more details. + diff --git a/docs/build/html/_sources/analysis.rst.txt b/docs/build/html/_sources/analysis.rst.txt index 442fb0f59..63546e198 100644 --- a/docs/build/html/_sources/analysis.rst.txt +++ b/docs/build/html/_sources/analysis.rst.txt @@ -1,4 +1,4 @@ -analysis package +Post-simulation analysis ================ Submodules diff --git a/docs/build/html/_sources/charging_sim.rst.txt b/docs/build/html/_sources/charging_sim.rst.txt index 196252d0e..835283f7a 100644 --- a/docs/build/html/_sources/charging_sim.rst.txt +++ b/docs/build/html/_sources/charging_sim.rst.txt @@ -1,4 +1,4 @@ -charging\_sim package +Charging simulator ===================== Submodules diff --git a/docs/build/html/_sources/examples.rst.txt b/docs/build/html/_sources/examples.rst.txt new file mode 100644 index 000000000..e69de29bb diff --git a/docs/build/html/_sources/feeder_population.rst.txt b/docs/build/html/_sources/feeder_population.rst.txt index d94abeb69..64aa90e82 100644 --- a/docs/build/html/_sources/feeder_population.rst.txt +++ b/docs/build/html/_sources/feeder_population.rst.txt @@ -1,4 +1,4 @@ -feeder\_population package +Feeder population ========================== Submodules diff --git a/docs/build/html/_sources/index.rst.txt b/docs/build/html/_sources/index.rst.txt index 90944ea24..aa8975082 100644 --- a/docs/build/html/_sources/index.rst.txt +++ b/docs/build/html/_sources/index.rst.txt @@ -10,17 +10,23 @@ stations integrated with Solar and Battery systems. This is a python based platf a 3-phase unbalanced power flow solver, to estimate the impacts of EV (Fast) Charging Stations on power distribution networks. -We have made a web-tool version available for public use. It runs most of the code shown in this API documentation. +.. image:: ../../doc_images/sim_frame.png + :width: 100% + :align: center + :alt: EV-Ecosim Simulation Framework + +We have made a web-tool version available for public use. It runs most of the code shown in this documentation. The project is accessible via Github and still under active development and improvements. -# A mini-tutorial for running a simple case is shown below. -# Include information on the container +TODO - Link to tutorial. +TODO - Include information on the container. .. toctree:: :maxdepth: 2 :caption: Contents: + readme modules @@ -28,10 +34,6 @@ The project is accessible via Github and still under active development and impr Indices and tables ================== -* :ref:`Install` -* :ref:`User Guide` -* :ref:`Examples` -* :ref:`Citing EV-Ecosim` * :ref:`genindex` * :ref:`modindex` * :ref:`search` diff --git a/docs/build/html/_sources/modules.rst.txt b/docs/build/html/_sources/modules.rst.txt index 8ed265669..a328dd802 100644 --- a/docs/build/html/_sources/modules.rst.txt +++ b/docs/build/html/_sources/modules.rst.txt @@ -1,6 +1,5 @@ -EV50_cosimulation +Packages ================= - .. toctree:: :maxdepth: 4 @@ -8,3 +7,5 @@ EV50_cosimulation charging_sim feeder_population test_cases + + diff --git a/docs/build/html/_sources/readme.rst.txt b/docs/build/html/_sources/readme.rst.txt new file mode 100644 index 000000000..1efd2d475 --- /dev/null +++ b/docs/build/html/_sources/readme.rst.txt @@ -0,0 +1,3 @@ +Readme +================= +.. mdinclude:: ../../README.md \ No newline at end of file diff --git a/docs/build/html/_sources/test_cases.rst.txt b/docs/build/html/_sources/test_cases.rst.txt index 5d91c5e37..f5dd0d32f 100644 --- a/docs/build/html/_sources/test_cases.rst.txt +++ b/docs/build/html/_sources/test_cases.rst.txt @@ -1,4 +1,4 @@ -test\_cases package +Test cases =================== Subpackages diff --git a/docs/build/html/_sources/usage.rst.txt b/docs/build/html/_sources/usage.rst.txt new file mode 100644 index 000000000..5287fed43 --- /dev/null +++ b/docs/build/html/_sources/usage.rst.txt @@ -0,0 +1,3 @@ +Readme +----------------- +.. mdinclude:: ../../README.md \ No newline at end of file diff --git a/docs/build/html/_static/basic.css b/docs/build/html/_static/basic.css index 7577acb1a..30fee9d0f 100644 --- a/docs/build/html/_static/basic.css +++ b/docs/build/html/_static/basic.css @@ -237,6 +237,10 @@ a.headerlink { visibility: hidden; } +a:visited { + color: #551A8B; +} + h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, @@ -670,6 +674,16 @@ dd { margin-left: 30px; } +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + dl > dd:last-child, dl > dd:last-child > :last-child { margin-bottom: 0; @@ -738,6 +752,14 @@ abbr, acronym { cursor: help; } +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + /* -- code displays --------------------------------------------------------- */ pre { diff --git a/docs/build/html/_static/documentation_options.js b/docs/build/html/_static/documentation_options.js index 995f333f6..89435bb41 100644 --- a/docs/build/html/_static/documentation_options.js +++ b/docs/build/html/_static/documentation_options.js @@ -1,5 +1,4 @@ -var DOCUMENTATION_OPTIONS = { - URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), +const DOCUMENTATION_OPTIONS = { VERSION: '1.0.0', LANGUAGE: 'en', COLLAPSE_INDEX: false, diff --git a/docs/build/html/_static/searchtools.js b/docs/build/html/_static/searchtools.js index 97d56a74d..7918c3fab 100644 --- a/docs/build/html/_static/searchtools.js +++ b/docs/build/html/_static/searchtools.js @@ -57,12 +57,12 @@ const _removeChildren = (element) => { const _escapeRegExp = (string) => string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string -const _displayItem = (item, searchTerms) => { +const _displayItem = (item, searchTerms, highlightTerms) => { const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; - const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT; const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + const contentRoot = document.documentElement.dataset.content_root; const [docName, title, anchor, descr, score, _filename] = item; @@ -75,20 +75,24 @@ const _displayItem = (item, searchTerms) => { if (dirname.match(/\/index\/$/)) dirname = dirname.substring(0, dirname.length - 6); else if (dirname === "index/") dirname = ""; - requestUrl = docUrlRoot + dirname; + requestUrl = contentRoot + dirname; linkUrl = requestUrl; } else { // normal html builders - requestUrl = docUrlRoot + docName + docFileSuffix; + requestUrl = contentRoot + docName + docFileSuffix; linkUrl = docName + docLinkSuffix; } let linkEl = listItem.appendChild(document.createElement("a")); linkEl.href = linkUrl + anchor; linkEl.dataset.score = score; linkEl.innerHTML = title; - if (descr) + if (descr) { listItem.appendChild(document.createElement("span")).innerHTML = " (" + descr + ")"; + // highlight search terms in the description + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + } else if (showSearchSummary) fetch(requestUrl) .then((responseData) => responseData.text()) @@ -97,6 +101,9 @@ const _displayItem = (item, searchTerms) => { listItem.appendChild( Search.makeSearchSummary(data, searchTerms) ); + // highlight search terms in the summary + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); }); Search.output.appendChild(listItem); }; @@ -115,14 +122,15 @@ const _finishSearch = (resultCount) => { const _displayNextItem = ( results, resultCount, - searchTerms + searchTerms, + highlightTerms, ) => { // results left, load the summary and display it // this is intended to be dynamic (don't sub resultsCount) if (results.length) { - _displayItem(results.pop(), searchTerms); + _displayItem(results.pop(), searchTerms, highlightTerms); setTimeout( - () => _displayNextItem(results, resultCount, searchTerms), + () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), 5 ); } @@ -360,7 +368,7 @@ const Search = { // console.info("search results:", Search.lastresults); // print the results - _displayNextItem(results, results.length, searchTerms); + _displayNextItem(results, results.length, searchTerms, highlightTerms); }, /** diff --git a/docs/build/html/_static/sphinx_highlight.js b/docs/build/html/_static/sphinx_highlight.js index aae669d7e..8a96c69a1 100644 --- a/docs/build/html/_static/sphinx_highlight.js +++ b/docs/build/html/_static/sphinx_highlight.js @@ -29,14 +29,19 @@ const _highlight = (node, addItems, text, className) => { } span.appendChild(document.createTextNode(val.substr(pos, text.length))); + const rest = document.createTextNode(val.substr(pos + text.length)); parent.insertBefore( span, parent.insertBefore( - document.createTextNode(val.substr(pos + text.length)), + rest, node.nextSibling ) ); node.nodeValue = val.substr(0, pos); + /* There may be more occurrences of search term in this node. So call this + * function recursively on the remaining fragment. + */ + _highlight(rest, addItems, text, className); if (isInSVG) { const rect = document.createElementNS( @@ -140,5 +145,10 @@ const SphinxHighlight = { }, }; -_ready(SphinxHighlight.highlightSearchWords); -_ready(SphinxHighlight.initEscapeListener); +_ready(() => { + /* Do not call highlightSearchWords() when we are on the search page. + * It will highlight words from the *previous* search query. + */ + if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); + SphinxHighlight.initEscapeListener(); +}); diff --git a/docs/build/html/analysis.html b/docs/build/html/analysis.html index b559f0a3a..2d6b316da 100644 --- a/docs/build/html/analysis.html +++ b/docs/build/html/analysis.html @@ -4,23 +4,23 @@ - analysis package — EV-Ecosim 1.0.0 documentation + Post-simulation analysis — EV-Ecosim 1.0.0 documentation - - - - - + + + + + - - + + @@ -44,8 +44,9 @@