dss-extensions / dss-extensions/OpenDSSDirect.jl

Exposing all DSS objects and uniform batches

Open
#82 2 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Julia
Stars
30
Forks
6
PR merge metrics
No merged PRs in 30d

Description

In DSS C-API v0.12.0, there are two sets of functions `Obj_*` and `Batch_*` to manipulate DSS properties directly, bypassing the textual parser and string conversion to read/write the properties.

Initially, my plan would be to generate code [from the schema](https://github.com/dss-extensions/dss_capi/blob/cd3cf22df69e244f3ca987bdee4358597d88ac8c/include/dss_capi.h#L6903-L6909) like in [IObj.py](https://github.com/dss-extensions/dss_python/blob/master/dss/IObj.py) (also WIP) -- for Python I added the "magic numbers" directly to avoid the lookup overhead, Julia could use enums/constants. Most of the code is very simple (mapping class id, property id and property type to the language types). I also plan to publish a C++ version of that in a few days.

Besides some general things like naming conventions (ideally we should try to use a default convention across all projects), does anyone have suggestions before I try this? We can always add an initial implementation and iterate later, as long as things work.

We should add more functions to get/manipulate the power flow state in DSS C-API v0.12.1, effectively moving away from the classic API based on the original COM implementation and the "Active..." concept. And https://github.com/dss-extensions/dss_capi/issues/113 will allow us to return the matrix shapes.

**EDIT:** Some samples for Python available in [test_obj.py](https://github.com/dss-extensions/dss_python/blob/0.14.4/tests/test_obj.py) and [test_batch.py](https://github.com/dss-extensions/dss_python/blob/0.14.4/tests/test_batch.py).

In Python, this is currently being developed in AltDSS-Python. See the docs at https://dss-extensions.org/AltDSS-Python/examples/GettingStarted.html
We should start porting it soon to Julia.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the C-API schema and the Python examples in test_obj.py and test_batch.py, then compare the current AltDSS-Python documentation linked in the issue. Clarify which DSS objects, batches, naming conventions, and power-flow state functions OpenDSSDirect.jl should expose; done requires an agreed Julia API and corresponding tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, julia, python
Domain
api, developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.