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

Adjust default/initial behavior of the engine #2

Open
PMeira opened this issue Dec 14, 2023 · 0 comments
Open

Adjust default/initial behavior of the engine #2

PMeira opened this issue Dec 14, 2023 · 0 comments

Comments

@PMeira
Copy link
Member

PMeira commented Dec 14, 2023

Some defaults on DSS C-API are left for compatibility with the official OpenDSS COM implementation. Some things to consider toggling in AltDSS-Go when the first instance is created:

  • DSS.Set_AllowChangeDir(false): avoid changing the process working directory. Track it in the engine instead. Required for multi-threading.
  • DSS.Set_COMErrorResults(false): When errors occur in the engine, some arrays are filled with one or two elements (typically just [0]) to represent an error, besides an error number being exposed in the error interface. Since we already map the Error API in Golang, which is more general and complete, the engine can return empty arrays instead.
  • DSS.Set_AllowForms(false): there are no forms and the text/terminal output is usually not useful. We are not using the output callbacks either for plotting etc., since it doesn't make much sense here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant