Skip to content

Commit

Permalink
D888528 fixes 2 (#3574)
Browse files Browse the repository at this point in the history
* D888528: fix pyaedt test for n-1 run behavior change

* D888528: another fix
  • Loading branch information
apollo-crum authored Sep 15, 2023
1 parent d3dffba commit ec9b8f8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions _unittest_solvers/test_26_emit.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ def test_version(self, add_app):
config["desktopVersion"] <= "2023.1",
reason="Skipped on versions earlier than 2023.2",
)
def test_analyze_manually(self, add_app):
def test_basic_run(self, add_app):
self.aedtapp = add_app(application=Emit)
assert len(self.aedtapp.results.revisions) == 0
# place components and generate the appropriate number of revisions
Expand Down Expand Up @@ -749,6 +749,7 @@ def test_analyze_manually(self, add_app):
rev2 = self.aedtapp.results.analyze()
domain2 = self.aedtapp.results.interaction_domain()
domain2.set_receiver("MD400C")
domain2.set_interferer(rad3.name)
if config["desktopVersion"] >= "2024.1":
rev2.n_to_1_limit = 0
assert rev2.is_domain_valid(domain2)
Expand All @@ -760,6 +761,7 @@ def test_analyze_manually(self, add_app):
assert len(worst_domain.interferer_names) == 1
assert worst_domain.interferer_names[0] == rad3.name # rad3 has the higher transmit power
domain2.set_receiver(rad3.name)
domain2.set_interferer(rad2.name)
assert rev2.is_domain_valid(domain2)
interaction3 = rev2.run(domain2)
assert interaction3 is not None
Expand Down Expand Up @@ -804,15 +806,15 @@ def test_optimal_n_to_1_feature(self, add_app):
assert self.aedtapp.results.revisions[-1].n_to_1_limit == 0

# get number of 1-1 instances
assert self.aedtapp.results.revisions[-1].get_instance_count(domain) == 105702
assert self.aedtapp.results.revisions[-1].get_instance_count(domain) == 52851
interaction = self.aedtapp.results.revisions[-1].run(domain)
instance = interaction.get_worst_instance(ResultType.EMI)
assert instance.get_value(ResultType.EMI) == 76.02

# rerun with N-1
self.aedtapp.results.revisions[-1].n_to_1_limit = 2**20
assert self.aedtapp.results.revisions[-1].n_to_1_limit == 2**20
assert self.aedtapp.results.revisions[-1].get_instance_count(domain) == 23305632
assert self.aedtapp.results.revisions[-1].get_instance_count(domain) == 11652816
interaction = self.aedtapp.results.revisions[-1].run(domain)
instance = interaction.get_worst_instance(ResultType.EMI)
domain2 = instance.get_domain()
Expand Down

0 comments on commit ec9b8f8

Please sign in to comment.