epyt-flow 0.14.1__py3-none-any.whl → 0.14.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. epyt_flow/EPANET/EPANET/SRC_engines/AUTHORS +8 -40
  2. epyt_flow/EPANET/EPANET/SRC_engines/LICENSE +3 -3
  3. epyt_flow/EPANET/EPANET/SRC_engines/Readme_SRC_Engines.txt +18 -0
  4. epyt_flow/EPANET/EPANET/SRC_engines/enumstxt.h +7 -24
  5. epyt_flow/EPANET/EPANET/SRC_engines/epanet.c +374 -726
  6. epyt_flow/EPANET/EPANET/SRC_engines/epanet2.c +32 -128
  7. epyt_flow/EPANET/EPANET/SRC_engines/epanet2.def +131 -0
  8. epyt_flow/EPANET/EPANET/SRC_engines/errors.dat +1 -7
  9. epyt_flow/EPANET/EPANET/SRC_engines/funcs.h +14 -40
  10. epyt_flow/EPANET/EPANET/SRC_engines/hash.c +177 -177
  11. epyt_flow/EPANET/EPANET/SRC_engines/hash.h +28 -28
  12. epyt_flow/EPANET/EPANET/SRC_engines/hydcoeffs.c +40 -192
  13. epyt_flow/EPANET/EPANET/SRC_engines/hydraul.c +46 -101
  14. epyt_flow/EPANET/EPANET/SRC_engines/hydsolver.c +24 -85
  15. epyt_flow/EPANET/EPANET/SRC_engines/hydstatus.c +63 -29
  16. epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2.h +37 -70
  17. epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_2.h +234 -408
  18. epyt_flow/EPANET/EPANET/SRC_engines/include/epanet2_enums.h +37 -87
  19. epyt_flow/EPANET/EPANET/SRC_engines/inpfile.c +79 -153
  20. epyt_flow/EPANET/EPANET/SRC_engines/input1.c +94 -59
  21. epyt_flow/EPANET/EPANET/SRC_engines/input2.c +202 -73
  22. epyt_flow/EPANET/EPANET/SRC_engines/input3.c +351 -446
  23. epyt_flow/EPANET/EPANET/SRC_engines/main.c +93 -0
  24. epyt_flow/EPANET/EPANET/SRC_engines/mempool.c +4 -8
  25. epyt_flow/EPANET/EPANET/SRC_engines/mempool.h +23 -23
  26. epyt_flow/EPANET/EPANET/SRC_engines/output.c +4 -5
  27. epyt_flow/EPANET/EPANET/SRC_engines/project.c +75 -407
  28. epyt_flow/EPANET/EPANET/SRC_engines/quality.c +2 -12
  29. epyt_flow/EPANET/EPANET/SRC_engines/qualreact.c +13 -70
  30. epyt_flow/EPANET/EPANET/SRC_engines/qualroute.c +5 -7
  31. epyt_flow/EPANET/EPANET/SRC_engines/report.c +20 -88
  32. epyt_flow/EPANET/EPANET/SRC_engines/rules.c +6 -144
  33. epyt_flow/EPANET/EPANET/SRC_engines/smatrix.c +19 -19
  34. epyt_flow/EPANET/EPANET/SRC_engines/text.h +5 -16
  35. epyt_flow/EPANET/EPANET/SRC_engines/types.h +19 -73
  36. epyt_flow/EPANET/compile_linux.sh +1 -1
  37. epyt_flow/EPANET/compile_macos.sh +1 -1
  38. epyt_flow/VERSION +1 -1
  39. epyt_flow/simulation/scada/scada_data.py +1 -1
  40. epyt_flow/utils.py +66 -0
  41. epyt_flow/visualization/visualization_utils.py +4 -2
  42. {epyt_flow-0.14.1.dist-info → epyt_flow-0.14.2.dist-info}/METADATA +1 -1
  43. {epyt_flow-0.14.1.dist-info → epyt_flow-0.14.2.dist-info}/RECORD +46 -52
  44. epyt_flow/EPANET/EPANET/SRC_engines/flowbalance.c +0 -186
  45. epyt_flow/EPANET/EPANET/SRC_engines/leakage.c +0 -527
  46. epyt_flow/EPANET/EPANET/SRC_engines/util/cstr_helper.c +0 -59
  47. epyt_flow/EPANET/EPANET/SRC_engines/util/cstr_helper.h +0 -38
  48. epyt_flow/EPANET/EPANET/SRC_engines/util/errormanager.c +0 -92
  49. epyt_flow/EPANET/EPANET/SRC_engines/util/errormanager.h +0 -39
  50. epyt_flow/EPANET/EPANET/SRC_engines/util/filemanager.c +0 -212
  51. epyt_flow/EPANET/EPANET/SRC_engines/util/filemanager.h +0 -81
  52. epyt_flow/EPANET/EPANET/SRC_engines/validate.c +0 -408
  53. {epyt_flow-0.14.1.dist-info → epyt_flow-0.14.2.dist-info}/WHEEL +0 -0
  54. {epyt_flow-0.14.1.dist-info → epyt_flow-0.14.2.dist-info}/licenses/LICENSE +0 -0
  55. {epyt_flow-0.14.1.dist-info → epyt_flow-0.14.2.dist-info}/top_level.txt +0 -0
@@ -5,13 +5,13 @@
5
5
  /*
6
6
  ******************************************************************************
7
7
  Project: OWA EPANET
8
- Version: 2.3
8
+ Version: 2.2
9
9
  Module: epanet2.h
10
10
  Description: API function declarations
11
11
  Authors: see AUTHORS
12
12
  Copyright: see AUTHORS
13
13
  License: see LICENSE
14
- Last Updated: 04/25/2025
14
+ Last Updated: 10/29/2019
15
15
  ******************************************************************************
16
16
  */
17
17
 
@@ -48,11 +48,11 @@ extern "C" {
48
48
  */
49
49
  typedef struct Project *EN_Project;
50
50
 
51
- /*===================================================================
51
+ /********************************************************************
52
52
 
53
53
  Project Functions
54
54
 
55
- ===================================================================*/
55
+ ********************************************************************/
56
56
 
57
57
  /**
58
58
  @brief Creates an EPANET project.
@@ -113,7 +113,7 @@ typedef struct Project *EN_Project;
113
113
  int unitsType, int headLossType);
114
114
 
115
115
  /**
116
- @brief Reads an EPANET input file with no errors allowed.
116
+ @brief Opens an EPANET input file & reads in network data.
117
117
  @param ph an EPANET project handle.
118
118
  @param inpFile the name of an existing EPANET-formatted input file.
119
119
  @param rptFile the name of a report file to be created (or "" if not needed).
@@ -121,27 +121,11 @@ typedef struct Project *EN_Project;
121
121
  @return an error code.
122
122
 
123
123
  This function should be called immediately after ::EN_createproject if an EPANET-formatted
124
- input file will be used to supply network data. If errors are detected then the project is
125
- not opened and will not accept toolkit function calls.
124
+ input file will be used to supply network data.
126
125
  */
127
126
  int DLLEXPORT EN_open(EN_Project ph, const char *inpFile, const char *rptFile,
128
127
  const char *outFile);
129
128
 
130
- /**
131
- @brief Reads an EPANET input file with errors allowed.
132
- @param ph an EPANET project handle.
133
- @param inpFile the name of an existing EPANET-formatted input file.
134
- @param rptFile the name of a report file to be created (or "" if not needed).
135
- @param outFile the name of a binary output file to be created (or "" if not needed).
136
- @return an error code.
137
-
138
- This function should be called immediately after ::EN_createproject if an EPANET-formatted
139
- input file will be used to supply network data. If formatting errors are detected (error
140
- code = 200) then the project remains open and will accept toolkit function calls.
141
- */
142
- int DLLEXPORT EN_openX(EN_Project ph, const char *inpFile, const char *rptFile,
143
- const char *outFile);
144
-
145
129
  /**
146
130
  @brief Retrieves the title lines of the project
147
131
  @param ph an EPANET project handle.
@@ -160,8 +144,7 @@ typedef struct Project *EN_Project;
160
144
  @param line3 third title line
161
145
  @return an error code
162
146
  */
163
- int DLLEXPORT EN_settitle(EN_Project ph, const char *line1, const char *line2,
164
- const char *line3);
147
+ int DLLEXPORT EN_settitle(EN_Project ph, char *line1, char *line2, char *line3);
165
148
 
166
149
  /**
167
150
  @brief Retrieves a descriptive comment assigned to a Node, Link, Pattern or Curve.
@@ -178,54 +161,32 @@ typedef struct Project *EN_Project;
178
161
  @param ph an EPANET project handle.
179
162
  @param object a type of object (either EN_NODE, EN_LINK, EN_TIMEPAT or EN_CURVE)
180
163
  @param index the object's index starting from 1
181
- @param comment the comment string assigned to the object
164
+ @param[out] comment the comment string assigned to the object
182
165
  @return an error code
183
166
  */
184
- int DLLEXPORT EN_setcomment(EN_Project ph, int object, int index,
185
- const char *comment);
186
-
187
- /**
188
- @brief Retrieves a tag string assigned to a Node or Link.
189
- @param ph an EPANET project handle.
190
- @param object a type of object (either EN_NODE or EN_LINK)
191
- @param index the object's index starting from 1
192
- @param[out] out_tag the tag string assigned to the object
193
- @return an error code
194
- */
195
- int DLLEXPORT EN_gettag(EN_Project ph, int object, int index, char *out_tag);
196
-
197
- /**
198
- @brief Assigns a tag string to a Node or Link.
199
- @param ph an EPANET project handle.
200
- @param object a type of object (either EN_NODE or EN_LINK)
201
- @param index the object's index starting from 1
202
- @param tag the tag string assigned to the object
203
- @return an error code
204
- */
205
- int DLLEXPORT EN_settag(EN_Project ph, int object, int index,
206
- const char *tag);
167
+ int DLLEXPORT EN_setcomment(EN_Project ph, int object, int index, char *comment);
207
168
 
208
169
  /**
209
170
  @brief Retrieves the number of objects of a given type in a project.
210
171
  @param ph an EPANET project handle.
211
172
  @param object a type of object to count (see @ref EN_CountType)
212
- @param[out] out_count number of objects of the specified type
173
+ @param[out] count number of objects of the specified type
213
174
  @return an error code
214
175
  */
215
- int DLLEXPORT EN_getcount(EN_Project ph, int object, int *out_count);
176
+ int DLLEXPORT EN_getcount(EN_Project ph, int object, int *count);
216
177
 
217
178
  /**
218
179
  @brief Saves a project's data to an EPANET-formatted text file.
219
180
  @param ph an EPANET project handle.
220
181
  @param filename the name of the file to create.
221
- @return an error code
182
+ @return Error code
222
183
  */
223
184
  int DLLEXPORT EN_saveinpfile(EN_Project ph, const char *filename);
224
185
 
225
186
  /**
226
187
  @brief Closes a project and frees all of its memory.
227
188
  @param ph an EPANET project handle.
228
- @return an error code
189
+ @return Error code
229
190
 
230
191
  This function clears all existing data from a project but does not delete the
231
192
  project, so it can be re-used with another set of network data. Use ::EN_deleteproject
@@ -233,11 +194,11 @@ typedef struct Project *EN_Project;
233
194
  */
234
195
  int DLLEXPORT EN_close(EN_Project ph);
235
196
 
236
- /*===================================================================
197
+ /********************************************************************
237
198
 
238
199
  Hydraulic Analysis Functions
239
200
 
240
- ===================================================================*/
201
+ ********************************************************************/
241
202
 
242
203
  /**
243
204
  @brief Runs a complete hydraulic simulation with results for all time periods
@@ -327,31 +288,31 @@ typedef struct Project *EN_Project;
327
288
  /**
328
289
  @brief Computes a hydraulic solution for the current point in time.
329
290
  @param ph an EPANET project handle.
330
- @param[out] out_currentTime the current simulation time in seconds.
291
+ @param[out] currentTime the current simulation time in seconds.
331
292
  @return an error or warning code.
332
293
 
333
294
  This function is used in a loop with ::EN_nextH to run an extended period hydraulic
334
- simulation. This process automatically updates the simulation clock time so `currentTime`
295
+ simulation. This process automatically updates the simulation clock time so \b currentTime
335
296
  should be treated as a read-only variable.
336
297
 
337
298
  ::EN_initH must have been called prior to running the ::EN_runH - ::EN_nextH loop.
338
299
 
339
300
  See ::EN_nextH for an example of using this function.
340
301
  */
341
- int DLLEXPORT EN_runH(EN_Project ph, long *out_currentTime);
302
+ int DLLEXPORT EN_runH(EN_Project ph, long *currentTime);
342
303
 
343
304
  /**
344
305
  @brief Determines the length of time until the next hydraulic event occurs in an
345
306
  extended period simulation.
346
307
  @param ph an EPANET project handle.
347
- @param[out] out_tStep the time (in seconds) until the next hydraulic event or 0 if at
308
+ @param[out] tStep the time (in seconds) until the next hydraulic event or 0 if at
348
309
  the end of the full simulation duration.
349
310
  @return an error code.
350
311
 
351
312
  This function is used in a loop with ::EN_runH to run an extended period hydraulic
352
313
  simulation.
353
314
 
354
- The value of `out_tstep` should be treated as a read-only variable. It is automatically
315
+ The value of \b tstep should be treated as a read-only variable. It is automatically
355
316
  computed as the smaller of:
356
317
  - the time interval until the next hydraulic time step begins
357
318
  - the time interval until the next reporting time step begins
@@ -372,7 +333,7 @@ typedef struct Project *EN_Project;
372
333
  EN_closeH(ph);
373
334
  \endcode
374
335
  */
375
- int DLLEXPORT EN_nextH(EN_Project ph, long *out_tStep);
336
+ int DLLEXPORT EN_nextH(EN_Project ph, long *tStep);
376
337
 
377
338
  /**
378
339
  @brief Transfers a project's hydraulics results from its temporary hydraulics file
@@ -400,7 +361,7 @@ typedef struct Project *EN_Project;
400
361
 
401
362
  Before calling this function hydraulic results must have been generated and saved by having
402
363
  called ::EN_solveH or the ::EN_initH - ::EN_runH - ::EN_nextH sequence with the initflag
403
- argument of ::EN_initH set to `EN_SAVE` or `EN_SAVE_AND_INIT`.
364
+ argument of ::EN_initH set to \b EN_SAVE or \b EN_SAVE_AND_INIT.
404
365
  */
405
366
  int DLLEXPORT EN_savehydfile(EN_Project ph, const char *filename);
406
367
 
@@ -413,11 +374,11 @@ typedef struct Project *EN_Project;
413
374
  */
414
375
  int DLLEXPORT EN_closeH(EN_Project ph);
415
376
 
416
- /*===================================================================
377
+ /********************************************************************
417
378
 
418
379
  Water Quality Analysis Functions
419
380
 
420
- ===================================================================*/
381
+ ********************************************************************/
421
382
 
422
383
  /**
423
384
  @brief Runs a complete water quality simulation with results at uniform
@@ -440,7 +401,7 @@ typedef struct Project *EN_Project;
440
401
 
441
402
  /**
442
403
  @brief Opens a project's water quality solver.
443
- @param ph an EPANET project handle.
404
+ @param ph n EPANET project handle.
444
405
  @return an error code.
445
406
 
446
407
  Call ::EN_openQ prior to running the first water quality analysis using an
@@ -456,8 +417,8 @@ typedef struct Project *EN_Project;
456
417
  /**
457
418
  @brief Initializes a network prior to running a water quality analysis.
458
419
  @param ph an EPANET project handle.
459
- @param saveFlag set to `EN_SAVE` (1) if results are to be saved to the project's
460
- binary output file, or to `EN_NOSAVE` (0) if not.
420
+ @param saveFlag set to \b EN_SAVE (1) if results are to be saved to the project's
421
+ binary output file, or to \b EN_NOSAVE (0) if not.
461
422
  @return an error code.
462
423
 
463
424
  Call ::EN_initQ prior to running a water quality analysis using ::EN_runQ in
@@ -473,7 +434,7 @@ typedef struct Project *EN_Project;
473
434
  @brief Makes hydraulic and water quality results at the start of the current time
474
435
  period available to a project's water quality solver.
475
436
  @param ph an EPANET project handle.
476
- @param[out] out_currentTime current simulation time in seconds.
437
+ @param[out] currentTime current simulation time in seconds.
477
438
  @return an error code.
478
439
 
479
440
  Use ::EN_runQ along with ::EN_nextQ in a loop to access water quality results at the
@@ -484,16 +445,16 @@ typedef struct Project *EN_Project;
484
445
  ::EN_initQ must have been called prior to running an ::EN_runQ - ::EN_nextQ
485
446
  (or ::EN_stepQ) loop.
486
447
 
487
- The current time of the simulation, `out_currentTime`, is determined from information
488
- saved with the hydraulic analysis that preceded the water quality analysis. Treat it
489
- as a read-only variable.
448
+ The current time of the simulation is determined from information saved with the
449
+ hydraulic analysis that preceded the water quality analysis. Treat it as a read-only
450
+ variable.
490
451
  */
491
- int DLLEXPORT EN_runQ(EN_Project ph, long *out_currentTime);
452
+ int DLLEXPORT EN_runQ(EN_Project ph, long *currentTime);
492
453
 
493
454
  /**
494
455
  @brief Advances a water quality simulation over the time until the next hydraulic event.
495
456
  @param ph an EPANET project handle.
496
- @param[out] out_tStep time (in seconds) until the next hydraulic event or 0 if at the end
457
+ @param[out] tStep time (in seconds) until the next hydraulic event or 0 if at the end
497
458
  of the full simulation duration.
498
459
  @return an error code.
499
460
 
@@ -502,7 +463,7 @@ typedef struct Project *EN_Project;
502
463
  time step determined by when the next hydraulic event occurs. Use ::EN_stepQ instead
503
464
  if you wish to generate results over each water quality time step.
504
465
 
505
- The value of `out_tStep` is determined from information produced by the hydraulic analysis
466
+ The value of \b tStep is determined from information produced by the hydraulic analysis
506
467
  that preceded the water quality analysis. Treat it as a read-only variable.
507
468
 
508
469
  <b>Example:</b>
@@ -520,12 +481,12 @@ typedef struct Project *EN_Project;
520
481
  EN_closeQ(ph);
521
482
  \endcode
522
483
  */
523
- int DLLEXPORT EN_nextQ(EN_Project ph, long *out_tStep);
484
+ int DLLEXPORT EN_nextQ(EN_Project ph, long *tStep);
524
485
 
525
486
  /**
526
487
  @brief Advances a water quality simulation by a single water quality time step.
527
488
  @param ph an EPANET project handle.
528
- @param[out] out_timeLeft time left (in seconds) to the overall simulation duration.
489
+ @param[out] timeLeft time left (in seconds) to the overall simulation duration.
529
490
  @return an error code.
530
491
 
531
492
  This function is used in a loop with ::EN_runQ to perform an extended period water
@@ -533,10 +494,10 @@ typedef struct Project *EN_Project;
533
494
  quality time step of the simulation, rather than over each hydraulic event period
534
495
  as with ::EN_nextQ.
535
496
 
536
- Use the argument `out_timeLeft` to determine when no more calls to ::EN_runQ are needed
537
- because the end of the simulation period has been reached (i.e., when `out_timeLeft` = 0).
497
+ Use the argument \b timeLeft to determine when no more calls to ::EN_runQ are needed
498
+ because the end of the simulation period has been reached (i.e., when \b timeLeft = 0).
538
499
  */
539
- int DLLEXPORT EN_stepQ(EN_Project ph, long *out_timeLeft);
500
+ int DLLEXPORT EN_stepQ(EN_Project ph, long *timeLeft);
540
501
 
541
502
  /**
542
503
  @brief Closes the water quality solver, freeing all of its allocated memory.
@@ -550,54 +511,19 @@ typedef struct Project *EN_Project;
550
511
  */
551
512
  int DLLEXPORT EN_closeQ(EN_Project ph);
552
513
 
553
- /*===================================================================
514
+ /********************************************************************
554
515
 
555
516
  Reporting Functions
556
517
 
557
- ===================================================================*/
558
-
559
- /**
560
- @brief Sets a user-supplied callback function for reporting
561
- @param ph an EPANET project handle.
562
- @param callback a function pointer used for reporting.
563
- @return an error code.
564
-
565
- The callback function replaces the project's report file as
566
- the destination for all output written by ::EN_writeline. It must have
567
- the following signature:
568
-
569
- `void(void *userData, void *EN_projectHandle p, const char* s)`
570
-
571
- The `userData` parameter is a pointer to a client-side data object.
572
- It can be changed using the ::EN_setreportcallbackuserdata function.
573
- The parameter `s` is a placeholder for the EPANET-generated string
574
- that was passed into ::EN_writeline. Setting the callback function to
575
- NULL reverts to having ::EN_writeline use the project's report file.
576
- */
577
- int DLLEXPORT EN_setreportcallback(EN_Project ph, void(*callback)(void *userData, void *EN_projectHandle, const char*));
578
-
579
- /**
580
- @brief Sets a pointer to a client-side data object
581
- @param ph an EPANET project handle.
582
- @param userData a pointer to a client-side data object.
583
- @return an error code.
584
-
585
- The data pointer supplied by this function is passed into the callback
586
- function declared in ::EN_setreportcallback that replaces a project's
587
- report file as the destination for output written with ::EN_writeline.
588
- */
589
- int DLLEXPORT EN_setreportcallbackuserdata(EN_Project ph, void *userData);
518
+ ********************************************************************/
590
519
 
591
520
  /**
592
521
  @brief Writes a line of text to a project's report file.
593
522
  @param ph an EPANET project handle.
594
523
  @param line a text string to write.
595
524
  @return an error code.
596
-
597
- ::EN_setreportcallback can be used to assign an alternative destination
598
- to write `line` to in place of the project's report file.
599
525
  */
600
- int DLLEXPORT EN_writeline(EN_Project ph, const char *line);
526
+ int DLLEXPORT EN_writeline(EN_Project ph, char *line);
601
527
 
602
528
  /**
603
529
  @brief Writes simulation results in a tabular format to a project's report file.
@@ -622,7 +548,7 @@ typedef struct Project *EN_Project;
622
548
  This function allows toolkit clients to retrieve the contents of a project's
623
549
  report file while the project is still open.
624
550
  */
625
- int DLLEXPORT EN_copyreport(EN_Project ph, const char *filename);
551
+ int DLLEXPORT EN_copyreport(EN_Project ph, char *filename);
626
552
 
627
553
  /**
628
554
  @brief Clears the contents of a project's report file.
@@ -660,7 +586,7 @@ typedef struct Project *EN_Project;
660
586
  Formatted results of a simulation can be written to a project's report file
661
587
  using the ::EN_report function.
662
588
  */
663
- int DLLEXPORT EN_setreport(EN_Project ph, const char *format);
589
+ int DLLEXPORT EN_setreport(EN_Project ph, char *format);
664
590
 
665
591
  /**
666
592
  @brief Sets the level of hydraulic status reporting.
@@ -670,27 +596,27 @@ typedef struct Project *EN_Project;
670
596
 
671
597
  Status reporting writes changes in the hydraulics status of network elements to a
672
598
  project's report file as a hydraulic simulation unfolds. There are three levels
673
- of reporting: `EN_NO_REPORT` (no status reporting), `EN_NORMAL_REPORT` (normal
674
- reporting) `EN_FULL_REPORT` (full status reporting).
599
+ of reporting: \b EN_NO_REPORT (no status reporting), \b EN_NORMAL_REPORT (normal
600
+ reporting) \b EN_FULL_REPORT (full status reporting).
675
601
 
676
602
  The full status report contains information at each trial of the solution to the
677
603
  system hydraulic equations at each time step of a simulation. It is useful mainly
678
604
  for debugging purposes.
679
605
 
680
606
  If many hydraulic analyses will be run in the application it is recommended that
681
- status reporting be turned off (`level` = `EN_NO_REPORT`).
607
+ status reporting be turned off (<b>level = EN_NO_REPORT</b>).
682
608
  */
683
609
  int DLLEXPORT EN_setstatusreport(EN_Project ph, int level);
684
610
 
685
611
  /**
686
612
  @brief Retrieves the toolkit API version number.
687
- @param[out] out_version the version of the OWA-EPANET toolkit.
613
+ @param[out] version the version of the OWA-EPANET toolkit.
688
614
  @return an error code.
689
615
 
690
616
  The version number is to be interpreted with implied decimals, i.e.,
691
617
  "20100" == "2(.)01(.)00"
692
618
  */
693
- int DLLEXPORT EN_getversion(int *out_version);
619
+ int DLLEXPORT EN_getversion(int *version);
694
620
 
695
621
  /**
696
622
  @brief Returns the text of an error message generated by an error code.
@@ -699,7 +625,7 @@ typedef struct Project *EN_Project;
699
625
  @param maxLen maximum number of characters that errmsg can hold
700
626
  @return an error code
701
627
 
702
- Error message strings should be greater than @ref EN_SizeLimits "EN_MAXMSG" characters in length.
628
+ Error message strings should be at least @ref EN_SizeLimits "EN_MAXMSG" characters in length.
703
629
  */
704
630
  int DLLEXPORT EN_geterror(int errcode, char *out_errmsg, int maxLen);
705
631
 
@@ -707,27 +633,17 @@ typedef struct Project *EN_Project;
707
633
  @brief Retrieves a particular simulation statistic.
708
634
  @param ph an EPANET project handle.
709
635
  @param type the type of statistic to retrieve (see @ref EN_AnalysisStatistic).
710
- @param[out] out_value the value of the statistic.
636
+ @param[out] value the value of the statistic.
711
637
  @return an error code
712
638
  */
713
- int DLLEXPORT EN_getstatistic(EN_Project ph, int type, double* out_value);
714
-
715
-
716
- /**
717
- @brief Gets information about when the next hydraulic time step occurs.
718
- @param ph an EPANET project handle.
719
- @param[out] eventType the type of event that will occur (see @ref EN_TimestepEvent).
720
- @param[out] duration the amount of time in the future this event will occur
721
- @param[out] elementIndex the index of the element causing the event.
722
- **/
723
- int DLLEXPORT EN_timetonextevent(EN_Project ph, int *eventType, long *duration, int *elementIndex);
639
+ int DLLEXPORT EN_getstatistic(EN_Project ph, int type, double* value);
724
640
 
725
641
  /**
726
642
  @brief Retrieves the order in which a node or link appears in an @ref OutFile "output file".
727
643
  @param ph an EPANET project handle.
728
644
  @param type a type of element (either @ref EN_NODE or @ref EN_LINK).
729
645
  @param index the element's current index (starting from 1).
730
- @param[out] out_value the order in which the element's results were written to file.
646
+ @param[out] value the order in which the element's results were written to file.
731
647
  @return an error code.
732
648
 
733
649
  If the element does not appear in the file then its result index is 0.
@@ -736,25 +652,25 @@ typedef struct Project *EN_Project;
736
652
  after the order of nodes or links in a network's database has been changed due to editing
737
653
  operations.
738
654
  */
739
- int DLLEXPORT EN_getresultindex(EN_Project ph, int type, int index, int *out_value);
655
+ int DLLEXPORT EN_getresultindex(EN_Project ph, int type, int index, int *value);
740
656
 
741
- /*===================================================================
657
+ /********************************************************************
742
658
 
743
659
  Analysis Options Functions
744
660
 
745
- ===================================================================*/
661
+ ********************************************************************/
746
662
 
747
663
  /**
748
664
  @brief Retrieves the value of an analysis option.
749
665
  @param ph an EPANET project handle.
750
666
  @param option a type of analysis option (see @ref EN_Option).
751
- @param[out] out_value the current value of the option.
667
+ @param[out] value the current value of the option.
752
668
  @return an error code
753
669
  */
754
- int DLLEXPORT EN_getoption(EN_Project ph, int option, double *out_value);
670
+ int DLLEXPORT EN_getoption(EN_Project ph, int option, double *value);
755
671
 
756
672
  /**
757
- @brief Sets the value for an analysis option.
673
+ @brief Sets the value for an anlysis option.
758
674
  @param ph an EPANET project handle.
759
675
  @param option a type of analysis option (see @ref EN_Option).
760
676
  @param value the new value assigned to the option.
@@ -766,13 +682,13 @@ typedef struct Project *EN_Project;
766
682
  /**
767
683
  @brief Retrieves a project's flow units.
768
684
  @param ph an EPANET project handle.
769
- @param[out] out_units a flow units code (see @ref EN_FlowUnits)
685
+ @param[out] units a flow units code (see @ref EN_FlowUnits)
770
686
  @return an error code.
771
687
 
772
688
  Flow units in liters or cubic meters implies that SI metric units are used for all
773
689
  other quantities in addition to flow. Otherwise US Customary units are employed.
774
690
  */
775
- int DLLEXPORT EN_getflowunits(EN_Project ph, int *out_units);
691
+ int DLLEXPORT EN_getflowunits(EN_Project ph, int *units);
776
692
 
777
693
  /**
778
694
  @brief Sets a project's flow units.
@@ -789,10 +705,10 @@ typedef struct Project *EN_Project;
789
705
  @brief Retrieves the value of a time parameter.
790
706
  @param ph an EPANET project handle.
791
707
  @param param a time parameter code (see @ref EN_TimeParameter).
792
- @param[out] out_value the current value of the time parameter (in seconds).
708
+ @param[out] value the current value of the time parameter (in seconds).
793
709
  @return an error code.
794
710
  */
795
- int DLLEXPORT EN_gettimeparam(EN_Project ph, int param, long *out_value);
711
+ int DLLEXPORT EN_gettimeparam(EN_Project ph, int param, long *value);
796
712
 
797
713
  /**
798
714
  @brief Sets the value of a time parameter.
@@ -806,23 +722,23 @@ typedef struct Project *EN_Project;
806
722
  /**
807
723
  @brief Gets information about the type of water quality analysis requested.
808
724
  @param ph an EPANET project handle.
809
- @param[out] out_qualType type of analysis to run (see @ref EN_QualityType).
725
+ @param[out] qualType type of analysis to run (see @ref EN_QualityType).
810
726
  @param[out] out_chemName name of chemical constituent.
811
727
  @param[out] out_chemUnits concentration units of the constituent.
812
- @param[out] out_traceNode index of the node being traced (if applicable).
728
+ @param[out] traceNode index of the node being traced (if applicable).
813
729
  @return an error code.
814
730
  */
815
- int DLLEXPORT EN_getqualinfo(EN_Project ph, int *out_qualType, char *out_chemName,
816
- char *out_chemUnits, int *out_traceNode);
731
+ int DLLEXPORT EN_getqualinfo(EN_Project ph, int *qualType, char *out_chemName,
732
+ char *out_chemUnits, int *traceNode);
817
733
 
818
734
  /**
819
735
  @brief Retrieves the type of water quality analysis to be run.
820
736
  @param ph an EPANET project handle.
821
- @param[out] out_qualType the type of analysis to run (see @ref EN_QualityType).
822
- @param[out] out_traceNode the index of node being traced if `out_qualType` = `EN_TRACE`.
737
+ @param[out] qualType the type of analysis to run (see @ref EN_QualityType).
738
+ @param[out] traceNode the index of node being traced, if <b>qualType = EN_TRACE</b>.
823
739
  @return an error code.
824
740
  */
825
- int DLLEXPORT EN_getqualtype(EN_Project ph, int *out_qualType, int *out_traceNode);
741
+ int DLLEXPORT EN_getqualtype(EN_Project ph, int *qualType, int *traceNode);
826
742
 
827
743
  /**
828
744
  @brief Sets the type of water quality analysis to run.
@@ -830,7 +746,7 @@ typedef struct Project *EN_Project;
830
746
  @param qualType the type of analysis to run (see @ref EN_QualityType).
831
747
  @param chemName the name of the quality constituent.
832
748
  @param chemUnits the concentration units of the constituent.
833
- @param traceNode the ID name of the node being traced if `qualType` = `EN_TRACE`.
749
+ @param traceNode the ID name of the node being traced if <b>qualType = EN_TRACE</b>.
834
750
  @return an error code.
835
751
 
836
752
  Chemical name and units can be an empty string if the analysis is not for a chemical.
@@ -838,26 +754,26 @@ typedef struct Project *EN_Project;
838
754
 
839
755
  Note that the trace node is specified by ID name and not by index.
840
756
  */
841
- int DLLEXPORT EN_setqualtype(EN_Project ph, int qualType, const char *chemName,
842
- const char *chemUnits, const char *traceNode);
757
+ int DLLEXPORT EN_setqualtype(EN_Project ph, int qualType, char *chemName,
758
+ char *chemUnits, char *traceNode);
843
759
 
844
- /*===================================================================
760
+ /********************************************************************
845
761
 
846
762
  Node Functions
847
763
 
848
- ===================================================================*/
764
+ ********************************************************************/
849
765
 
850
766
  /**
851
767
  @brief Adds a new node to a project.
852
768
  @param ph an EPANET project handle.
853
769
  @param id the ID name of the node to be added.
854
770
  @param nodeType the type of node being added (see @ref EN_NodeType)
855
- @param[out] out_index the index of the newly added node
771
+ @param[out] index the index of the newly added node
856
772
  @return an error code.
857
773
 
858
774
  When a new node is created all of its properties (see @ref EN_NodeProperty) are set to 0.
859
775
  */
860
- int DLLEXPORT EN_addnode(EN_Project ph, const char *id, int nodeType, int *out_index);
776
+ int DLLEXPORT EN_addnode(EN_Project ph, char *id, int nodeType, int *index);
861
777
 
862
778
  /**
863
779
  @brief Deletes a node from a project.
@@ -866,9 +782,9 @@ typedef struct Project *EN_Project;
866
782
  @param actionCode the action taken if any control contains the node and its links.
867
783
  @return an error code.
868
784
 
869
- If `actionCode` is `EN_UNCONDITIONAL` then the node, its incident links and all
785
+ If \b actionCode is \b EN_UNCONDITIONAL then the node, its incident links and all
870
786
  simple and rule-based controls that contain them are deleted. If set to
871
- `EN_CONDITIONAL` then the node is not deleted if it or its incident links appear
787
+ \b EN_CONDITIONAL then the node is not deleted if it or its incident links appear
872
788
  in any controls and error code 261 is returned.
873
789
 
874
790
  */
@@ -878,10 +794,10 @@ typedef struct Project *EN_Project;
878
794
  @brief Gets the index of a node given its ID name.
879
795
  @param ph an EPANET project handle.
880
796
  @param id a node ID name.
881
- @param[out] out_index the node's index (starting from 1).
797
+ @param[out] index the node's index (starting from 1).
882
798
  @return an error code
883
799
  */
884
- int DLLEXPORT EN_getnodeindex(EN_Project ph, const char *id, int *out_index);
800
+ int DLLEXPORT EN_getnodeindex(EN_Project ph, char *id, int *index);
885
801
 
886
802
  /**
887
803
  @brief Gets the ID name of a node given its index.
@@ -890,7 +806,7 @@ typedef struct Project *EN_Project;
890
806
  @param[out] out_id the node's ID name.
891
807
  @return an error code
892
808
 
893
- The ID name must be sized to hold at least @ref EN_SizeLimits "EN_MAXID+1" characters.
809
+ The ID name must be sized to hold at least @ref EN_SizeLimits "EN_MAXID" characters.
894
810
  */
895
811
  int DLLEXPORT EN_getnodeid(EN_Project ph, int index, char *out_id);
896
812
 
@@ -903,43 +819,29 @@ typedef struct Project *EN_Project;
903
819
 
904
820
  The ID name must not be longer than @ref EN_SizeLimits "EN_MAXID" characters.
905
821
  */
906
- int DLLEXPORT EN_setnodeid(EN_Project ph, int index, const char *newid);
822
+ int DLLEXPORT EN_setnodeid(EN_Project ph, int index, char *newid);
907
823
 
908
824
  /**
909
825
  @brief Retrieves a node's type given its index.
910
826
  @param ph an EPANET project handle.
911
827
  @param index a node's index (starting from 1).
912
- @param[out] out_nodeType the node's type (see @ref EN_NodeType).
828
+ @param[out] nodeType the node's type (see @ref EN_NodeType).
913
829
  @return an error code.
914
830
  */
915
- int DLLEXPORT EN_getnodetype(EN_Project ph, int index, int *out_nodeType);
831
+ int DLLEXPORT EN_getnodetype(EN_Project ph, int index, int *nodeType);
916
832
 
917
833
  /**
918
834
  @brief Retrieves a property value for a node.
919
835
  @param ph an EPANET project handle.
920
836
  @param index a node's index.
921
837
  @param property the property to retrieve (see @ref EN_NodeProperty).
922
- @param[out] out_value the current value of the property.
923
- @return an error code.
924
-
925
- Values are returned in units that depend on the units used for flow rate
926
- (see @ref Units).
927
- */
928
-
929
- int DLLEXPORT EN_getnodevalue(EN_Project ph, int index, int property, double *out_value);
930
-
931
- /**
932
- @brief Retrieves an array of property values for all nodes.
933
- @param ph an EPANET project handle.
934
- @param property the property to retrieve (see @ref EN_NodeProperty).
935
- @param[out] out_values an array of values for all nodes.
838
+ @param[out] value the current value of the property.
936
839
  @return an error code.
937
840
 
938
841
  Values are returned in units that depend on the units used for flow rate
939
842
  (see @ref Units).
940
843
  */
941
-
942
- int DLLEXPORT EN_getnodevalues(EN_Project ph, int property, double *out_values);
844
+ int DLLEXPORT EN_getnodevalue(EN_Project ph, int index, int property, double *value);
943
845
 
944
846
  /**
945
847
  @brief Sets a property value for a node.
@@ -965,7 +867,7 @@ typedef struct Project *EN_Project;
965
867
  These properties have units that depend on the units used for flow rate (see @ref Units).
966
868
  */
967
869
  int DLLEXPORT EN_setjuncdata(EN_Project ph, int index, double elev, double dmnd,
968
- const char *dmndpat);
870
+ char *dmndpat);
969
871
 
970
872
  /**
971
873
  @brief Sets a group of properties for a tank node.
@@ -983,17 +885,17 @@ typedef struct Project *EN_Project;
983
885
  These properties have units that depend on the units used for flow rate (see @ref Units).
984
886
  */
985
887
  int DLLEXPORT EN_settankdata(EN_Project ph, int index, double elev, double initlvl,
986
- double minlvl, double maxlvl, double diam, double minvol, const char *volcurve);
888
+ double minlvl, double maxlvl, double diam, double minvol, char *volcurve);
987
889
 
988
890
  /**
989
891
  @brief Gets the (x,y) coordinates of a node.
990
892
  @param ph an EPANET project handle.
991
893
  @param index a node index (starting from 1).
992
- @param[out] out_x the node's X-coordinate value.
993
- @param[out] out_y the node's Y-coordinate value.
894
+ @param[out] x the node's X-coordinate value.
895
+ @param[out] y the node's Y-coordinate value.
994
896
  @return an error code.
995
897
  */
996
- int DLLEXPORT EN_getcoord(EN_Project ph, int index, double *out_x, double *out_y);
898
+ int DLLEXPORT EN_getcoord(EN_Project ph, int index, double *x, double *y);
997
899
 
998
900
  /**
999
901
  @brief Sets the (x,y) coordinates of a node.
@@ -1005,25 +907,25 @@ typedef struct Project *EN_Project;
1005
907
  */
1006
908
  int DLLEXPORT EN_setcoord(EN_Project ph, int index, double x, double y);
1007
909
 
1008
- /*===================================================================
910
+ /********************************************************************
1009
911
 
1010
912
  Nodal Demand Functions
1011
913
 
1012
- ===================================================================*/
914
+ ********************************************************************/
1013
915
 
1014
916
  /**
1015
917
  @brief Retrieves the type of demand model in use and its parameters.
1016
918
  @param ph an EPANET project handle.
1017
- @param[out] out_type Type of demand model (see @ref EN_DemandModel).
1018
- @param[out] out_pmin Pressure below which there is no demand.
1019
- @param[out] out_preq Pressure required to deliver full demand.
1020
- @param[out] out_pexp Pressure exponent in demand function.
919
+ @param[out] type Type of demand model (see @ref EN_DemandModel).
920
+ @param[out] pmin Pressure below which there is no demand.
921
+ @param[out] preq Pressure required to deliver full demand.
922
+ @param[out] pexp Pressure exponent in demand function.
1021
923
  @return an error code.
1022
924
 
1023
- Parameters `out_pmin`, `out_preq`, and `out_pexp` are only used when the demand model is `EN_PDA`.
925
+ Parameters <b>pmin, preq,</b> and \b pexp are only used when the demand model is \b EN_PDA.
1024
926
  */
1025
- int DLLEXPORT EN_getdemandmodel(EN_Project ph, int *out_type, double *out_pmin,
1026
- double *out_preq, double *out_pexp);
927
+ int DLLEXPORT EN_getdemandmodel(EN_Project ph, int *type, double *pmin,
928
+ double *preq, double *pexp);
1027
929
 
1028
930
  /**
1029
931
  @brief Sets the type of demand model to use and its parameters.
@@ -1034,13 +936,15 @@ typedef struct Project *EN_Project;
1034
936
  @param pexp Pressure exponent in demand function.
1035
937
  @return an error code.
1036
938
 
1037
- Set `type` to `EN_DDA` for a traditional demand driven analysis (in which case the
1038
- remaining three parameter values are ignored) or to `EN_PDA` for a pressure driven
1039
- analysis. In the latter case a node's demand is 0 when pressure is below `pmin`, is at full demand when pressure is above `preq`, or is otherwise computed as:\n
1040
- `Dfull * [ (P - pmin) / (preq - pmin) ] ^ pexp`\n
939
+ Set \b type to \b EN_DDA for a traditional demand driven analysis (in which case the
940
+ remaining three parameter values are ignored) or to \b EN_PDA for a pressure driven
941
+ analysis. In the latter case a node's demand is computed as:
942
+ > `Dfull * [ (P - pmin) / (preq - pmin) ] ^ pexp`
1041
943
  where `Dfull` is the full demand and `P` is the current pressure.
1042
944
 
1043
- A valid value for `preq` must be at least 0.1 pressure units larger than `pmin`.
945
+ Setting \b preq equal to \b pmin will result in a solution with the smallest amount of
946
+ demand reductions needed to insure that no node delivers positive demand at a pressure
947
+ below \b pmin.
1044
948
  */
1045
949
  int DLLEXPORT EN_setdemandmodel(EN_Project ph, int type, double pmin,
1046
950
  double preq, double pexp);
@@ -1059,7 +963,7 @@ typedef struct Project *EN_Project;
1059
963
  that no time pattern or category name is associated with the demand.
1060
964
  */
1061
965
  int DLLEXPORT EN_adddemand(EN_Project ph, int nodeIndex, double baseDemand,
1062
- const char *demandPattern, const char *demandName);
966
+ char *demandPattern, char *demandName);
1063
967
 
1064
968
  /**
1065
969
  @brief deletes a demand from a junction node.
@@ -1075,31 +979,31 @@ typedef struct Project *EN_Project;
1075
979
  @param ph an EPANET project handle.
1076
980
  @param nodeIndex the index of a node (starting from 1)
1077
981
  @param demandName the name of a demand category for the node
1078
- @param[out] out_demandIndex the index of the demand being sought
982
+ @param[out] demandIndex the index of the demand being sought
1079
983
  @return an error code
1080
984
  */
1081
- int DLLEXPORT EN_getdemandindex(EN_Project ph, int nodeIndex, const char *demandName,
1082
- int *out_demandIndex);
985
+ int DLLEXPORT EN_getdemandindex(EN_Project ph, int nodeIndex, char *demandName,
986
+ int *demandIndex);
1083
987
 
1084
988
  /**
1085
989
  @brief Retrieves the number of demand categories for a junction node.
1086
990
  @param ph an EPANET project handle.
1087
991
  @param nodeIndex the index of a node (starting from 1).
1088
- @param[out] out_numDemands the number of demand categories assigned to the node.
992
+ @param[out] numDemands the number of demand categories assigned to the node.
1089
993
  @return an error code.
1090
994
  */
1091
- int DLLEXPORT EN_getnumdemands(EN_Project ph, int nodeIndex, int *out_numDemands);
995
+ int DLLEXPORT EN_getnumdemands(EN_Project ph, int nodeIndex, int *numDemands);
1092
996
 
1093
997
  /**
1094
998
  @brief Gets the base demand for one of a node's demand categories.
1095
999
  @param ph an EPANET project handle.
1096
1000
  @param nodeIndex a node's index (starting from 1).
1097
1001
  @param demandIndex the index of a demand category for the node (starting from 1).
1098
- @param[out] out_baseDemand the category's base demand.
1002
+ @param[out] baseDemand the category's base demand.
1099
1003
  @return an error code.
1100
1004
  */
1101
1005
  int DLLEXPORT EN_getbasedemand(EN_Project ph, int nodeIndex, int demandIndex,
1102
- double *out_baseDemand);
1006
+ double *baseDemand);
1103
1007
 
1104
1008
  /**
1105
1009
  @brief Sets the base demand for one of a node's demand categories.
@@ -1117,14 +1021,14 @@ typedef struct Project *EN_Project;
1117
1021
  @param ph an EPANET project handle.
1118
1022
  @param nodeIndex the node's index (starting from 1).
1119
1023
  @param demandIndex the index of a demand category for the node (starting from 1).
1120
- @param[out] out_patIndex the index of the category's time pattern.
1024
+ @param[out] patIndex the index of the category's time pattern.
1121
1025
  @return an error code.
1122
1026
 
1123
1027
  A returned pattern index of 0 indicates that no time pattern has been assigned to the
1124
1028
  demand category.
1125
1029
  */
1126
1030
  int DLLEXPORT EN_getdemandpattern(EN_Project ph, int nodeIndex, int demandIndex,
1127
- int *out_patIndex);
1031
+ int *patIndex);
1128
1032
 
1129
1033
  /**
1130
1034
  @brief Sets the index of a time pattern used for one of a node's demand categories.
@@ -1147,7 +1051,7 @@ typedef struct Project *EN_Project;
1147
1051
  @param[out] out_demandName The name of the selected category.
1148
1052
  @return an error code.
1149
1053
 
1150
- `out_demandName` must be sized to contain at least @ref EN_SizeLimits "EN_MAXID+1" characters.
1054
+ \b demandName must be sized to contain at least @ref EN_SizeLimits "EN_MAXID" characters.
1151
1055
  */
1152
1056
  int DLLEXPORT EN_getdemandname(EN_Project ph, int nodeIndex, int demandIndex, char *out_demandName);
1153
1057
 
@@ -1157,18 +1061,17 @@ typedef struct Project *EN_Project;
1157
1061
  @param nodeIndex a node's index (starting from 1).
1158
1062
  @param demandIdx the index of one of the node's demand categories (starting from 1).
1159
1063
  @param demandName the new name assigned to the category.
1160
- @return an error code.
1064
+ @return Error code.
1161
1065
 
1162
1066
  The category name must contain no more than @ref EN_SizeLimits "EN_MAXID" characters.
1163
1067
  */
1164
- int DLLEXPORT EN_setdemandname(EN_Project ph, int nodeIndex, int demandIdx,
1165
- const char *demandName);
1068
+ int DLLEXPORT EN_setdemandname(EN_Project ph, int nodeIndex, int demandIdx, char *demandName);
1166
1069
 
1167
- /*===================================================================
1070
+ /********************************************************************
1168
1071
 
1169
1072
  Link Functions
1170
1073
 
1171
- ===================================================================*/
1074
+ ********************************************************************/
1172
1075
 
1173
1076
  /**
1174
1077
  @brief Adds a new link to a project.
@@ -1177,7 +1080,7 @@ typedef struct Project *EN_Project;
1177
1080
  @param linkType The type of link being added (see @ref EN_LinkType)
1178
1081
  @param fromNode The ID name of the link's starting node.
1179
1082
  @param toNode The ID name of the link's ending node.
1180
- @param[out] out_index the index of the newly added link.
1083
+ @param[out] index the index of the newly added link.
1181
1084
  @return an error code.
1182
1085
 
1183
1086
  A new pipe is assigned a diameter of 10 inches (254 mm) and a length of 330
@@ -1188,15 +1091,15 @@ typedef struct Project *EN_Project;
1188
1091
 
1189
1092
  All other pipe properties are set to 0.
1190
1093
 
1191
- A new pump has a status of `EN_OPEN`, a speed setting of 1, and has no pump
1094
+ A new pump has a status of \b EN_OPEN, a speed setting of 1, and has no pump
1192
1095
  curve or power rating assigned to it.
1193
1096
 
1194
1097
  A new valve has a diameter of 10 inches (254 mm) and all other properties set to 0.
1195
1098
 
1196
1099
  See @ref EN_LinkProperty.
1197
1100
  */
1198
- int DLLEXPORT EN_addlink(EN_Project ph, const char *id, int linkType, const char *fromNode,
1199
- const char *toNode, int *out_index);
1101
+ int DLLEXPORT EN_addlink(EN_Project ph, char *id, int linkType, char *fromNode,
1102
+ char *toNode, int *index);
1200
1103
 
1201
1104
  /**
1202
1105
  @brief Deletes a link from the project.
@@ -1205,8 +1108,8 @@ typedef struct Project *EN_Project;
1205
1108
  @param actionCode The action taken if any control contains the link.
1206
1109
  @return an error code.
1207
1110
 
1208
- If `actionCode` is `EN_UNCONDITIONAL` then the link and all simple and rule-based
1209
- controls that contain it are deleted. If set to `EN_CONDITIONAL` then the link
1111
+ If \b actionCode is \b EN_UNCONDITIONAL then the link and all simple and rule-based
1112
+ controls that contain it are deleted. If set to \b EN_CONDITIONAL then the link
1210
1113
  is not deleted if it appears in any control and error 261 is returned.
1211
1114
  */
1212
1115
  int DLLEXPORT EN_deletelink(EN_Project ph, int index, int actionCode);
@@ -1215,10 +1118,10 @@ typedef struct Project *EN_Project;
1215
1118
  @brief Gets the index of a link given its ID name.
1216
1119
  @param ph an EPANET project handle.
1217
1120
  @param id a link's ID name.
1218
- @param[out] out_index the link's index (starting from 1).
1121
+ @param[out] index the link's index (starting from 1).
1219
1122
  @return an error code.
1220
1123
  */
1221
- int DLLEXPORT EN_getlinkindex(EN_Project ph, const char *id, int *out_index);
1124
+ int DLLEXPORT EN_getlinkindex(EN_Project ph, char *id, int *index);
1222
1125
 
1223
1126
  /**
1224
1127
  @brief Gets the ID name of a link given its index.
@@ -1227,7 +1130,7 @@ typedef struct Project *EN_Project;
1227
1130
  @param[out] out_id The link's ID name.
1228
1131
  @return an error code.
1229
1132
 
1230
- The ID name must be sized to hold at least @ref EN_SizeLimits "EN_MAXID+1" characters.
1133
+ The ID name must be sized to hold at least @ref EN_SizeLimits "EN_MAXID" characters.
1231
1134
  */
1232
1135
  int DLLEXPORT EN_getlinkid(EN_Project ph, int index, char *out_id);
1233
1136
 
@@ -1236,20 +1139,20 @@ typedef struct Project *EN_Project;
1236
1139
  @param ph an EPANET project handle.
1237
1140
  @param index a link's index (starting from 1).
1238
1141
  @param newid the new ID name for the link.
1239
- @return an error code.
1142
+ @return Error code.
1240
1143
 
1241
1144
  The ID name must not be longer than @ref EN_SizeLimits "EN_MAXID" characters.
1242
1145
  */
1243
- int DLLEXPORT EN_setlinkid(EN_Project ph, int index, const char *newid);
1146
+ int DLLEXPORT EN_setlinkid(EN_Project ph, int index, char *newid);
1244
1147
 
1245
1148
  /**
1246
1149
  @brief Retrieves a link's type.
1247
1150
  @param ph an EPANET project handle.
1248
1151
  @param index a link's index (starting from 1).
1249
- @param[out] out_linkType the link's type (see @ref EN_LinkType).
1152
+ @param[out] linkType the link's type (see @ref EN_LinkType).
1250
1153
  @return an error code.
1251
1154
  */
1252
- int DLLEXPORT EN_getlinktype(EN_Project ph, int index, int *out_linkType);
1155
+ int DLLEXPORT EN_getlinktype(EN_Project ph, int index, int *linkType);
1253
1156
 
1254
1157
  /**
1255
1158
  @brief Changes a link's type.
@@ -1259,12 +1162,10 @@ typedef struct Project *EN_Project;
1259
1162
  @param actionCode the action taken if any controls contain the link.
1260
1163
  @return an error code.
1261
1164
 
1262
- If `actionCode` is `EN_UNCONDITIONAL` then all simple and rule-based controls that
1165
+ If \b actionCode is \b EN_UNCONDITIONAL then all simple and rule-based controls that
1263
1166
  contain the link are deleted when the link's type is changed. If set to
1264
- `EN_CONDITIONAL` then the type change is cancelled if the link appears in any
1167
+ \b EN_CONDITIONAL then the type change is cancelled if the link appears in any
1265
1168
  control and error 261 is returned.
1266
-
1267
- To only change a valve's type (such as from PRV to PSV) use ::EN_setlinkvalue with property `EN_VALVE_TYPE` whose value is selected from the valves in @ref EN_LinkType.
1268
1169
  */
1269
1170
  int DLLEXPORT EN_setlinktype(EN_Project ph, int *inout_index, int linkType, int actionCode);
1270
1171
 
@@ -1272,11 +1173,11 @@ typedef struct Project *EN_Project;
1272
1173
  @brief Gets the indexes of a link's start- and end-nodes.
1273
1174
  @param ph an EPANET project handle.
1274
1175
  @param index a link's index (starting from 1).
1275
- @param[out] out_node1 the index of the link's start node (starting from 1).
1276
- @param[out] out_node2 the index of the link's end node (starting from 1).
1176
+ @param[out] node1 the index of the link's start node (starting from 1).
1177
+ @param[out] node2 the index of the link's end node (starting from 1).
1277
1178
  @return an error code.
1278
1179
  */
1279
- int DLLEXPORT EN_getlinknodes(EN_Project ph, int index, int *out_node1, int *out_node2);
1180
+ int DLLEXPORT EN_getlinknodes(EN_Project ph, int index, int *node1, int *node2);
1280
1181
 
1281
1182
  /**
1282
1183
  @brief Sets the indexes of a link's start- and end-nodes.
@@ -1293,23 +1194,12 @@ typedef struct Project *EN_Project;
1293
1194
  @param ph an EPANET project handle.
1294
1195
  @param index a link's index (starting from 1).
1295
1196
  @param property the property to retrieve (see @ref EN_LinkProperty).
1296
- @param[out] out_value the current value of the property.
1197
+ @param[out] value the current value of the property.
1297
1198
  @return an error code.
1298
1199
 
1299
1200
  Values are returned in units that depend on the units used for flow rate (see @ref Units).
1300
1201
  */
1301
- int DLLEXPORT EN_getlinkvalue(EN_Project ph, int index, int property, double *out_value);
1302
-
1303
- /**
1304
- @brief Retrieves an array of property values for all links.
1305
- @param ph an EPANET project handle.
1306
- @param property the property to retrieve (see @ref EN_LinkProperty).
1307
- @param[out] out_values an array of values for all links.
1308
- @return an error code.
1309
-
1310
- Values are returned in units that depend on the units used for flow rate (see @ref Units).
1311
- */
1312
- int DLLEXPORT EN_getlinkvalues(EN_Project ph, int property, double *out_values);
1202
+ int DLLEXPORT EN_getlinkvalue(EN_Project ph, int index, int property, double *value);
1313
1203
 
1314
1204
  /**
1315
1205
  @brief Sets a property value for a link.
@@ -1342,32 +1232,21 @@ typedef struct Project *EN_Project;
1342
1232
  @brief Retrieves the number of internal vertex points assigned to a link.
1343
1233
  @param ph an EPANET project handle.
1344
1234
  @param index a link's index (starting from 1).
1345
- @param[out] out_count the number of vertex points that describe the link's shape.
1235
+ @param[out] count the number of vertex points that describe the link's shape.
1346
1236
  @return an error code.
1347
1237
  */
1348
- int DLLEXPORT EN_getvertexcount(EN_Project ph, int index, int *out_count);
1238
+ int DLLEXPORT EN_getvertexcount(EN_Project ph, int index, int *count);
1349
1239
 
1350
1240
  /**
1351
- @brief Retrieves the coordinates of a vertex point assigned to a link.
1241
+ @brief Retrieves the coordinate's of a vertex point assigned to a link.
1352
1242
  @param ph an EPANET project handle.
1353
1243
  @param index a link's index (starting from 1).
1354
1244
  @param vertex a vertex point index (starting from 1).
1355
- @param[out] out_x the vertex's X-coordinate value.
1356
- @param[out] out_y the vertex's Y-coordinate value.
1245
+ @param[out] x the vertex's X-coordinate value.
1246
+ @param[out] y the vertex's Y-coordinate value.
1357
1247
  @return an error code.
1358
1248
  */
1359
- int DLLEXPORT EN_getvertex(EN_Project ph, int index, int vertex, double *out_x, double *out_y);
1360
-
1361
- /**
1362
- @brief Sets the coordinates of a vertex point assigned to a link.
1363
- @param ph an EPANET project handle.
1364
- @param index a link's index (starting from 1).
1365
- @param vertex a vertex point index (starting from 1).
1366
- @param x the vertex's X-coordinate value.
1367
- @param y the vertex's Y-coordinate value.
1368
- @return an error code.
1369
- */
1370
- int DLLEXPORT EN_setvertex(EN_Project ph, int index, int vertex, double x, double y);
1249
+ int DLLEXPORT EN_getvertex(EN_Project ph, int index, int vertex, double *x, double *y);
1371
1250
 
1372
1251
  /**
1373
1252
  @brief Assigns a set of internal vertex points to a link.
@@ -1382,29 +1261,29 @@ typedef struct Project *EN_Project;
1382
1261
  */
1383
1262
  int DLLEXPORT EN_setvertices(EN_Project ph, int index, double *x, double *y, int count);
1384
1263
 
1385
- /*===================================================================
1264
+ /********************************************************************
1386
1265
 
1387
1266
  Pump Functions
1388
1267
 
1389
- ===================================================================*/
1268
+ ********************************************************************/
1390
1269
 
1391
1270
  /**
1392
1271
  @brief Retrieves the type of head curve used by a pump.
1393
1272
  @param ph an EPANET project handle.
1394
1273
  @param linkIndex the index of a pump link (starting from 1).
1395
- @param[out] out_pumpType the type of head curve used by the pump (see @ref EN_PumpType).
1274
+ @param[out] pumpType the type of head curve used by the pump (see @ref EN_PumpType).
1396
1275
  @return an error code.
1397
1276
  */
1398
- int DLLEXPORT EN_getpumptype(EN_Project ph, int linkIndex, int *out_pumpType);
1277
+ int DLLEXPORT EN_getpumptype(EN_Project ph, int linkIndex, int *pumpType);
1399
1278
 
1400
1279
  /**
1401
1280
  @brief Retrieves the curve assigned to a pump's head curve.
1402
1281
  @param ph an EPANET project handle.
1403
1282
  @param linkIndex the index of a pump link (starting from 1).
1404
- @param[out] out_curveIndex the index of the curve assigned to the pump's head curve.
1283
+ @param[out] curveIndex the index of the curve assigned to the pump's head curve.
1405
1284
  @return an error code.
1406
1285
  */
1407
- int DLLEXPORT EN_getheadcurveindex(EN_Project ph, int linkIndex, int *out_curveIndex);
1286
+ int DLLEXPORT EN_getheadcurveindex(EN_Project ph, int linkIndex, int *curveIndex);
1408
1287
 
1409
1288
  /**
1410
1289
  @brief Assigns a curve to a pump's head curve.
@@ -1415,11 +1294,11 @@ typedef struct Project *EN_Project;
1415
1294
  */
1416
1295
  int DLLEXPORT EN_setheadcurveindex(EN_Project ph, int linkIndex, int curveIndex);
1417
1296
 
1418
- /*===================================================================
1297
+ /********************************************************************
1419
1298
 
1420
1299
  Time Pattern Functions
1421
1300
 
1422
- ===================================================================*/
1301
+ ********************************************************************/
1423
1302
 
1424
1303
  /**
1425
1304
  @brief Adds a new time pattern to a project.
@@ -1429,7 +1308,7 @@ typedef struct Project *EN_Project;
1429
1308
 
1430
1309
  The new pattern contains a single time period whose factor is 1.0.
1431
1310
  */
1432
- int DLLEXPORT EN_addpattern(EN_Project ph, const char *id);
1311
+ int DLLEXPORT EN_addpattern(EN_Project ph, char *id);
1433
1312
 
1434
1313
  /**
1435
1314
  @brief Deletes a time pattern from a project.
@@ -1443,10 +1322,10 @@ typedef struct Project *EN_Project;
1443
1322
  @brief Retrieves the index of a time pattern given its ID name.
1444
1323
  @param ph an EPANET project handle.
1445
1324
  @param id the ID name of a time pattern.
1446
- @param[out] out_index the time pattern's index (starting from 1).
1325
+ @param[out] index the time pattern's index (starting from 1).
1447
1326
  @return an error code.
1448
1327
  */
1449
- int DLLEXPORT EN_getpatternindex(EN_Project ph, const char *id, int *out_index);
1328
+ int DLLEXPORT EN_getpatternindex(EN_Project ph, char *id, int *index);
1450
1329
 
1451
1330
  /**
1452
1331
  @brief Retrieves the ID name of a time pattern given its index.
@@ -1455,7 +1334,7 @@ typedef struct Project *EN_Project;
1455
1334
  @param[out] out_id the time pattern's ID name.
1456
1335
  @return an error code.
1457
1336
 
1458
- The ID name must be sized to hold at least @ref EN_SizeLimits "EN_MAXID+1" characters.
1337
+ The ID name must be sized to hold at least @ref EN_SizeLimits "EN_MAXID" characters.
1459
1338
  */
1460
1339
  int DLLEXPORT EN_getpatternid(EN_Project ph, int index, char *out_id);
1461
1340
 
@@ -1468,26 +1347,26 @@ typedef struct Project *EN_Project;
1468
1347
 
1469
1348
  The new ID name must not exceed @ref EN_SizeLimits "EN_MAXID" characters.
1470
1349
  */
1471
- int DLLEXPORT EN_setpatternid(EN_Project ph, int index, const char *id);
1350
+ int DLLEXPORT EN_setpatternid(EN_Project ph, int index, char *id);
1472
1351
 
1473
1352
  /**
1474
1353
  @brief Retrieves the number of time periods in a time pattern.
1475
1354
  @param ph an EPANET project handle.
1476
1355
  @param index a time pattern index (starting from 1).
1477
- @param[out] out_len the number of time periods in the pattern.
1356
+ @param[out] len the number of time periods in the pattern.
1478
1357
  @return an error code.
1479
1358
  */
1480
- int DLLEXPORT EN_getpatternlen(EN_Project ph, int index, int *out_len);
1359
+ int DLLEXPORT EN_getpatternlen(EN_Project ph, int index, int *len);
1481
1360
 
1482
1361
  /**
1483
1362
  @brief Retrieves a time pattern's factor for a given time period.
1484
1363
  @param ph an EPANET project handle.
1485
1364
  @param index a time pattern index (starting from 1).
1486
1365
  @param period a time period in the pattern (starting from 1).
1487
- @param[out] out_value the pattern factor for the given time period.
1366
+ @param[out] value the pattern factor for the given time period.
1488
1367
  @return an error code.
1489
1368
  */
1490
- int DLLEXPORT EN_getpatternvalue(EN_Project ph, int index, int period, double *out_value);
1369
+ int DLLEXPORT EN_getpatternvalue(EN_Project ph, int index, int period, double *value);
1491
1370
 
1492
1371
  /**
1493
1372
  @brief Sets a time pattern's factor for a given time period.
@@ -1503,10 +1382,10 @@ typedef struct Project *EN_Project;
1503
1382
  @brief Retrieves the average of all pattern factors in a time pattern.
1504
1383
  @param ph an EPANET project handle.
1505
1384
  @param index a time pattern index (starting from 1).
1506
- @param[out] out_value The average of all of the time pattern's factors.
1385
+ @param[out] value The average of all of the time pattern's factors.
1507
1386
  @return an error code.
1508
1387
  */
1509
- int DLLEXPORT EN_getaveragepatternvalue(EN_Project ph, int index, double *out_value);
1388
+ int DLLEXPORT EN_getaveragepatternvalue(EN_Project ph, int index, double *value);
1510
1389
 
1511
1390
  /**
1512
1391
  @brief Sets the pattern factors for a given time pattern.
@@ -1516,27 +1395,18 @@ typedef struct Project *EN_Project;
1516
1395
  @param len the number of factor values supplied.
1517
1396
  @return an error code.
1518
1397
 
1519
- `values` is a zero-based array that contains `len` elements.
1398
+ \b values is a zero-based array that contains \b len elements.
1520
1399
 
1521
1400
  Use this function to redefine (and resize) a time pattern all at once;
1522
1401
  use @ref EN_setpatternvalue to revise pattern factors one at a time.
1523
1402
  */
1524
1403
  int DLLEXPORT EN_setpattern(EN_Project ph, int index, double *values, int len);
1525
-
1526
- /**
1527
- @brief Loads time patterns from a file into a project under a specific pattern ID.
1528
- @param ph an EPANET project handle.
1529
- @param filename the name of the file containing pattern data.
1530
- @param id the ID name of the new pattern to load.
1531
- @return an error code.
1532
- */
1533
- int DLLEXPORT EN_loadpatternfile(EN_Project ph, const char *filename, const char *id);
1534
1404
 
1535
- /*===================================================================
1405
+ /********************************************************************
1536
1406
 
1537
1407
  Data Curve Functions
1538
1408
 
1539
- ===================================================================*/
1409
+ ********************************************************************/
1540
1410
 
1541
1411
  /**
1542
1412
  @brief Adds a new data curve to a project.
@@ -1546,7 +1416,7 @@ typedef struct Project *EN_Project;
1546
1416
 
1547
1417
  The new curve contains a single data point (1.0, 1.0).
1548
1418
  */
1549
- int DLLEXPORT EN_addcurve(EN_Project ph, const char *id);
1419
+ int DLLEXPORT EN_addcurve(EN_Project ph, char *id);
1550
1420
 
1551
1421
  /**
1552
1422
  @brief Deletes a data curve from a project.
@@ -1560,10 +1430,10 @@ typedef struct Project *EN_Project;
1560
1430
  @brief Retrieves the index of a curve given its ID name.
1561
1431
  @param ph an EPANET project handle.
1562
1432
  @param id the ID name of a curve.
1563
- @param[out] out_index The curve's index (starting from 1).
1433
+ @param[out] index The curve's index (starting from 1).
1564
1434
  @return an error code.
1565
1435
  */
1566
- int DLLEXPORT EN_getcurveindex(EN_Project ph, const char *id, int *out_index);
1436
+ int DLLEXPORT EN_getcurveindex(EN_Project ph, char *id, int *index);
1567
1437
 
1568
1438
  /**
1569
1439
  @brief Retrieves the ID name of a curve given its index.
@@ -1572,7 +1442,7 @@ typedef struct Project *EN_Project;
1572
1442
  @param[out] out_id the curve's ID name.
1573
1443
  @return an error code.
1574
1444
 
1575
- The ID name must be sized to hold at least @ref EN_SizeLimits "EN_MAXID+1" characters.
1445
+ The ID name must be sized to hold at least @ref EN_SizeLimits "EN_MAXID" characters.
1576
1446
  */
1577
1447
  int DLLEXPORT EN_getcurveid(EN_Project ph, int index, char *out_id);
1578
1448
 
@@ -1585,46 +1455,37 @@ typedef struct Project *EN_Project;
1585
1455
 
1586
1456
  The new ID name must not exceed @ref EN_SizeLimits "EN_MAXID" characters.
1587
1457
  */
1588
- int DLLEXPORT EN_setcurveid(EN_Project ph, int index, const char *id);
1458
+ int DLLEXPORT EN_setcurveid(EN_Project ph, int index, char *id);
1589
1459
 
1590
1460
  /**
1591
1461
  @brief Retrieves the number of points in a curve.
1592
1462
  @param ph an EPANET project handle.
1593
1463
  @param index a curve's index (starting from 1).
1594
- @param[out] out_len The number of data points assigned to the curve.
1464
+ @param[out] len The number of data points assigned to the curve.
1595
1465
  @return an error code.
1596
1466
  */
1597
- int DLLEXPORT EN_getcurvelen(EN_Project ph, int index, int *out_len);
1467
+ int DLLEXPORT EN_getcurvelen(EN_Project ph, int index, int *len);
1598
1468
 
1599
1469
  /**
1600
1470
  @brief Retrieves a curve's type.
1601
1471
  @param ph an EPANET project handle.
1602
1472
  @param index a curve's index (starting from 1).
1603
- @param[out] out_type the curve's type (see @ref EN_CurveType).
1604
- @return an error code.
1605
- */
1606
- int DLLEXPORT EN_getcurvetype(EN_Project ph, int index, int *out_type);
1607
-
1608
- /**
1609
- @brief Sets a curve's type.
1610
- @param ph an EPANET project handle.
1611
- @param index a curve's index (starting from 1).
1612
- @param type the curve's type (see @ref EN_CurveType).
1473
+ @param[out] type the curve's type (see @ref EN_CurveType).
1613
1474
  @return an error code.
1614
1475
  */
1615
- int DLLEXPORT EN_setcurvetype(EN_Project ph, int index, int type);
1476
+ int DLLEXPORT EN_getcurvetype(EN_Project ph, int index, int *type);
1616
1477
 
1617
1478
  /**
1618
1479
  @brief Retrieves the value of a single data point for a curve.
1619
1480
  @param ph an EPANET project handle.
1620
1481
  @param curveIndex a curve's index (starting from 1).
1621
1482
  @param pointIndex the index of a point on the curve (starting from 1).
1622
- @param[out] out_x the point's x-value.
1623
- @param[out] out_y the point's y-value.
1483
+ @param[out] x the point's x-value.
1484
+ @param[out] y the point's y-value.
1624
1485
  @return an error code.
1625
1486
  */
1626
1487
  int DLLEXPORT EN_getcurvevalue(EN_Project ph, int curveIndex, int pointIndex,
1627
- double *out_x, double *out_y);
1488
+ double *x, double *y);
1628
1489
 
1629
1490
  /**
1630
1491
  @brief Sets the value of a single data point for a curve.
@@ -1643,17 +1504,17 @@ typedef struct Project *EN_Project;
1643
1504
  @param ph an EPANET project handle.
1644
1505
  @param index a curve's index (starting from 1).
1645
1506
  @param[out] out_id the curve's ID name.
1646
- @param[out] out_nPoints the number of data points on the curve.
1647
- @param[out] out_xValues the curve's x-values.
1648
- @param[out] out_yValues the curve's y-values.
1507
+ @param[out] nPoints the number of data points on the curve.
1508
+ @param[out] xValues the curve's x-values.
1509
+ @param[out] yValues the curve's y-values.
1649
1510
  @return an error code.
1650
1511
 
1651
- The calling program is responsible for making `out_xValues` and `out_yValues` large enough
1652
- to hold `out_nPoints` number of data points and for sizing `out_id` to hold at least
1653
- @ref EN_SizeLimits "EN_MAXID+1" characters.
1512
+ The calling program is responsible for making `xValues` and `yValues` large enough
1513
+ to hold `nPoints` number of data points and for sizing `id` to hold at least
1514
+ @ref EN_SizeLimits "EN_MAXID" characters.
1654
1515
  */
1655
- int DLLEXPORT EN_getcurve(EN_Project ph, int index, char *out_id, int *out_nPoints,
1656
- double *out_xValues, double *out_yValues);
1516
+ int DLLEXPORT EN_getcurve(EN_Project ph, int index, char *out_id, int *nPoints,
1517
+ double *xValues, double *yValues);
1657
1518
 
1658
1519
  /**
1659
1520
  @brief assigns a set of data points to a curve.
@@ -1664,7 +1525,7 @@ typedef struct Project *EN_Project;
1664
1525
  @param nPoints the new number of data points for the curve.
1665
1526
  @return an error code.
1666
1527
 
1667
- `xValues` and `yValues` are zero-based arrays that contains `nPoints` elements.
1528
+ \b xValues and \b yValues are zero-based arrays that contains \b nPoints elements.
1668
1529
 
1669
1530
  Use this function to redefine (and resize) a curve all at once;
1670
1531
  use @ref EN_setcurvevalue to revise a curve's data points one at a time.
@@ -1672,11 +1533,11 @@ typedef struct Project *EN_Project;
1672
1533
  int DLLEXPORT EN_setcurve(EN_Project ph, int index, double *xValues,
1673
1534
  double *yValues, int nPoints);
1674
1535
 
1675
- /*===================================================================
1536
+ /********************************************************************
1676
1537
 
1677
1538
  Simple Controls Functions
1678
1539
 
1679
- ===================================================================*/
1540
+ ********************************************************************/
1680
1541
 
1681
1542
  /**
1682
1543
  @brief Adds a new simple control to a project.
@@ -1685,14 +1546,14 @@ typedef struct Project *EN_Project;
1685
1546
  @param linkIndex the index of a link to control (starting from 1).
1686
1547
  @param setting control setting applied to the link.
1687
1548
  @param nodeIndex index of the node used to control the link
1688
- (0 for `EN_TIMER` and `EN_TIMEOFDAY` controls).
1549
+ (0 for \b EN_TIMER and \b EN_TIMEOFDAY controls).
1689
1550
  @param level action level (tank level, junction pressure, or time in seconds)
1690
1551
  that triggers the control.
1691
- @param[out] out_index index of the new control.
1552
+ @param[out] index index of the new control.
1692
1553
  @return an error code.
1693
1554
  */
1694
1555
  int DLLEXPORT EN_addcontrol(EN_Project ph, int type, int linkIndex,
1695
- double setting, int nodeIndex, double level, int *out_index);
1556
+ double setting, int nodeIndex, double level, int *index);
1696
1557
 
1697
1558
  /**
1698
1559
  @brief Deletes an existing simple control.
@@ -1706,17 +1567,17 @@ typedef struct Project *EN_Project;
1706
1567
  @brief Retrieves the properties of a simple control.
1707
1568
  @param ph an EPANET project handle.
1708
1569
  @param index the control's index (starting from 1).
1709
- @param[out] out_type the type of control (see @ref EN_ControlType).
1710
- @param[out] out_linkIndex the index of the link being controlled.
1711
- @param[out] out_setting the control setting applied to the link.
1712
- @param[out] out_nodeIndex the index of the node used to trigger the control
1713
- (0 for `EN_TIMER` and `EN_TIMEOFDAY` controls).
1714
- @param[out] out_level the action level (tank level, junction pressure, or time in seconds)
1570
+ @param[out] type the type of control (see @ref EN_ControlType).
1571
+ @param[out] linkIndex the index of the link being controlled.
1572
+ @param[out] setting the control setting applied to the link.
1573
+ @param[out] nodeIndex the index of the node used to trigger the control
1574
+ (0 for \b EN_TIMER and \b EN_TIMEOFDAY controls).
1575
+ @param[out] level the action level (tank level, junction pressure, or time in seconds)
1715
1576
  that triggers the control.
1716
1577
  @return an error code.
1717
1578
  */
1718
- int DLLEXPORT EN_getcontrol(EN_Project ph, int index, int *out_type, int *out_linkIndex,
1719
- double *out_setting, int *out_nodeIndex, double *out_level);
1579
+ int DLLEXPORT EN_getcontrol(EN_Project ph, int index, int *type, int *linkIndex,
1580
+ double *setting, int *nodeIndex, double *level);
1720
1581
 
1721
1582
  /**
1722
1583
  @brief Sets the properties of an existing simple control.
@@ -1726,7 +1587,7 @@ typedef struct Project *EN_Project;
1726
1587
  @param linkIndex the index of the link being controlled.
1727
1588
  @param setting the control setting applied to the link.
1728
1589
  @param nodeIndex the index of the node used to trigger the control
1729
- (0 for `EN_TIMER` and `EN_TIMEOFDAY` controls).
1590
+ (0 for \b EN_TIMER and \b EN_TIMEOFDAY controls).
1730
1591
  @param level the action level (tank level, junction pressure, or time in seconds)
1731
1592
  that triggers the control.
1732
1593
  @return an error code.
@@ -1734,29 +1595,12 @@ typedef struct Project *EN_Project;
1734
1595
  int DLLEXPORT EN_setcontrol(EN_Project ph, int index, int type, int linkIndex,
1735
1596
  double setting, int nodeIndex, double level);
1736
1597
 
1737
- /**
1738
- @brief Gets the enabled status of a simple control.
1739
- @param ph an EPANET project handle.
1740
- @param index the control's index (starting from 1).
1741
- @param out_enabled `EN_TRUE` (= 1) if the control is enabled or `EN_FALSE` (= 0) if it is disabled.
1742
- @return an error code.
1743
- */
1744
- int DLLEXPORT EN_getcontrolenabled(EN_Project ph, int index, int *out_enabled);
1745
1598
 
1746
- /**
1747
- @brief Sets the enabled status of a simple control.
1748
- @param ph an EPANET project handle.
1749
- @param index the control's index (starting from 1).
1750
- @param enabled `EN_TRUE` (= 1) sets the control to enabled, `EN_FALSE` (= 0) sets it to disabled.
1751
- @return an error code.
1752
- */
1753
- int DLLEXPORT EN_setcontrolenabled(EN_Project ph, int index, int enabled);
1754
-
1755
- /*===================================================================
1599
+ /********************************************************************
1756
1600
 
1757
1601
  Rule-Based Controls Functions
1758
1602
 
1759
- ===================================================================*/
1603
+ ********************************************************************/
1760
1604
 
1761
1605
  /**
1762
1606
  @brief Adds a new rule-based control to a project.
@@ -1781,23 +1625,23 @@ typedef struct Project *EN_Project;
1781
1625
  @brief Retrieves summary information about a rule-based control.
1782
1626
  @param ph an EPANET project handle.
1783
1627
  @param index the rule's index (starting from 1).
1784
- @param[out] out_nPremises number of premises in the rule's IF section.
1785
- @param[out] out_nThenActions number of actions in the rule's THEN section.
1786
- @param[out] out_nElseActions number of actions in the rule's ELSE section.
1787
- @param[out] out_priority the rule's priority value.
1628
+ @param[out] nPremises number of premises in the rule's IF section.
1629
+ @param[out] nThenActions number of actions in the rule's THEN section.
1630
+ @param[out] nElseActions number of actions in the rule's ELSE section.
1631
+ @param[out] priority the rule's priority value.
1788
1632
  @return an error code.
1789
1633
  */
1790
- int DLLEXPORT EN_getrule(EN_Project ph, int index, int *out_nPremises,
1791
- int *out_nThenActions, int *out_nElseActions, double *out_priority);
1634
+ int DLLEXPORT EN_getrule(EN_Project ph, int index, int *nPremises,
1635
+ int *nThenActions, int *nElseActions, double *priority);
1792
1636
 
1793
1637
  /**
1794
1638
  @brief Gets the ID name of a rule-based control given its index.
1795
1639
  @param ph an EPANET project handle.
1796
1640
  @param index the rule's index (starting from 1).
1797
1641
  @param[out] out_id the rule's ID name.
1798
- @return an error code.
1642
+ @return Error code.
1799
1643
 
1800
- The ID name must be sized to hold at least @ref EN_SizeLimits "EN_MAXID+1" characters.
1644
+ The ID name must be sized to hold at least @ref EN_SizeLimits "EN_MAXID" characters.
1801
1645
  */
1802
1646
  int DLLEXPORT EN_getruleID(EN_Project ph, int index, char *out_id);
1803
1647
 
@@ -1807,26 +1651,26 @@ typedef struct Project *EN_Project;
1807
1651
  @param ruleIndex the rule's index (starting from 1).
1808
1652
  @param premiseIndex the position of the premise in the rule's list of premises
1809
1653
  (starting from 1).
1810
- @param[out] out_logop the premise's logical operator (`IF` = 1, `AND` = 2, `OR` = 3` ).
1811
- @param[out] out_object the type of object the premise refers to (see @ref EN_RuleObject).
1812
- @param[out] out_objIndex the index of the object (e.g. the index of a tank).
1813
- @param[out] out_variable the object's variable being compared (see @ref EN_RuleVariable).
1814
- @param[out] out_relop the premise's comparison operator (see @ref EN_RuleOperator).
1815
- @param[out] out_status the status that the object's status is compared to
1654
+ @param[out] logop the premise's logical operator ( \b IF = 1, \b AND = 2, \b OR = 3 ).
1655
+ @param[out] object the type of object the premise refers to (see @ref EN_RuleObject).
1656
+ @param[out] objIndex the index of the object (e.g. the index of a tank).
1657
+ @param[out] variable the object's variable being compared (see @ref EN_RuleVariable).
1658
+ @param[out] relop the premise's comparison operator (see @ref EN_RuleOperator).
1659
+ @param[out] status the status that the object's status is compared to
1816
1660
  (see @ref EN_RuleStatus).
1817
- @param[out] out_value the value that the object's variable is compared to.
1661
+ @param[out] value the value that the object's variable is compared to.
1818
1662
  @return an error code.
1819
1663
  */
1820
1664
  int DLLEXPORT EN_getpremise(EN_Project ph, int ruleIndex, int premiseIndex,
1821
- int *out_logop, int *out_object, int *out_objIndex, int *out_variable,
1822
- int *out_relop, int *out_status, double *out_value);
1665
+ int *logop, int *object, int *objIndex, int *variable,
1666
+ int *relop, int *status, double *value);
1823
1667
 
1824
1668
  /**
1825
1669
  @brief Sets the properties of a premise in a rule-based control.
1826
1670
  @param ph an EPANET project handle.
1827
1671
  @param ruleIndex the rule's index (starting from 1).
1828
1672
  @param premiseIndex the position of the premise in the rule's list of premises.
1829
- @param logop the premise's logical operator (`IF` = 1, `AND` = 2, `OR` = 3 ).
1673
+ @param logop the premise's logical operator ( \b IF = 1, \b AND = 2, \b OR = 3 ).
1830
1674
  @param object the type of object the premise refers to (see @ref EN_RuleObject).
1831
1675
  @param objIndex the index of the object (e.g. the index of a tank).
1832
1676
  @param variable the object's variable being compared (see @ref EN_RuleVariable).
@@ -1879,13 +1723,13 @@ typedef struct Project *EN_Project;
1879
1723
  @param ph an EPANET project handle.
1880
1724
  @param ruleIndex the rule's index (starting from 1).
1881
1725
  @param actionIndex the index of the THEN action to retrieve (starting from 1).
1882
- @param[out] out_linkIndex the index of the link in the action (starting from 1).
1883
- @param[out] out_status the status assigned to the link (see @ref EN_RuleStatus)
1884
- @param[out] out_setting the value assigned to the link's setting.
1726
+ @param[out] linkIndex the index of the link in the action (starting from 1).
1727
+ @param[out] status the status assigned to the link (see @ref EN_RuleStatus)
1728
+ @param[out] setting the value assigned to the link's setting.
1885
1729
  @return an error code.
1886
1730
  */
1887
1731
  int DLLEXPORT EN_getthenaction(EN_Project ph, int ruleIndex, int actionIndex,
1888
- int *out_linkIndex, int *out_status, double *out_setting);
1732
+ int *linkIndex, int *status, double *setting);
1889
1733
 
1890
1734
  /**
1891
1735
  @brief Sets the properties of a THEN action in a rule-based control.
@@ -1905,13 +1749,13 @@ typedef struct Project *EN_Project;
1905
1749
  @param ph an EPANET project handle.
1906
1750
  @param ruleIndex the rule's index (starting from 1).
1907
1751
  @param actionIndex the index of the ELSE action to retrieve (starting from 1).
1908
- @param[out] out_linkIndex the index of the link in the action.
1909
- @param[out] out_status the status assigned to the link (see @ref EN_RuleStatus).
1910
- @param[out] out_setting the value assigned to the link's setting.
1752
+ @param[out] linkIndex the index of the link in the action.
1753
+ @param[out] status the status assigned to the link (see @ref EN_RuleStatus).
1754
+ @param[out] setting the value assigned to the link's setting.
1911
1755
  @return an error code.
1912
1756
  */
1913
1757
  int DLLEXPORT EN_getelseaction(EN_Project ph, int ruleIndex, int actionIndex,
1914
- int *out_linkIndex, int *out_status, double *out_setting);
1758
+ int *linkIndex, int *status, double *setting);
1915
1759
 
1916
1760
  /**
1917
1761
  @brief Sets the properties of an ELSE action in a rule-based control.
@@ -1935,24 +1779,6 @@ typedef struct Project *EN_Project;
1935
1779
  */
1936
1780
  int DLLEXPORT EN_setrulepriority(EN_Project ph, int index, double priority);
1937
1781
 
1938
- /**
1939
- @brief Gets the enabled status of a rule-based control.
1940
- @param ph an EPANET project handle.
1941
- @param index the rule's index (starting from 1).
1942
- @param out_enabled the rule will be either EN_TRUE=enabled or EN_FALSE=disabled.
1943
- @return an error code.
1944
- */
1945
- int DLLEXPORT EN_getruleenabled(EN_Project ph, int index, int *out_enabled);
1946
-
1947
- /**
1948
- @brief Sets the enabled status of a rule-based control.
1949
- @param ph an EPANET project handle.
1950
- @param index the rule's index (starting from 1).
1951
- @param enabled set the rule to either EN_TRUE=enabled or EN_FALSE=disabled.
1952
- @return an error code.
1953
- */
1954
- int DLLEXPORT EN_setruleenabled(EN_Project ph, int index, int enabled);
1955
-
1956
1782
  #if defined(__cplusplus)
1957
1783
  }
1958
1784
  #endif