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

# prefixes renamed #37

Merged
merged 1 commit into from
May 6, 2024
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
4 changes: 2 additions & 2 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ with Grasshopper's **Param** components:

Rename these components:

- for inputs, use the names of the design parameters prefixed with ``GENERATED_``
- for outputs, use the names of the performance attributes prefixed with ``REAL_``
- for inputs, use the names of the design parameters prefixed with ``DP_`` (accronym for *Design Parameters*)
- for outputs, use the names of the performance attributes prefixed with ``PA_`` (accronym for *Performance Attributes*).


.. hint::
Expand Down
2 changes: 1 addition & 1 deletion src/aixd_ara/gh_ui_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def instantiate_sample(ghdoc, sample_dict):
"""

for dp_name, dp_vals in sample_dict["design_parameters"].items():
component_name = "GENERATED_{}".format(dp_name)
component_name = "DP_{}".format(dp_name)
component = find_component_by_nickname(ghdoc, component_name)

if not dp_vals:
Expand Down
4 changes: 2 additions & 2 deletions src/aixd_ara/scripts/dataset_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ def analysis_callback(ghdoc, dp_samples, pa_names):
# pass design parameters (sample by sample) to Grasshopper model and read the performance attributes
for sample in dp_samples:
for dp_name, dp_vals in sample.items():
component_name = "GENERATED_{}".format(dp_name)
component_name = "DP_{}".format(dp_name)
component = find_component_by_nickname(ghdoc, component_name)
ghparam_set_values(component, dp_vals, expire=False)

pa_dict = {k: [] for k in pa_names}
for pa_name in pa_names:

component_name = "REAL_{}".format(pa_name)
component_name = "PA_{}".format(pa_name)
component = find_component_by_nickname(ghdoc, component_name)
pa_vals = ghparam_get_values(component, compute=True)
if isinstance(pa_vals, list):
Expand Down
Loading