Metadata-Version: 2.4
Name: optimpv
Version: 1.4
Summary: optimPV: Optimization & Modeling tools for PV research
Home-page: https://github.com/openPV-lab/optimPV
Download-URL: https://github.com/openPV-lab/optimPV/v1.04.tar.gz
Author: Vincent M. Le Corre
Author-email: 
License: GPLv3
Keywords: Bayesian optimization,Evolutionary optimization,parameter extraction,experimental design,high throughput,solar cells
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy<=2.0,>=1.2
Requires-Dist: pandas>=1.4
Requires-Dist: matplotlib>=3.5
Requires-Dist: jupyterlab>=3.4
Requires-Dist: seaborn>=0.11
Requires-Dist: scipy>=1.0
Requires-Dist: gitpython>=3.1
Requires-Dist: openpyxl>=3.0
Requires-Dist: pyodbc>=4.0
Requires-Dist: scikit-optimize>=0.9
Requires-Dist: pySIMsalabim>=1.3
Requires-Dist: tk
Requires-Dist: torch>=2.0
Requires-Dist: torchvision>=0.15
Requires-Dist: torchaudio>=2.0
Requires-Dist: emcee>=3.1
Requires-Dist: pymoo>=0.6
Requires-Dist: ax-platform>=1.1.0
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: download-url
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary



<img src="./docs/logo/optimPV_logo.png" alt="optimPV logo" width="100px">  

# optimPV: Optimization & Modeling tools for PV research

## Authors
[Vincent M. Le Corre](https://github.com/VMLC-PV)  
[Larry Lüer](https://github.com/larryluer)

## Institution
<img src="./docs/logo/sdu_logo.jpg" alt="SDU logo" width="100px"> CAPE - Centre for Advanced Photovoltaics and Thin-film Energy Devices, University of Southern Denmark, Denmark

## Description
This repository contains the code to run **optimPV**. optimPV combines sevral optimization procedures and modeling utilities that can be used for two objectives:
1. to optimize the parameters of a simulation to fit experimental data.
2. to optimize the processing conditions in a self-driving experimental set-up.  

## Repository Folder Structure
    .
    ├── Main                             # Main directory
        ├── optimPV                      # Main directory for the optimPV codes
            ├── axBOtorch                # Directory with the Bayesian optimization (BO) codes using BoTorch and Ax
            ├── BayesInfEmcee            # Directory with the Bayesian inference codes using emcee
            ├── DDfits                   # Directory with the different agents to run the drift-diffusion simulator  [SIMsalabim](https://github.com/kostergroup/SIMsalabim) for JV, Hysteresis, Impedance, CV and IMPS simulations and fitting
            ├── Diodefits                # Directory with the agent to simulate and fit the non-ideal diode equation model
            ├── general                  # Directory with general utility functions used by the different agents
            ├── posterior                # Directory with some utility functions to plot the posterior distributions using the BO surrogate model
            ├── RateEqfits               # Directory with the agent to simulate and fit the rate equations for different experiment types (trPL, TRMC, TAS, etc.)
            ├── scipyOpti                # Directory with the optimization codes using scipy.optimize
            ├── TransferMatrix           # Directory with the agent to run the transfer matrix simulations
        ├── Notebooks                    # Contains clean versions of the Notebooks
        ├── Data                         # Contains some example data for the notebooks
        ├── docs                         # Contains the documentation
        ├── test                         # Contains the codes for testing optimPV
    └── README.md

## Installation
### With pip
To install optimPV with pip you have two options:
1. Install optimPV using the [PyPI repository](https://pypi.org/project/optimpv/)  

    ```bash
    pip install optimpv
    ```

2. Install optimPV using the GitHub repository   https://github.com/openPV-lab/optimPV

    ```bash
    pip install git+https://github.com/openPV-lab/optimPV
    ```

### With conda
To install optimPV with conda:

```bash
conda create -n optimpv 
conda activate optimpv
pip install optimpv
```

You can also clone your base environment:

```bash  
conda create -n optimpv --clone base
```

## Additional necessary installs for the agents
### Drift-diffusion agent
The drift-diffusion agent uses [SIMsalabim](https://github.com/kostergroup/SIMsalabim) to run drift-diffusion simulations.

- SIMsalabim is included as a submodule.
- Install it following the instructions on the [SIMsalabim GitHub repository](https://github.com/kostergroup/SIMsalabim).
- Only works for parallel simulations on Linux. All other optimPV agents work on Windows.

### Parallel simulations
To run parallel simulations on Linux you can also install GNU Parallel:

```bash
sudo apt update
sudo apt install parallel
```

## Disclaimer
This repository is still under development. If you find any bugs or have any questions, please contact us.
