Skip to content

Commit d00e26c

Browse files
committed
Add citation info and crude README
1 parent 73bd57e commit d00e26c

File tree

2 files changed

+61
-2
lines changed

2 files changed

+61
-2
lines changed

CITATION.cff

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cff-version: 1.2.0
2+
message: "If you use this software, please cite it using the metadata supplied in the CITATION.cff file."
3+
doi: 10.5281/zenodo.4279483
4+
title: "OpenMDAO-NSGA"
5+
authors:
6+
- family-names: Vidner
7+
given-names: Olle
8+
affiliation: Linköping University
9+
orcid: https://orcid.org/0000-0002-1157-2480
10+
license: MIT
11+
repository-code: https://github.com/ovidner/openmdao-nsga

README.md

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,50 @@
1-
# openmdao-nsga
2-
NSGA-II and NSGA-III implementations for OpenMDAO
1+
# OpenMDAO-NSGA
2+
3+
[![DOI](https://zenodo.org/badge/DOI/10/f762.svg)](https://doi.org/f762)
4+
5+
NSGA-II and NSGA-III implementations for OpenMDAO.
6+
7+
Some notable features include:
8+
9+
* Support for continuous, integer, discrete and categorical variables.
10+
* Support for Pareto-optimization of multi-objective problems.
11+
* Constraint handling without parameters (using the method described in the original NSGA-II paper).
12+
* Flexible termination criteria.
13+
14+
Do note that the performance for discrete problems will probably be bad, but if you are looking for a fairly robust *shotgun approach* for a variety of different problems, OpenMDAO-NSGA might serve you well enough.
15+
16+
## Installation
17+
18+
This assumes you are using Conda. Run this in your environment to install:
19+
20+
conda install ovidner::openmdao-nsga
21+
22+
## Usage example
23+
24+
```python
25+
import openmdao.api as om
26+
import omnsga
27+
28+
prob = om.Problem()
29+
30+
...
31+
32+
# Real or integer design var
33+
prob.model.add_design_var("x_1", lower=0, upper=1)
34+
# Discrete design var
35+
omnsga.add_design_var(prob.model, "x_2", values={0, 1, 4}, type=omnsga.VariableType.ORDINAL)
36+
# Categorical design var
37+
omnsga.add_design_var(prob.model, "x_3", values={True, False, None}, type=omnsga.VariableType.NOMINAL)
38+
39+
prob.model.add_constraint("g", lower=0, upper=1)
40+
# Maximize f_1
41+
prob.model.add_objective("f_1", scaler=-1)
42+
# Minimize f_2
43+
prob.model.add_objective("f_2")
44+
45+
prob.driver = omnsga.Nsga2Driver(
46+
termination_criterion=omnsga.MaxEvaluationsCriterion(500),
47+
)
48+
49+
prob.run_driver()
50+
```

0 commit comments

Comments
 (0)