|
| 1 | +from opltools import Implementation, Generator, Reference, Library, Variable, Constraint |
| 2 | +from pydantic_yaml import to_yaml_str |
| 3 | + |
| 4 | +things = {} |
| 5 | + |
| 6 | +things["cobi_impl"] = Implementation( |
| 7 | + name="COBI Implementation", |
| 8 | + description="Python library for COBI (COnstrained BI-objective optimization) problem generator", |
| 9 | + language="python", |
| 10 | + links=[ |
| 11 | + { |
| 12 | + "type": "repository", |
| 13 | + "url": "https://github.com/numbbo/cobi-problem-generator/", |
| 14 | + }, |
| 15 | + { |
| 16 | + "type": "v0.5.0", |
| 17 | + "url": "https://github.com/numbbo/cobi-problem-generator/releases/tag/v0.5.0", |
| 18 | + }, |
| 19 | + ], |
| 20 | + requirements="https://github.com/numbbo/cobi-problem-generator/blob/main/requirements.txt", |
| 21 | +) |
| 22 | + |
| 23 | +things["cobi_problem"] = Generator( |
| 24 | + name="COBI Problem", |
| 25 | + description="Generator of COnstrained BI-objective optimization problems", |
| 26 | + tags={ |
| 27 | + "constrained", |
| 28 | + "bi-objective", |
| 29 | + "continuous", |
| 30 | + "black-box", |
| 31 | + "location", |
| 32 | + "multi-peak", |
| 33 | + "convex-quadratic", |
| 34 | + }, |
| 35 | + references=[ |
| 36 | + Reference( |
| 37 | + title="Pareto Set Characterization in Constrained Multiobjective Optimization and the COBI Problem Generator", |
| 38 | + authors=["Anne Auger", "Dimo Brockhoff", "Luka Opravš", "Tea Tušar"], |
| 39 | + link={"type": "arxiv", "url": "https://arxiv.org/abs/2604.09131"}, |
| 40 | + ) |
| 41 | + ], |
| 42 | + objectives={2}, |
| 43 | + variables=[Variable(type="continuous", dim={"min": 1})], |
| 44 | + implementations={"cobi_impl"}, |
| 45 | + can_evaluate_objectives_independently="no", |
| 46 | + constraints=[ |
| 47 | + # FIXME: Check |
| 48 | + Constraint(type="box", hard="yes", number={"min": 1}), |
| 49 | + Constraint(type="linear", hard="yes", number={"min": 1}), |
| 50 | + Constraint(type="function", hard="yes", number={"min": 1}), |
| 51 | + ], |
| 52 | + noise_type={"none"}, |
| 53 | + dynamic_type=None, |
| 54 | + allows_partial_evaluation="no", |
| 55 | + modality={"multi-modal per objective"}, |
| 56 | + fidelity_levels={1}, |
| 57 | + source={"artificial"}, |
| 58 | + code_examples={"./code_153.py"}, |
| 59 | +) |
| 60 | +library = Library(things) |
| 61 | + |
| 62 | +print(to_yaml_str(library)) |
0 commit comments