Skip to content

Commit

Permalink
DSSCompatFlags: Add missing flags, added in 0.14.x
Browse files Browse the repository at this point in the history
  • Loading branch information
PMeira committed Mar 15, 2024
1 parent 5895649 commit b0d4756
Showing 1 changed file with 40 additions and 7 deletions.
47 changes: 40 additions & 7 deletions src/dss_sharp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,16 +294,18 @@ public enum DSSCompatFlags {
NoSolverFloatChecks = 0x00000001,

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

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

/// <summary>
/// In the official OpenDSS implementation, the Lines API use the active circuit element instead of the
/// active line. This can lead to unexpected behavior if the user is not aware of this detail.
/// For example, if the user accidentally enables any other circuit element, the next time they use
/// the Lines API, the line object that was previously enabled is overwritten with another unrelated
/// object.
/// This flag enables this behavior above if compatibility at this level is required. On DSS-Extensions,
/// we changed the behavior to follow what most of the other APIs do: use the active object in the internal
/// list. This change was done for DSS C-API v0.13.5, as well as the introduction of this flag.
/// </summary>
ActiveLine = 0x00000010,

/// <summary>

Check warning on line 332 in src/dss_sharp.cs

View workflow job for this annotation

GitHub Actions / build

XML comment is not placed on a valid language element

Check warning on line 332 in src/dss_sharp.cs

View workflow job for this annotation

GitHub Actions / build

XML comment is not placed on a valid language element

Check warning on line 332 in src/dss_sharp.cs

View workflow job for this annotation

GitHub Actions / build

XML comment is not placed on a valid language element
// On DSS-Extensions/AltDSS, when setting a property invalidates a previous input value, the engine

Check warning on line 333 in src/dss_sharp.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has badly formed XML -- 'Expected an end tag for element 'summary'.'

Check warning on line 333 in src/dss_sharp.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has badly formed XML -- 'Expected an end tag for element 'summary'.'

Check warning on line 333 in src/dss_sharp.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has badly formed XML -- 'Expected an end tag for element 'summary'.'

Check warning on line 333 in src/dss_sharp.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has badly formed XML -- 'Expected an end tag for element 'summary'.'
// will try to mark the invalidated data as unset. This allows for better exports and tracking of
// the current state of DSS objects.
// Set this flag to disable this behavior, following the original OpenDSS implementation for potential
// compatibility with older software that may require the original behavior; note that may lead to
// erroneous interpretation of the data in the DSS properties. This was introduced in DSS C-API v0.14.0
// and will be further developed for future versions.
/// </summary>

Check warning on line 340 in src/dss_sharp.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has badly formed XML -- 'End tag was not expected at this location.'

Check warning on line 340 in src/dss_sharp.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has badly formed XML -- 'End tag was not expected at this location.'

Check warning on line 340 in src/dss_sharp.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has badly formed XML -- 'End tag was not expected at this location.'
NoPropertyTracking = 0x00000020,

/// <summary>
/// Some specific functions on the official OpenDSS APIs skip important side-effects.
/// By default, on DSS-Extensions/AltDSS, those side-effects are enabled. Use this flag
/// to try to follow the behavior of the official APIs. Beware that some side-effects are
/// important and skipping them may result in incorrect results.
/// This flag only affects some of the classic API functions, especially Loads and Generators.
/// </summary>
SkipSideEffects = 0x00000040,
};

/// <summary>
Expand Down

0 comments on commit b0d4756

Please sign in to comment.