Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Read the docs #117

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
cc8fe19
First basic running version of geoplotting
PaulScheerRLI Jan 18, 2023
bf70a30
Track as line, annotations and more
PaulScheerRLI Jan 18, 2023
5af6899
Add hover to plot
PaulScheerRLI Jan 19, 2023
197c0c0
Add various track plotting elements
PaulScheerRLI Jan 30, 2023
e02dca1
Bring base case to working condition
PaulScheerRLI Jan 30, 2023
e42ebbd
Change for Berlin data
PaulScheerRLI Feb 1, 2023
5f83824
Change import calls to include ebus_toolbox package name, so sphinx d…
PaulScheerRLI Feb 1, 2023
555aa47
Add first rst files to docs source
PaulScheerRLI Feb 3, 2023
de4259f
Extend doc and add figures
PaulScheerRLI Feb 7, 2023
30a667f
Remove geopositons from this branch
PaulScheerRLI Feb 7, 2023
65ab842
Make flake8 happy
PaulScheerRLI Feb 7, 2023
235f34e
Merge branch 'dev' into feature/read_the_docs
PaulScheerRLI Feb 7, 2023
8bdf7a7
Add more doc
PaulScheerRLI Feb 8, 2023
dc7bdcf
Extend modes
PaulScheerRLI Feb 24, 2023
c33aced
Merge stuff from dev
PaulScheerRLI Feb 24, 2023
510389a
Extend modes
PaulScheerRLI Feb 24, 2023
462409d
explanation of cost calculation in rtd
jakobgemassmer Apr 6, 2023
57288dc
Merge changes
PaulScheerRLI Apr 25, 2023
225f3e4
Merge branch 'dev' into feature/read_the_docs
PaulScheerRLI Apr 25, 2023
4865393
Fix several issues with doc string formatting, e.g. blank lines and i…
PaulScheerRLI Apr 25, 2023
054a526
Add to the station optimizer
PaulScheerRLI Apr 25, 2023
5e623cc
Add to the station optimizer
PaulScheerRLI Apr 25, 2023
9308767
Add to station optimization
PaulScheerRLI Apr 27, 2023
206614e
Add to report description
PaulScheerRLI Apr 27, 2023
61f3d24
Add overview png and files folder
PaulScheerRLI Apr 27, 2023
8a477d6
Add overview png and files folder
PaulScheerRLI Apr 27, 2023
9663d28
Merge branch 'dev' into feature/read_the_docs
j-brendel May 9, 2023
f4ab5c4
make make html possible and restructure doc directories for images
j-brendel May 9, 2023
6dbe203
add methodology_overview.png
j-brendel May 25, 2023
398b34a
change RTD mode description of service opt
May 26, 2023
df112cf
Merge pull request #123 from rl-institut/feature/rtd_service_optimiza…
PaulScheerRLI May 26, 2023
c3cf91c
fix typo
Jun 7, 2023
1c9f508
change name to SimBA in rtd text
j-brendel Aug 1, 2023
79f52a8
solve stashed merge conflicts
j-brendel Aug 1, 2023
9eb687c
change logo to SimBA
j-brendel Aug 1, 2023
0f715ea
update rtd pictures, config and getting_started
j-brendel Aug 1, 2023
7a19fbd
make new flake8 6.1 happy
j-brendel Aug 1, 2023
230fbc6
add simba_modules to rtd
j-brendel Aug 1, 2023
83ceb7b
Merge branch 'feature/read_the_docs' of https://github.com/rl-institu…
PaulScheerRLI Aug 2, 2023
c6c0ec5
Rollback
PaulScheerRLI Aug 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ __pycache__
docs/_build
docs/source/temp

data/*
!data/examples
data/private_examples
data/sim_outputs
data/private_examples
data/gogs_buffered

src/
spice_ev/
*.bak
/tests/test_output_files/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ To try it out, first clone this repository and then install the required package

`pip install -r requirements.txt`

Now you can start the eBus Toolbox module with all configurations stored at `data/examples/ebus_toolbox.cfg` via the command
Now you can start the eBus Toolbox module with all configurations stored at `data/configs/ebus_toolbox.cfg` via the command

``python -m ebus_toolbox --config data/examples/ebus_toolbox.cfg``
``python -m ebus_toolbox --config data/configs/ebus_toolbox.cfg``

The repo provides an example for each necessary input file, so the example case can be executed without the need for the user to provide any data themselves.

Expand Down
83 changes: 0 additions & 83 deletions data/examples/default_optimizer.cfg

This file was deleted.

12 changes: 4 additions & 8 deletions data/examples/ebus_toolbox.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,19 @@ outside_temperature_over_day_path = data/examples/default_temp_winter.csv
# Path to level of loading csv. data with temperatures in deg Celsius over 0-23 hours
# (Optional: needed if mileage in vehicle types not constant)
level_of_loading_over_day_path = data/examples/default_level_of_loading_over_day.csv
# Path to configuration file for the station optimization. Only needed for mode "station_optimization"
optimizer_config = data/examples/default_optimizer.cfg
# Cost parameters (needed if cost_calculation flag is set to true, see Flag section below)
cost_parameters_file = data/examples/cost_params.json

##### Modes #####
### Specify how you want to simulate the scenario ###
### Specify how you want to simulate the szenario ###
# Options: sim, neg_depb_to_oppb, neg_oppb_to_depb, service_optimization.
# sim runs a single simulation with the given inputs.
# neg_depb_to_oppb changes negative depb-rotations to oppb charging.
# neg_oppb_to_depb changes negative oppb-rotations to depb charging.
# service_optimization finds the largest set of electrified rotations, rotations SOC<0 are removed.
# station_optimization finds the set of fewest stations to electrify all rotations.
# remove_negative removes all negative rotations.
# report generates simulation output files, including costs.
mode = ["sim", "report"]
#mode = ["sim", "neg_depb_to_oppb", "service_optimization", "station_optimization", "remove_negative", "report"]
#mode = ["sim", "neg_depb_to_oppb", "service_optimization", "report"]

##### Flags #####
### Activate optional functions ###
Expand Down Expand Up @@ -80,10 +76,10 @@ default_buffer_time_opps = 0
# Options: HV, HV/MV, MV, MV/LV, LV (default: MV)
default_voltage_level = "MV"

##### SIMULATION PARAMETERS #####
##### Simulation Parameters #####
# Maximum number of days to simulate, if not set simulate entire schedule
#days = 10
# Set length of time step in minutes (default: 1)
# Set length of timestep in minutes (default: 1)
interval = 1
# Time difference between signal time and actual start time of a vehicle event in min. (default: 10)
signal_time_dif = 10
Expand Down
71 changes: 71 additions & 0 deletions data/examples/optimizer.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Configs for the eBus Toolbox Optimizer
[DEFAULT]
debug_level=1

[SCENARIO]
# Use "" for ids and not ''
exclusion_rots = ["6003_6", "7003_7"]
exclusion_stations= []
# If using inclusion stations, scenario should be rebased
inclusion_stations= []
standard_opp_station={"type": "opps", "n_charging_stations": 200,"distance_transformer": 50,
"voltage_level": "MV"}

[PICKLE]
schedule=schedule_neg_dep_to_oppb_buffered_only_depot.pickle
scenario=scenario_neg_dep_to_oppb_buffered_only_depot.pickle
args=args_neg_dep_to_oppb_buffered_only_depot.pickle
# schedule=schedule_buffered_all_oppb.pickle
# scenario=scenario_buffered_all_oppb.pickle
# args=args_buffered_all_oppb.pickle
# schedule=schedule_buffered_depots_utf.pickle
# scenario=scenario_buffered_depots_utf.pickle
# args=args_buffered_utf.pickle


[VEHICLE]
charge_eff = 0.95
# battery_capacity = 400
# charging_curve = [[0, 450], [0.8, 296], [0.9, 210], [1, 20]]
# charging_power = 250
# min_soc=0.05

[OPTIMIZER]
# Not optional path to outputs of optimizer
output_path=data/private_examples/332_Buffered/optimization
save_all_results=True
# "quick" or "spiceev"
solver = quick
rebase_scenario = False
pickle_rebased= False
pickle_rebased_name=buffered_rebase_all_electrified
run_only_neg=False
pruning_threshold=0

# "greedy" or "deep" without ""
opt_type = deep
# "step-by-step" or "brute" without ""
node_choice=step-by-step
max_brute_loop=300
estimation_threshold = 0.90

# Preferring deps leads to a spice_ev simulation with preferred charging type depots
# Afterwards all negative rotations are swapped to opportunity chargers and optimized
# prefer_deps=True

# Removing impossible rotations leads to a quick calculation estimating if rotations are impossible.impossible
# If they are deemed as impossible, they are not optimized but discarded
remove_impossible_rots=True
check_for_must_stations=True
include_must_stations = True



[SPECIAL]
decision_tree_path = ""
save_decision_tree = False
reduce_rots = False
# Use "" for ids and not ''
# Negative Rots in all deps
rots = ["0310b_3", "0317_3", "0308_3", "0301b_5", "0404b_4", "0301b_2", "0802b_5", "0401b_4", "7401_7", "0702b_3", "0307a_3", "0307a_1", "0404a_3", "0711_3", "0817_2", "6002a_6", "6302_6", "6306b_6", "0302a_1", "0308_2", "0811_4", "0307b_5", "0705_5", "0801a_4", "0711_4", "0303_3", "0705_3", "0402_5", "0304_2", "0304_3", "0801a_1", "0314_4", "0002_1", "7310a_7", "0811_3", "6711_6", "0301a_5", "0301b_1", "0403_4", "0310b_4", "0701a_2", "0303_1", "0311a_3", "0711_1", "0317_1", "0318_5", "0305_2", "0402_4", "0002_4", "0403_5", "0801a_3", "0310a_2", "0803b_2", "0314_5", "0702b_5", "0701a_1", "0401b_5", "0005a_5", "0801b_5", "0310a_4", "0311a_5", "0311a_4", "0404b_1", "0014b_2", "0803b_5", "0306a_4", "0726_5", "0318_1", "0005a_2", "0303_5", "0308_4", "0002_3", "0306a_3", "0307a_4", "0701a_4", "0401a_4", "6403_6", "0404a_2", "6309a_6", "0314_3", "0317_4", "0401a_2", "0705_1", "0310b_1", "0701a_5", "0310a_1", "0404a_1", "0302a_5", "6305a_6", "0817_4", "0312a_1", "0301a_2", "0705_4", "0305_1", "0312a_4", "0702b_2", "0302b_5", "0005a_4", "6001a_6", "0003b_1", "0301b_4", "0310a_3", "6003_6", "0302a_2", "0817_3", "0404b_5", "0403_2", "0317_5", "0817_1", "0401b_3", "0003b_3", "0726_1", "0701a_3", "7005_7", "0311a_2", "0307b_3", "0301b_3", "0314_2", "6310b_6", "0803b_3", "0014b_1", "0401a_3", "0306a_1", "0305_5", "6303a_6", "6401_6", "0303_2", "6301_6", "0005a_3", "0404a_4", "0312a_2", "0302a_4", "7402_7", "0401b_2", "0301a_1", "0402_2", "0014b_3", "0307b_1", "0803b_1", "6002b_6", "0303_4", "6310a_6", "0302a_3", "0318_4", "7811_7", "0306a_2", "0312a_3", "0308_5", "0014b_4", "0310a_5", "0319_1", "0310b_5", "0705_2", "0002_2", "7702b_7", "7711_7", "0811_2", "0403_1", "0319_3", "0317_2", "0726_3", "0404a_5", "0726_4", "0307b_2", "6901_6", "0319_4", "0005b_5", "0305_4", "6702b_6", "7002b_7", "0304_5", "0305_3", "0003b_2", "0401b_1", "0801a_5", "0301a_3", "0402_1", "0005a_1", "0319_5", "6306a_6", "0319_2", "0311a_1", "0401a_5", "0003b_5", "0307a_5", "0307a_2", "0301a_4", "0318_3", "0308_1", "0726_2", "0803b_4", "6001b_6", "0401a_1", "0312a_5", "6703b_6", "0711_2", "0811_1", "0702b_1", "0314_1", "0014b_5", "0310b_2", "0404b_2", "0003b_4", "0307b_4", "0304_1", "0306a_5", "0811_5", "0403_3", "0318_2", "0402_3", "0817_5", "0404b_3", "0702b_4", "0711_5", "7003_7", "0002_5", "0304_4", "0801a_2"]

25 changes: 22 additions & 3 deletions data/examples/vehicle_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"charging_curve": [[0, 150], [0.8, 150], [1, 15]],
"min_charging_power": 0,
"v2g": false,
"mileage": "data/examples/energy_consumption_example.csv",
"battery_efficiency": 0.95 // optional. default: 0.95
"mileage": "data/examples/energy_consumption_example.csv"
},
"oppb": {
"name": "articulated bus - opportunity charging",
Expand Down Expand Up @@ -35,5 +34,25 @@
"v2g": false,
"mileage": "data/examples/energy_consumption_example.csv"
}
},
"BVG-GE": {
"depb": {
"name": "articulated bus",
"capacity": 400,
"charging_curve": [[0, 450], [0.8, 296], [0.9, 210], [1, 20]],
"min_charging_power": 0,
"v2g": false,
"mileage": 3,
"hc": "winter"
},
"oppb": {
"name": "articulated bus",
"capacity": 400,
"charging_curve": [[0, 450], [0.8, 296], [0.9, 210], [1, 20]],
"min_charging_power": 0,
"v2g": false,
"mileage": 3,
"hc": "winter"
}
}
}
}
16 changes: 16 additions & 0 deletions docs/_static/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
.wy-nav-content {
max-width: none;
}

/* override table width restrictions */
.wy-table-responsive table td, .wy-table-responsive table th {
/* !important prevents the common CSS stylesheets from
overriding this as on RTD they are loaded after this stylesheet */
white-space: normal !important;
}

.wy-table-responsive {
overflow: visible !important;
}

table {
table-layout: auto;
width: 800px;
}
4 changes: 2 additions & 2 deletions docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

Expand Down
Binary file added docs/source/_static/PyCharm_Configuration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/SimBA_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/SimBA_module_overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/run_overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 17 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,23 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
# for example


#If conf.py is located in this directory,
#
#D:\\Projects\MyProject\Docs\source
#
#and the project's Python modules are in
#
#D:\\Projects\MyProject\SourceCode,

import os
import sys
sys.path.insert(0, os.path.abspath('..'))

import pathlib
sys.path.insert(0, os.path.abspath('../../'))
sys.path.insert(0, pathlib.Path(__file__).parents[2].resolve().as_posix())
sys.path.insert(0, os.path.abspath('C:/Users/paul.scheer/Python/spiceev'))

# -- Project information -----------------------------------------------------

Expand All @@ -30,8 +42,8 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.autosummary']

extensions = ['sphinx.ext.autodoc', 'sphinx.ext.autosummary','sphinx.ext.autosectionlabel']
numfig = True
# Add any paths that contain templates here, relative to this directory.
templates_path = []

Expand All @@ -55,5 +67,5 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ['../_static']
html_css_files = ['style.css']
Loading
Loading