Hello everyone,
I have a couple of questions related to the Allocation relationships and the script "Update Failure Rates.js" that Ansys provided.
We currently make great use of allocations in conjunction with the script for the following use case :
- We have libraries of components and a model representing our product
- We allocate elements of the model (Source) to elements of the libraries (Targets)
- The script, launched on the model, overwrite the failure rate of the elements which are allocate to elements of the libraries.
The script and method has worked fine for years now expect for this small incident : https://medini.freshdesk.com/support/discussions/topics/1000109737
We noticed that an improvement we could make would be to invert the allocation relationships: in the allocation interface you can logically allocate one source to multiple targets, which doesn't make any sense in out context (allocate an element of our product to multiple elements of the library) while the inverse makes perfect sense (allocate one element of the library to multiple elements of our product). Graphically it would also be an improvement as in the GUI it would immediately show which library element correspond to an item of the product instead of displaying [1].
So our questions are the following:
- Is it easy to invert the allocation relationships? I could make a script that search for every relationships "Metamodel.sysml.SysMLAbstraction, Sterotype allocate" and swap the_relationship_of_the_source and the_relationship_of_the_target but sometimes things can have unforseen effects when scripting (what to do with the container of the relationships? etc.).
- Is there a technical reason why the script "Update Failure Rates.js" used allocation on the other way? Maybe this was a deliberate choice and we don't want to mess with that.
Thank you in advance,
Adrien