Allow simple controls to set valves OPEN/CLOSED

This commit is contained in:
Lew Rossman
2023-05-13 12:29:35 -04:00
parent 583cca01ca
commit a9079b023b
10 changed files with 155 additions and 139 deletions

View File

@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
//epanet2.cs[By Oscar Vegas]
//Last updated on 17/09/2020
//Last updated on 05/13/2023
//Declarations of functions in the EPANET PROGRAMMERs TOOLKIT
//(EPANET2.DLL) for use with C#
@@ -264,6 +264,8 @@ namespace EpanetCSharpLibrary
public const int EN_R_IS_ACTIVE = 3;
public const double EN_MISSING = -1.0E10;
public const double EN_SET_CLOSED = -1.0E10
public const double EN_SET_OPEN = 1.0E10
#region Epanet Imports

View File

@@ -5,7 +5,7 @@ Attribute VB_Name = "Module1"
'Declarations of functions in the EPANET PROGRAMMERs TOOLKIT
'(EPANET2.DLL)
'Last updated on 07/28/2022
'Last updated on 05/13/2023
' These are codes used by the DLL functions
Public Const EN_ELEVATION = 0 ' Node parameters
@@ -268,6 +268,8 @@ Public Const EN_STEP_TANKEVENT = 3
Public Const EN_STEP_CONTROLEVENT = 4
Public Const EN_MISSING As Double = -1.0E10
Public Const EN_SET_CLOSED As Double = -1.0E10
Public Const EN_SET_OPEN As Double = 1.0E10
'These are the external functions that comprise the DLL

View File

@@ -3,7 +3,7 @@ unit epanet2;
{ Declarations of imported procedures from the EPANET PROGRAMMERs TOOLKIT }
{ (EPANET2.DLL) }
{Last updated on 07/28/2022}
{Last updated on 05/13/2023}
interface
@@ -13,6 +13,8 @@ const
EN_MAXID = 31; { Max. # characters in ID name }
EN_MAXMSG = 255; { Max. # characters in strings }
EN_MISSING = -1.E10;
EN_SET_CLOSED = -1.E10;
EN_SET_OPEN = 1.E10;
EN_ELEVATION = 0; { Node parameters }
EN_BASEDEMAND = 1;

View File

@@ -4,7 +4,7 @@
'Declarations of functions in the EPANET PROGRAMMERs TOOLKIT
'(EPANET2.DLL) for use with VB.Net.
'Last updated on 07/28/2022
'Last updated on 05/13/2023
Imports System.Runtime.InteropServices
Imports System.Text
@@ -256,6 +256,8 @@ Public Const EN_R_IS_CLOSED = 2
Public Const EN_R_IS_ACTIVE = 3
Public Const EN_MISSING As Double = -1.0E10
Public Const EN_SET_CLOSED As Double = -1.0E10
Public Const EN_SET_OPEN As Double = 1.0E10
'These are the external functions that comprise the DLL

View File

@@ -9,7 +9,7 @@
Authors: see AUTHORS
Copyright: see AUTHORS
License: see LICENSE
Last Updated: 02/05/2023
Last Updated: 04/28/2023
******************************************************************************
*/
@@ -498,6 +498,8 @@ typedef enum {
EN_R_IS_ACTIVE = 3 //!< Control valve is active
} EN_RuleStatus;
#define EN_MISSING -1.E10 //!< Missing value indicator
#define EN_MISSING -1.E10 //!< Missing value indicator
#define EN_SET_CLOSED -1.E10 //!< Link set closed indicator
#define EN_SET_OPEN 1.E10 //!< Link set open indicator
#endif //EPANET2_ENUMS_H