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