
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
gridx-prescient
Advanced tools
Prescient is a python library that provides production cost modeling capabilities for power generation and distribution networks.
Documentation is available at https://prescient.readthedocs.io/.
The following must be installed before using Prescient:
Prescient is available as a python package that can be installed using pip. To install the latest release of Prescient use the following command:
pip install gridx-prescient
You may want to install from source if you want to use the latest pre-release version of the code, or if you want to modify/contribute to the code yourself. Install from source by following these steps:
pip install -e .
This will install Prescient as a Python module while obtaining necessary dependencies.Prescient requires a pyomo-compatible MILP solver. A commercial solver (CPLEX, Gurobi, or Xpress) is recommended over open source solvers. If a commercial solver is not available we recommend installing the open source CBC MILP solver.
On Linux and Mac platforms, CBC can be installed using Anaconda:
conda install -c conda-forge coincbc
Binaries for additional platforms, including Windows, may be available from https://github.com/coin-or/Cbc/releases.
Instructions for installing Python bindings for CPLEX can be found here.
Python bindings for Gurobi can be installed via conda:
conda install -c gurobi gurobi
Depending on your license, you may not be able to use the latest version of the solver. A specific release can be installed as follows:
conda install -c gurobi gurobi=8
Xpress Python bindings are available through PyPI, e.g.:
pip install xpress
Depending on your license, you may need to install a specific version of the solver, e.g.,
pip install xpress==8.8.6
Prescient is packaged with a utility to test and demonstrate its functionality. Here we will walk through the simulation of an RTS-GMLC case.
From the command line, navigate to the following directory (relative to the repository root):
cd prescient/downloaders/
In that directory, there is a file named rts_gmlc.py. Run it:
python rts_gmlc.py
This script clones the repository of the RTS-GMLC dataset and formats it for Prescient input. Once the process is complete, the location of the downloaded and processed files will be printed to the command prompt. Navigate to that directory:
cd ../..
cd downloads/rts_gmlc/
There will be a number of text files in this directory.
These text files contain invocations and options for executing Prescient
programs. For example, the populate_with_network_deterministic.txt file is
used to run the Prescient populator for generating scenarios for one week of
data using the RTS-GMLC data. These text files are provided to the runner.py
command (a utility installed with Prescient). Start by running the populator
for one week of data.
runner.py populate_with_network_deterministic.txt
You can follow its progress through console output. Once complete, a new folder
in your working directory deterministic_with_network_scenarios will appear. The
folders within contain the generated scenario.
The configuration that will be used to run the simulator is in
simulate_with_network_deterministic.txt. The configuration assumes you have
installed the solver CBC. If you are using another solver you will need to
edit the following options in the configuration file to specify the appropriate
solver:
--deterministic-ruc-solver=cbc
--sced-solver=cbc
For example, if you were using Xpress, these lines would be changed to:
--deterministic-ruc-solver=xpress
--sced-solver=xpress
and similarily for Gurobi (gurobi) and CPLEX (cplex).
You can now run the simulator. Once again you will use the runner.py command:
runner.py simulate_with_network_deterministic.txt
You can watch the progress of the simulator as it is printed to the console. After
a period of time, the simulation will be complete. The results will be found a in
a new folder deterministic_with_network_simulation_output. In that directory,
there will be a number of .csv files containing simulation results. An additional
folder plots contains stack graphs for each day in the simulation, summarizing
generation and demand at each time step.
By contributing to this software project, you are agreeing to the following terms and conditions for your contributions:
Regression tests are run automatically with each pull request. You can also run regression tests on your local machine using the following command from the repository root:
pytest -v prescient/simulator/tests/test_simulator.py
FAQs
Power Generation Scenario creation and simulation utilities
We found that gridx-prescient demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.