QUEENS (Quantification of Uncertain Effects in Engineering Systems) is a Python framework for solver-independent multi-query analyses of large-scale computational models.
📈 QUEENS offers a large collection of cutting-edge algorithms for deterministic and probabilistic analyses such as:
- parameter studies and identification
- sensitivity analysis
- surrogate modeling
- uncertainty quantification
- Bayesian inverse analysis
🧚♂️ QUEENS provides a modular architecture for:
- parallel queries of large-scale computational models
- robust data, resource, and error management
- easy switching between analysis types
- smooth scaling from laptop to HPC cluster
Prerequisites: Unix system and environment management system (we recommend miniforge)
Clone the QUEENS repository to your local machine. Navigate to its base directory, then:
conda env create
conda activate queens
pip install -e .
Let's consider a parallelized Monte Carlo simulation of the Ishigami function:
from queens.distributions import BetaDistribution, NormalDistribution, UniformDistribution
from queens.drivers import FunctionDriver
from queens.global_settings import GlobalSettings
from queens.iterators import MonteCarloIterator
from queens.main import run_iterator
from queens.models import SimulationModel
from queens.parameters import Parameters
from queens.schedulers import LocalScheduler
if __name__ == "__main__":
# Set up the global settings
global_settings = GlobalSettings(experiment_name="monte_carlo_uq", output_dir=".")
# Set up the uncertain parameters
x1 = UniformDistribution(lower_bound=-3.14, upper_bound=3.14)
x2 = NormalDistribution(mean=0.0, covariance=1.0)
x3 = BetaDistribution(lower_bound=-3.14, upper_bound=3.14, a=2.0, b=5.0)
parameters = Parameters(x1=x1, x2=x2, x3=x3)
# Set up the model
driver = FunctionDriver(parameters=parameters, function="ishigami90")
scheduler = LocalScheduler(
experiment_name=global_settings.experiment_name, num_jobs=2, num_procs=4
)
model = SimulationModel(scheduler=scheduler, driver=driver)
# Set up the algorithm
iterator = MonteCarloIterator(
model=model,
parameters=parameters,
global_settings=global_settings,
seed=42,
num_samples=1000,
result_description={"write_results": True, "plot_results": True},
)
# Start QUEENS run
run_iterator(iterator, global_settings=global_settings)
Your contributions are welcome! Please follow our contributing guidelines and code of conduct.
If you use QUEENS in your work, please cite the relevant method papers and
@misc{queens,
author = {QUEENS},
title = {QUEENS: An Open-Source Python Framework for Solver-Independent Analyses of Large-Scale Computational Models},
year = {2025},
howpublished = {\url{https://www.queens-py.org}}
}
Licensed under GNU LGPL-3.0 (or later). See LICENSE.