Skip to content

Commit d49220a

Browse files
committed
feat: Add example EMDO problem
Manual translation of the EMDO problem from the old problems.yaml file to the new format to check if schema supports storing all information from old format.
1 parent a0aab01 commit d49220a

1 file changed

Lines changed: 83 additions & 0 deletions

File tree

examples/emdo.py

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
from pydoc import describe
2+
from opltools import Library, Problem, Implementation
3+
from pydantic_yaml import to_yaml_str
4+
5+
#! - name: Electric Motor Design Optimization
6+
#! suite/generator/single: Single Problem
7+
#! variable type: Continuous, Integer
8+
#! dimensionality: '13'
9+
#! objectives: '1'
10+
#! constraints: 'yes'
11+
#! dynamic: 'no'
12+
#! noise: 'yes'
13+
#! multimodal: 'yes'
14+
#! multi-fidelity: 'no'
15+
#! source (real-world/artificial): Real-World Application
16+
#! implementation: Implementation not freely available
17+
#! textual description: The goal is to find a design of a synchronous electric motor
18+
#! for power steering systems that minimizes costs and satisfies all constraints.
19+
#! reference: https://dis.ijs.si/tea/Publications/Tusar23Multistep.pdf (paper in Slovene)
20+
#! other info:
21+
#! partial evaluations: 'no'
22+
#! full name: Electric Motor Design Optimization
23+
#! constraint properties: Hard Constraints, Soft Constraints, Box Constraints
24+
#! number of constraints: '12'
25+
#! description of multimodality: Constraints are multimodal
26+
#! key challenges / characteristics: Time-consuming solution evaluation, highly-constrained
27+
#! problem
28+
#! scientific motivation: Challenging to find good solutions in a limited time
29+
#! limitations: 'Unavailability, even if available, it wouldn''t be helpful to use
30+
#! for benchmarking due taking a long time to evaluate a single solution '
31+
#! implementation languages: Python
32+
#! approximate evaluation time: 8 minutes
33+
#! general: This is not an available problem, but could be interesting to show to
34+
#! researchers which difficulties appear in real-world problems
35+
36+
l = Library({
37+
"impl_emdo": Implementation(
38+
name="Electric Motor Design Optimization",
39+
description="Not publicly available",
40+
language="python",
41+
evaluation_time="8 minutes"
42+
),
43+
"fn_emdo": Problem(
44+
name="Electric Motor Design Optimization",
45+
description="""# Goal
46+
Find a design of a synchronous electric motor for power steering systems that minimizes costs and satisfies all constraints.
47+
48+
# Motivation
49+
Challenging to find good solutions in a limited time
50+
51+
# Key Challenges
52+
* Time-consuming solution evaluation,
53+
* highly-constrained problem
54+
* Constraints are multimodal
55+
56+
This is not an available problem, but could be interesting to show to researchers which difficulties appear in real-world problems""",
57+
objectives=[1],
58+
variables=[
59+
{"type": "continuous", "dim": {"min": None, "max": 13}},
60+
{"type": "integer", "dim": {"min": None, "max": 13}},
61+
],
62+
modality=["multimodal"],
63+
allows_partial_evaluation="no",
64+
constraints=[
65+
{"type": "box", "hard": "some", "number": 12}
66+
],
67+
dynamic_type=["no"],
68+
noise_type=["yes"],
69+
fidelity_levels=[1],
70+
source=["real-world"],
71+
references=[
72+
{
73+
"title": "A Multi-Step Evaluation Process in Electric Motor Design",
74+
"lang": "sj",
75+
"authors": ["Tea Tušar", "Peter Korošec", "Bogdan Filipič"],
76+
"link": {"url": "https://dis.ijs.si/tea/Publications/Tusar23Multistep.pdf"}
77+
}
78+
],
79+
implementations=["impl_emdo"]
80+
)
81+
})
82+
83+
print(to_yaml_str(l))

0 commit comments

Comments
 (0)