Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Use manufacturable variation in optimetrics #5726

Merged
merged 2 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/ansys/aedt/core/modules/design_xploration.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@
max_step : float
Maximum Step Size for optimization. If None, 1/10 of the range will be used.
use_manufacturable : bool
Either if to use or not the Manufacturable values. Default is False.
Either if to use or not the manufacturable values. Default is False.
levels : list, optional
List of available manufacturer levels.

Expand Down Expand Up @@ -845,6 +845,7 @@
elif self.soltype == "OptiStatistical":
self._app.activate_variable_statistical(variable_name)
else:
use_manufacturable = "true" if use_manufacturable else "false"

Check warning on line 848 in src/ansys/aedt/core/modules/design_xploration.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/modules/design_xploration.py#L848

Added line #L848 was not covered by tests
SMoraisAnsys marked this conversation as resolved.
Show resolved Hide resolved
arg = [
"i:=",
True,
Expand All @@ -866,7 +867,7 @@
use_manufacturable,
]
if self._app.aedt_version_id > "2023.2":
arg.extend(["DiscreteLevel:=", levels])
arg.extend(["Level:=", levels])

Check warning on line 870 in src/ansys/aedt/core/modules/design_xploration.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/modules/design_xploration.py#L870

Added line #L870 was not covered by tests
if not self.props.get("Variables", None):
self.props["Variables"] = {}
self.props["Variables"][variable_name] = arg
Expand Down
9 changes: 9 additions & 0 deletions tests/system/general/test_11_Setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,15 @@ def test_26_create_optimization(self):

assert not self.aedtapp.get_oo_object(self.aedtapp.odesign, f"Optimetrics\\{setup2.name}")

setup3 = self.aedtapp.optimizations.add(
calculation, ranges={"Freq": "2.5GHz"}, solution=f"{new_setup.name} : {sweep.name}"
)

setup3.props["Optimizer"] = "Screening"
setup3.add_variation("w1", 0.1, 10, 5, min_step=0.5, max_step=1, use_manufacturable=True, levels=[1, 20])
assert setup3.props["Variables"]["w1"][19] == "[1, 20] mm"
assert self.aedtapp.optimizations.delete(setup3.name)

def test_27_create_doe(self):
calculation = "db(S(1,1))"
new_setup = self.aedtapp.create_setup("MyDOESetup")
Expand Down