Skip to content

queens-py/queens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QUEENS logo

precommit black pylint

tests-local-main build-documentation-main

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

🌐 Website: queens-py.org

📖 Documentation: queens-py.github.io/queens

🚀 Getting started

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 .

Note: This installs QUEENS without any fixed dependency versions. In most cases this is no problem and gives you more freedom to install additional packages within your environment. Should there be a problem you can play it safe with fixed versions via

pip install -e .[safe]

👑 Workflow example

Let's consider a parallelized Monte Carlo simulation of the Ishigami function:

from queens.distributions import Beta, Normal, Uniform
from queens.drivers import Function
from queens.global_settings import GlobalSettings
from queens.iterators import MonteCarlo
from queens.main import run_iterator
from queens.models import Simulation
from queens.parameters import Parameters
from queens.schedulers import Local

if __name__ == "__main__":
    # Set up the global settings
    global_settings = GlobalSettings(experiment_name="monte_carlo_uq", output_dir=".")

    with global_settings:
        # Set up the uncertain parameters
        x1 = Uniform(lower_bound=-3.14, upper_bound=3.14)
        x2 = Normal(mean=0.0, covariance=1.0)
        x3 = Beta(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 = Function(parameters=parameters, function="ishigami90")
        scheduler = Local(
            experiment_name=global_settings.experiment_name, num_jobs=2, num_procs=4
        )
        model = Simulation(scheduler=scheduler, driver=driver)

        # Set up the algorithm
        iterator = MonteCarlo(
            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)
QUEENS example

👥 Contributing

Your contributions are welcome! Please follow our contributing guidelines and code of conduct.

📃 How to cite

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}}
}

👩‍⚖️ License

Licensed under GNU LGPL-3.0 (or later). See LICENSE.

About

A Python framework for solver-independent multi-query analyses of large-scale computational models.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 8