Skip to content

Commit 15de0f3

Browse files
committed
DSSCompatFlags: Add missing flags, added in 0.14.x
1 parent 5895649 commit 15de0f3

File tree

1 file changed

+40
-7
lines changed

1 file changed

+40
-7
lines changed

src/dss_sharp.cs

+40-7
Original file line numberDiff line numberDiff line change
@@ -294,16 +294,18 @@ public enum DSSCompatFlags {
294294
NoSolverFloatChecks = 0x00000001,
295295

296296
/// <summary>
297-
/// If enabled, toggle worse precision for certain aspects of the engine. For example, the sequence-to-phase
298-
/// (`As2p`) and sequence-to-phase (`Ap2s`) transform matrices. On DSS C-API, we fill the matrix explicitly
299-
/// using higher precision, while numerical inversion of an initially worse precision matrix is used in the
300-
/// official OpenDSS. We will introduce better precision for other aspects of the engine in the future,
301-
/// so this flag can be used to toggle the old/bad values where feasible.
297+
/// If enabled, toggle worse precision for certain aspects of the engine. For
298+
/// example, the sequence-to-phase (`As2p`) and sequence-to-phase (`Ap2s`)
299+
/// transform matrices. On DSS C-API, we fill the matrix explicitly using
300+
/// higher precision, while numerical inversion of an initially worse precision
301+
/// matrix is used in the official OpenDSS. We will introduce better precision
302+
/// for other aspects of the engine in the future, so this flag can be used to
303+
/// toggle the old/bad values where feasible.
302304
/// </summary>
303305
BadPrecision = 0x00000002,
304306

305307
/// <summary>
306-
/// Toggle some InvControl behavior introduced in OpenDSS 9.6.1.1. It could be a regression
308+
/// Toggle some InvControl behavior introduced in OpenDSS 9.6.1.1. It could be a regression
307309
/// but needs further investigation, so we added this flag in the time being.
308310
/// </summary>
309311
InvControl9611 = 0x00000004,
@@ -313,8 +315,39 @@ public enum DSSCompatFlags {
313315
/// saved script. We found that it is not always a good idea, so we removed the command (leaving it commented).
314316
/// Use this flag to enable the command in the saved script.
315317
/// </summary>
316-
SaveCalcVoltageBases = 0x00000008
318+
SaveCalcVoltageBases = 0x00000008,
317319

320+
/// <summary>
321+
/// In the official OpenDSS implementation, the Lines API use the active circuit element instead of the
322+
/// active line. This can lead to unexpected behavior if the user is not aware of this detail.
323+
/// For example, if the user accidentally enables any other circuit element, the next time they use
324+
/// the Lines API, the line object that was previously enabled is overwritten with another unrelated
325+
/// object.
326+
/// This flag enables this behavior above if compatibility at this level is required. On DSS-Extensions,
327+
/// we changed the behavior to follow what most of the other APIs do: use the active object in the internal
328+
/// list. This change was done for DSS C-API v0.13.5, as well as the introduction of this flag.
329+
/// </summary>
330+
ActiveLine = 0x00000010,
331+
332+
/// <summary>
333+
/// On DSS-Extensions/AltDSS, when setting a property invalidates a previous input value, the engine
334+
/// will try to mark the invalidated data as unset. This allows for better exports and tracking of
335+
/// the current state of DSS objects.
336+
/// Set this flag to disable this behavior, following the original OpenDSS implementation for potential
337+
/// compatibility with older software that may require the original behavior; note that may lead to
338+
/// erroneous interpretation of the data in the DSS properties. This was introduced in DSS C-API v0.14.0
339+
/// and will be further developed for future versions.
340+
/// </summary>
341+
NoPropertyTracking = 0x00000020,
342+
343+
/// <summary>
344+
/// Some specific functions on the official OpenDSS APIs skip important side-effects.
345+
/// By default, on DSS-Extensions/AltDSS, those side-effects are enabled. Use this flag
346+
/// to try to follow the behavior of the official APIs. Beware that some side-effects are
347+
/// important and skipping them may result in incorrect results.
348+
/// This flag only affects some of the classic API functions, especially Loads and Generators.
349+
/// </summary>
350+
SkipSideEffects = 0x00000040,
318351
};
319352

320353
/// <summary>

0 commit comments

Comments
 (0)