### Verify Installation with Snakemake Source: https://github.com/open-energy-transition/open-tyndp/blob/master/utils/windows-installer/README.md After installation, open the 'Open-TYNDP PowerShell' from the Start Menu and run this command to verify that Snakemake is accessible and the environment is activated. ```powershell snakemake --help ``` -------------------------------- ### Manual Installer Build Script Source: https://github.com/open-energy-transition/open-tyndp/blob/master/utils/windows-installer/README.md Execute this bash script to manually build the NSIS installer. It handles downloading pixi.exe and creating a git archive. ```bash cd utils/windows-installer ./build_installer.sh # Linux/macOS/Git Bash ``` -------------------------------- ### Serve Documentation Live Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/contributing.md Starts a local development server to preview documentation changes in real-time. Changes to `.md` files will be reflected automatically. ```bash mkdocs serve ``` -------------------------------- ### Build Windows Installer Script Source: https://github.com/open-energy-transition/open-tyndp/blob/master/utils/windows-installer/README.md Navigate to the installer directory and execute the build script. This script is designed to run on Linux, macOS, or within Git Bash on Windows. ```bash # Navigate to installer directory cd utils/windows-installer # Run the build script ./build_installer.sh # Linux/macOS/Git Bash # Output: open-tyndp-0.4.0-pixi-Windows-x86_64.exe (~100 MB) ``` -------------------------------- ### Enable NSIS Logging for Debugging Source: https://github.com/open-energy-transition/open-tyndp/blob/master/utils/windows-installer/README.md To debug installation issues, you can enable NSIS logging by adding `!define ENABLE_LOGGING` at the top of the `.nsi` file. The installer will then create an `install.log` file in the installation directory. ```nsis # At top of file !define ENABLE_LOGGING # Installer will create install.log in installation directory # View with: notepad %LOCALAPPDATA%\open-tyndp\install.log ``` -------------------------------- ### Example of Regenerated Default Configuration Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/validation_dev.md Presents an example of the `config/config.default.yaml` file after regeneration, reflecting the structure and default values defined by the Pydantic models, including the newly added 'new_option' and 'file' sections. ```yaml logging: level: INFO format: "% (levelname)s:%(name)s:%(message)s" new_option: 0.5 file: enabled: false path: logs/pypsa.log format: null ``` -------------------------------- ### Run TYNDP with specific data configuration Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/configuration.md Example of running the TYNDP tool with a specific data configuration, such as 'tyndp', to load data from Google Cloud Storage. ```console pixi run tyndp-sb --config data_config=tyndp ``` -------------------------------- ### Install pre-commit Hooks Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/contributing.md Installs pre-commit hooks to automatically check code style and quality before committing. This ensures contributions adhere to project guidelines. ```bash pixi run -e dev pre-commit install ``` -------------------------------- ### Clone Open-TYNDP Repository Source: https://github.com/open-energy-transition/open-tyndp/blob/master/README.md Use this command to clone the Open-TYNDP repository to your local machine. This is the first step for manual installation on any platform. ```sh git clone https://github.com/open-energy-transition/open-tyndp ``` -------------------------------- ### Run Full Scenario Building Workflow Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/sb.md Execute the complete Scenario Building workflow from raw data to results and PyPSA Explorer visualization. Ensure installation steps are completed beforehand. ```bash $ pixi run tyndp-sb ``` -------------------------------- ### Install Gurobi Solver Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/installation.md Installs the Gurobi solver using conda. Ensure you have a Gurobi license set up separately. ```bash $ conda activate open-tyndp $ conda install -c gurobi gurobi"=12.0.1" ``` -------------------------------- ### Select Solver Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/tutorial.md Specify the solver to be used for the optimization problem. This example uses the HiGHS solver. ```yaml solving: solver: highs ``` -------------------------------- ### Activate Open-TYNDP Environment with Pixi Source: https://github.com/open-energy-transition/open-tyndp/blob/master/README.md After installing pixi, use this command to activate the project's environment. This provides access to all necessary dependencies for PyPSA-Eur and Open-TYNDP. ```sh pixi shell -e open-tyndp ``` -------------------------------- ### Snakemake job execution log example Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/tutorial.md This console output shows the details of a specific Snakemake job, 'build_powerplants'. It includes input files, output files, logs, job ID, benchmark information, and resource usage. ```console rule build_powerplants: input: resources/test/networks/base_s_6.nc, data/custom_powerplants.csv output: resources/test/powerplants_s_6.csv log: logs/test/build_powerplants_s_6.log jobid: 43 benchmark: benchmarks/test/build_powerplants_s_6 reason: Missing output files: resources/test/powerplants_s_6.csv; Input files updated by another job: resources/test/networks/base_s_6.nc wildcards: clusters=6 resources: tmpdir=, mem_mb=7000, mem_mib=6676 ``` -------------------------------- ### Run PyPSA-Eur Tutorial Workflow Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/tutorial.md Execute the PyPSA-Eur tutorial workflow using Snakemake with a specific configuration file. This command initiates the process from network creation to solving the network. ```console $ snakemake -call results/test-elec/networks/base_s_6_elec_.nc --configfile config/test/config.electricity.yaml ``` -------------------------------- ### Enable Tutorial Data Set Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/configuration.md Set to true to retrieve the tutorial data set instead of the full data set. Defaults to false. ```yaml tutorial: false ``` -------------------------------- ### Build Documentation Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/contributing.md Compiles the project documentation. This command should be run after making changes to the documentation files to generate updated HTML files. ```bash pixi run build-docs site ``` -------------------------------- ### Launch PyPSA Explorer with Custom Networks Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/sb.md Point the PyPSA Explorer to your downloaded solved networks. This requires activating the `open-tyndp` environment shell first. ```bash $ pixi shell -e open-tyndp $ pypsa-explorer path/to/network_2030.nc path/to/network_2040.nc ``` -------------------------------- ### Read CSV Data in R Source: https://github.com/open-energy-transition/open-tyndp/blob/master/data/entsoegridkit/README.md Example of reading CSV data into an R data frame, specifying the quote character. ```R buses <- read.csv("buses.csv", header=TRUE, quote="'") ``` -------------------------------- ### Configure Perfect Foresight Scenario Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/foresight.md Enable the experimental perfect foresight scenario by setting 'foresight: perfect' in config/config.perfect.yaml. ```yaml foresight: perfect ``` -------------------------------- ### Pixi Executable Location Source: https://github.com/open-energy-transition/open-tyndp/blob/master/utils/windows-installer/README.md This shows the expected location of the pixi.exe and Uninstall.exe within the user's local app data directory after installation. ```plaintext open-tyndp/ ├── pixi.exe # Pixi package manager (~70 MB) └── Uninstall.exe # Uninstaller ``` -------------------------------- ### Configure GPU-Accelerated Xpress Solver Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/installation.md Configures the Xpress solver for GPU-accelerated solving. Ensure your environment is set up for GPU usage and Xpress is installed. ```yaml solving: solver: name: xpress options: xpress-gpu ``` -------------------------------- ### Configure Logging Settings Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/configuration.md Set up top-level logging configurations for the application. ```yaml logging: version: 1 disable_existing_loggers: false formatters: simple: format: "%(levelname)s - %(name)s - %(message)s" handlers: console: class: "logging.StreamHandler" level: "DEBUG" formatter: "simple" stream: "ext://sys.stdout" loggers: pypsa: level: "DEBUG" handlers: ["console"] propagate: false root: level: "DEBUG" handlers: ["console"] ``` -------------------------------- ### Read CSV Data in Python Source: https://github.com/open-energy-transition/open-tyndp/blob/master/data/entsoegridkit/README.md Example of reading CSV data into a Python list of dictionaries, customising the CSV dialect to use single quotes. ```python import io, csv class dialect(csv.excel): quotechar = "'" with io.open('buses.csv', 'rb') as handle: buses = list(csv.DictReader(handle, dialect)) ``` -------------------------------- ### Clean and Run All Collection Rules Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/tutorial_sector.md Execute the 'purge' and 'all' collection rules to scale up simulation scope. Ensure the config/config.yaml file is modified beforehand. ```bash $ snakemake -call purge $ snakemake -call all ``` -------------------------------- ### Launch Pre-solved PyPSA Explorer Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/sb.md Browse pre-solved Scenario Building networks from the latest release using the PyPSA Explorer. This command launches the explorer without rerunning the full workflow. ```bash $ pixi run launch-presolved-explorer ``` -------------------------------- ### Run CBA Workflow Up to Checkpoint Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/cba.md Execute all steps of the CBA workflow up to and including the checkpoint. This command is useful for initial setup or debugging before the full DAG is generated. ```console $ pixi run tyndp-checkpoint ``` -------------------------------- ### Configure Run Scenario Settings Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/configuration.md Specify settings for running and storing scenarios with different configurations, determining paths for resources, networks, and results. ```yaml run: path: "results/" project_name: "my-project" scenario_name: "my-scenario" ``` -------------------------------- ### Repository Files Location Source: https://github.com/open-energy-transition/open-tyndp/blob/master/utils/windows-installer/README.md This illustrates the structure of the repository files, including the shallow git repository and conda environment, typically installed in the user's profile directory. ```plaintext open-tyndp/ ├── .git/ # Shallow git repository ├── .pixi/ │ └── envs/ │ └── open-tyndp/ # Conda environment (~3 GB) ├── rules/ ├── scripts/ ├── config/ ├── pixi.toml └── ... (all project files) ``` -------------------------------- ### Run Open-TYNDP Scenario Building Analysis Source: https://github.com/open-energy-transition/open-tyndp/blob/master/README.md Execute this command to run all analysis steps for the Scenario Building. This is used to reproduce results and build the report. ```sh pixi run tyndp-sb ``` -------------------------------- ### Select Weather Data Source for Renewables Source: https://github.com/open-energy-transition/open-tyndp/blob/master/doc/tutorial.md Choose the weather data source for calculating renewable energy potentials and capacity factors. This example selects ERA-5 for solar. ```yaml renewable: solar: cutout: ERA5 ```