dss-extensions/dss_capi

New components, removal of old components

PMeira opened this issue · 1 comments

From the OpenDSS v9 announcement:

PVSystem2, Storage2, InvControl2 and StorageController2 are part of the base object suite in OpenDSS, deprecating their predecessors. These objects are now PVSystem, Storage, InvControl and StorageControler.

Although the upstream code removed some components, we should keep them for a while somehow. Many papers and theses were developed with the old models, so we should try to keep them reproducible if there isn't much overhead.

See also #74

A mechanism to toggle the old models is available since 1a69647. With this, by default, the new models, previously suffixed with "2", are now the default models and the old models are removed. If the users have old code that need to use the old models, the LegacyModels flag can be toggled to enable them, replacing the new models.

dss_capi/include/v7/dss_capi.h

Lines 1393 to 1405 in 1a69647

/*
If enabled, the legacy/deprecated models for PVSystem, InvControl, Storage and StorageControl are used.
WARNING: Changing the active value runs a "Clear" command, discarding the current circuit.
Defaults to False (disabled state).
This can also be set through the environment variable DSS_CAPI_LEGACY_MODELS. Setting it to 1 enables
the legacy components, using the old models from the start.
(API Extension)
*/
DSS_CAPI_V7_DLL uint16_t DSS_Get_LegacyModels(void);
DSS_CAPI_V7_DLL void DSS_Set_LegacyModels(uint16_t Value);