ansys / pyoptislang

Pythonic interface to optiSLang
https://optislang.docs.pyansys.com
MIT License
15 stars 1 forks source link

Explicit interface for obtaining and managing system result designs #360

Open rfahlberg opened 1 week ago

rfahlberg commented 1 week ago

📝 Description of the feature

Currently, users need to do oSL Server API based scripting to obtain system result designs, like:

from ansys.optislang.core import Optislang
from ansys.optislang.core.tcp.osl_server import TcpOslServer
from pprint import pprint

osl = Optislang(host="127.0.0.1", port=5310)
osl.timeout = 600
osl_server: TcpOslServer = osl.osl_server

sensi = osl.application.project.root_system.find_nodes_by_name("Sensitivity")[0]

actor_status_info=osl_server.get_actor_status_info(sensi.uid, "0", include_designs=True, include_design_values=True)

# design_status contains (status) info like
# - id
# - status
# - pareto_design
# - feasible
# for each design 
design_status=actor_status_info['design_status']

# designs contains the actual designs (values)
designs=actor_status_info['designs']

This should be supported directly as explicit API of the ParametricSystem node.

Users should be able to obtain:

A DesignManager class should be added, to wrap the interface/data. This class should also manage the functionality for saving designs as local file.

Adapt the workflow creation examples to include obtaining result design.

💡 Steps for implementing the feature

No response

🔗 Useful links and references

No response