API Reference - Arcs
This section of the documentation provides a reference for the API of the arcs.arcs module.
Created on Wed Apr 7 08:43:32 2021.
@author: Barney
Converted to totals on Thur Apr 21 2022
AltQueueArc
Bases: QueueArc
Source code in wsimod/arcs/arcs.py
555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 |
|
__init__(**kwargs)
A simpler queue arc that has a queue that is a dict where each key is the travel time.
Cannot be used if arc capacity is dynamic. Cannot be used for pulls.
Source code in wsimod/arcs/arcs.py
558 559 560 561 562 563 564 565 566 567 568 |
|
alt_queue_arc_sum()
Sum the total water in the queue of the arc.
Returns:
Type | Description |
---|---|
dict
|
A VQIP amount of water/pollutants in the arc |
Source code in wsimod/arcs/arcs.py
570 571 572 573 574 575 576 577 578 579 |
|
end_timestep()
End timestep in an arc, resetting flow/vqip in/out (which determine) the capacity for that timestep.
Update timings in the queue.
Source code in wsimod/arcs/arcs.py
640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 |
|
enter_queue(request, direction='push', tag='default')
Add a request into the arc's queue.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
dict
|
A dict with a VQIP under the 'vqip' key and the travel time under the 'time' key. |
required |
direction
|
str
|
Direction of flow, can be 'push' only. Defaults to 'push' |
'push'
|
tag
|
str
|
Optional message for out_port's query handler, can be 'default' only. Defaults to 'default'. |
'default'
|
Source code in wsimod/arcs/arcs.py
581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 |
|
reinit()
Source code in wsimod/arcs/arcs.py
662 663 664 665 |
|
update_queue(direction=None, backflow_enabled=True)
Trigger the push of water in the 0th key for the queue, if the out_port responds that it cannot receive the push, then this water will be returned as backflow (if enabled).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
direction
|
str
|
Direction of flow, can be 'push' only. Defaults to 'push' |
None
|
backflow_enabled
|
bool
|
Enable backflow, described above, if not enabled then the request will remain in the queue until all water has been received. Defaults to True. |
True
|
Returns:
Name | Type | Description |
---|---|---|
backflow |
dict
|
In the case of a push direction, any backflow will be returned as a VQIP amount |
Source code in wsimod/arcs/arcs.py
603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 |
|
Arc
Bases: WSIObj
Source code in wsimod/arcs/arcs.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
|
__init__(name='', capacity=constants.UNBOUNDED_CAPACITY, preference=1, in_port=None, out_port=None, **kwargs)
Arc objects are the way for information to be passed between nodes in WSIMOD. They have an in_port (where a message comes from) and an out_port (where a message goes to).
Returns:
Name | Type | Description |
---|---|---|
name |
str
|
Name of arc. Defaults to ''. |
capacity |
float
|
Capacity of flow along an arc (vol/timestep). Defaults to constants.UNBOUNDED_CAPACITY. |
preference |
float
|
Number used to prioritise or deprioritise use of an arc when flexibility exists |
in_port |
A WSIMOD node object where the arc starts |
|
out_port |
A WSIMOD node object where the arc ends |
Source code in wsimod/arcs/arcs.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
|
apply_overrides(overrides={})
Apply overrides to the node.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
overrides
|
dict
|
Dictionary of overrides. Defaults to {}. |
{}
|
Source code in wsimod/arcs/arcs.py
87 88 89 90 91 92 93 94 95 96 |
|
arc_mass_balance()
Checks mass balance for inflows/outflows/storage change in an arc.
Returns:
Name | Type | Description |
---|---|---|
in_ (dict) Total vqip of vqip_in and other inputs in mass_balance_in |
||
ds_ |
dict
|
Total vqip of change in arc in mass_balance_ds |
out_ |
dict
|
Total vqip of vqip_out and other outputs in mass_balance_out |
Examples:
arc_in, arc_out, arc_ds = my_arc.arc_mass_balance()
Source code in wsimod/arcs/arcs.py
98 99 100 101 102 103 104 105 106 107 108 109 110 |
|
end_timestep()
End timestep in an arc, resetting flow/vqip in/out (which determine) the capacity for that timestep.
Source code in wsimod/arcs/arcs.py
259 260 261 262 263 264 265 |
|
get_excess(direction, vqip=None, tag='default')
Calculate how much could be pull/pulled along the arc by combining both arc capacity and out_port check information.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
direction
|
str
|
should be 'pull' or 'push' |
required |
vqip
|
dict
|
A VQIP amount to push/pull that can be specified. Defaults to None, which returns all available water to pull or maximum capacity to push (depending on 'direction'). |
None
|
tag
|
str
|
optional message to direct the out_port's query_handler which function to call. Defaults to 'default'. |
'default'
|
Returns:
Type | Description |
---|---|
dict
|
A VQIP amount of water that could be pulled/pushed |
Source code in wsimod/arcs/arcs.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
|
reinit()
Reinitiatilise.
Source code in wsimod/arcs/arcs.py
267 268 269 |
|
send_pull_check(vqip=None, tag='default')
Function used to transmit a pull check from one node (in_port) to another node (out_port).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vqip
|
dict
|
A dict VQIP of water to pull that can be specified (by default, only the 'volume' key is used). Defaults to None, which returns all available water to pull. |
None
|
tag
|
str
|
optional message to direct the out_port's query_handler which function to call. Defaults to 'default'. |
'default'
|
Returns:
Type | Description |
---|---|
dict
|
A VQIP amount of water that could be pulled |
Source code in wsimod/arcs/arcs.py
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
|
send_pull_request(vqip, tag='default')
Function used to transmit a pull request from one node (in_port) to another node (out_port).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vqip
|
dict
|
A dict VQIP of water to pull (by default, only 'volume' key is used) |
required |
tag
|
str
|
optional message to direct the out_port's query_handler which function to call. Defaults to 'default'. |
'default'
|
Returns:
Type | Description |
---|---|
dict
|
A VQIP amount of water that was successfully pulled |
Source code in wsimod/arcs/arcs.py
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
|
send_push_check(vqip=None, tag='default')
Function used to transmit a push check from one node (in_port) to another node (out_port).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vqip
|
dict
|
A dict VQIP of water to push that can be specified. Defaults to None, which returns maximum capacity to push. |
None
|
tag
|
str
|
optional message to direct the out_port's query_handler which function to call. Defaults to 'default'. |
'default'
|
Returns:
Type | Description |
---|---|
dict
|
A VQIP amount of water that could be pushed |
Source code in wsimod/arcs/arcs.py
199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
|
send_push_request(vqip, tag='default', force=False)
Function used to transmit a push request from one node (in_port) to another node (out_port).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vqip
|
dict
|
A dict VQIP of water to push |
required |
tag
|
str
|
optional message to direct the out_port's query_ handler which function to call. Defaults to 'default'. |
'default'
|
force
|
bool
|
Argument used to cause function to ignore tank capacity of out_port, possibly resulting in pooling. Should not be used unless out_port is a tank object. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
dict
|
A VQIP amount of water that was not successfully pushed |
Source code in wsimod/arcs/arcs.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
|
DecayArc
Source code in wsimod/arcs/arcs.py
668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 |
|
__init__(decays={}, **kwargs)
A QueueArc that applies decays from a DecayObj.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
decays
|
dict
|
A dict of dicts containing a key for each pollutant that decays and within that, a key for each parameter (a constant and exponent). Defaults to {}. |
{}
|
Source code in wsimod/arcs/arcs.py
671 672 673 674 675 676 677 678 679 680 681 682 683 684 |
|
end_timestep()
End timestep in an arc, resetting flow/vqip in/out (which determine) the capacity for that timestep.
Update times of requests in the queue. Apply the make_decay function (i.e., the decay that occurs in the following timestep).
Source code in wsimod/arcs/arcs.py
710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 |
|
enter_queue(request, direction=None, tag='default')
Add a request into the arc's queue list. Apply the make_decay function (i.e., the decay that occur's this timestep).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
dict
|
A dict with a VQIP under the 'vqip' key and the travel time under the 'time' key. |
required |
direction
|
str
|
Direction of flow, can be 'push' or 'pull |
None
|
tag
|
str
|
optional message to direct the out_port's query_handler which function to call. Defaults to 'default'. |
'default'
|
Source code in wsimod/arcs/arcs.py
686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 |
|
DecayArcAlt
Bases: AltQueueArc
, DecayObj
Source code in wsimod/arcs/arcs.py
731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 |
|
__init__(decays={}, **kwargs)
An AltQueueArc that applies decays from a DecayObj.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
decays
|
dict
|
A dict of dicts containing a key for each pollutant that decays and within that, a key for each parameter (a constant and exponent). Defaults to {}. |
{}
|
Source code in wsimod/arcs/arcs.py
734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 |
|
enter_queue(request, direction=None, tag='default')
Add a request into the arc's queue. Apply the make_decay function (i.e., the decay that occur's this timestep).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
dict
|
A dict with a VQIP under the 'vqip' key and the travel time under the 'time' key. |
required |
direction
|
str
|
Direction of flow, can be 'push' only. Defaults to 'push' |
None
|
tag
|
str
|
Optional message for out_port's query handler, can be 'default' only. Defaults to 'default'. |
'default'
|
Source code in wsimod/arcs/arcs.py
752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 |
|
PullArc
Bases: Arc
Source code in wsimod/arcs/arcs.py
808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 |
|
__init__(**kwargs)
Subclass of Arc where pushes return no availability to push.
This creates an Arc where only pull requests/checks can be sent, similar to a river abstraction.
Source code in wsimod/arcs/arcs.py
811 812 813 814 815 816 817 818 819 |
|
send_push_check_deny(vqip=None, tag='default')
Function used to deny any push checks.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vqip
|
dict
|
A dict VQIP of water to push that can be specified. Defaults to None, which returns maximum capacity to push. |
None
|
tag
|
str
|
optional message to direct the out_port's query_handler which function to call. Defaults to 'default'. |
'default'
|
Returns:
Type | Description |
---|---|
dict
|
An empty VQIP amount of water indicating no water can be pushed |
Source code in wsimod/arcs/arcs.py
837 838 839 840 841 842 843 844 845 846 847 848 849 |
|
send_push_deny(vqip, tag='default', force=False)
Function used to deny any push requests.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vqip
|
dict
|
A dict VQIP of water to push |
required |
tag
|
str
|
optional message to direct the out_port's query_handler which function to call. Defaults to 'default'. |
'default'
|
force
|
bool
|
Argument used to cause function to ignore tank capacity of out_port, possibly resulting in pooling. Should not be used unless out_port is a tank object. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
dict
|
A VQIP amount of water that was not successfully pushed |
Source code in wsimod/arcs/arcs.py
821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 |
|
PushArc
Bases: Arc
Source code in wsimod/arcs/arcs.py
852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 |
|
__init__(**kwargs)
Subclass of Arc where pushes return no availability to pull.
This creates an Arc where only push requests/checks can be sent, similar to a CSO.
Source code in wsimod/arcs/arcs.py
855 856 857 858 859 860 861 862 863 |
|
send_pull_check_deny(vqip=None, tag='default')
Function used to deny any pull checks.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vqip
|
dict
|
A dict VQIP of water to pull that can be specified. Defaults to None, which returns maximum capacity to pull. |
None
|
tag
|
str
|
optional message to direct the out_port's query_handler which function to call. Defaults to 'default'. |
'default'
|
Returns:
Type | Description |
---|---|
dict
|
An empty VQIP amount of water indicating no water can be pulled |
Source code in wsimod/arcs/arcs.py
881 882 883 884 885 886 887 888 889 890 891 892 893 |
|
send_pull_deny(vqip, tag='default', force=False)
Function used to deny any pull requests.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vqip
|
dict
|
A dict VQIP of water to pull |
required |
tag
|
str
|
optional message to direct the out_port's query_handler which function to call. Defaults to 'default'. |
'default'
|
force
|
bool
|
Argument used to cause function to ignore tank capacity of out_port, possibly resulting in pooling. Should not be used unless out_port is a tank object. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
dict
|
A VQIP amount of water that was successfully pulled |
Source code in wsimod/arcs/arcs.py
865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 |
|
QueueArc
Bases: Arc
Source code in wsimod/arcs/arcs.py
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 |
|
__init__(number_of_timesteps=0, **kwargs)
A queue arc that stores each push or pull individually in the queue. Enables implementation of travel time. A fixed number of timesteps can be specified as a parameter, and additional number of timesteps can be specified when the requests are made.
The queue is a list of requests, where their travel time is decremented by 1 each timestep. Any requests with a travel time of 0 will be sent onwards if the 'update_queue' function is called.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
number_of_timesteps
|
int
|
Fixed number of timesteps that it takes to traverse the arc. Defaults to 0. |
0
|
Source code in wsimod/arcs/arcs.py
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
|
end_timestep()
End timestep in an arc, resetting flow/vqip in/out (which determine) the capacity for that timestep.
Update times of requests in the queue.
Source code in wsimod/arcs/arcs.py
530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 |
|
enter_arc(request, direction, tag)
Function used to cause format a request into the format expected by the enter_queue function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
dict
|
A dict with a VQIP under the 'vqip' key and the travel time under the 'time' key. |
required |
direction
|
str
|
Direction of flow, can be 'push' or 'pull |
required |
tag
|
str
|
optional message to direct the out_port's query_handler which function to call. Defaults to 'default'. |
required |
Returns:
Type | Description |
---|---|
dict
|
The request dict with additional information entered for the queue. |
Source code in wsimod/arcs/arcs.py
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 |
|
enter_queue(request, direction=None, tag='default')
Add a request into the arc's queue list.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
dict
|
A dict with a VQIP under the 'vqip' key and the travel time under the 'time' key. |
required |
direction
|
str
|
Direction of flow, can be 'push' or 'pull |
None
|
tag
|
str
|
optional message to direct the out_port's query_handler which function to call. Defaults to 'default'. |
'default'
|
Source code in wsimod/arcs/arcs.py
432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 |
|
queue_arc_ds()
Calculate change in amount of water and other pollutants in the arc.
Returns:
Type | Description |
---|---|
dict
|
A VQIP amount of change |
Source code in wsimod/arcs/arcs.py
298 299 300 301 302 303 304 305 |
|
queue_arc_sum()
Sum the total water in the requests in the queue of the arc.
Returns:
Type | Description |
---|---|
dict
|
A VQIP amount of water/pollutants in the arc |
Source code in wsimod/arcs/arcs.py
307 308 309 310 311 312 313 314 315 316 |
|
reinit()
Source code in wsimod/arcs/arcs.py
549 550 551 552 |
|
send_pull_request(vqip, tag='default', time=0)
Function used to transmit a pull request from one node (in_port) to another node (out_port). Any pulled water is immediately removed from the out_port and then takes the travel time to be received. This function has not been extensively tested.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vqip
|
_type_
|
A dict VQIP of water to pull (by default, only 'volume' key is used) |
required |
tag
|
str
|
optional message to direct the out_port's query_handler which function to call. Defaults to 'default'. |
'default'
|
time
|
int
|
Travel time for request to spend in the arc (in addition to the arc's 'number_of_timesteps' parameter). Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict
|
A VQIP amount of water that was successfully pulled. |
Source code in wsimod/arcs/arcs.py
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
|
send_push_request(vqip_, tag='default', force=False, time=0)
Function used to transmit a push request from one node (in_port) to another node (out_port).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vqip_
|
dict
|
A dict VQIP of water to push. |
required |
tag
|
str
|
optional message to direct the out_port's query_handler which function to call. Defaults to 'default'. |
'default'
|
force
|
bool
|
Ignore the capacity of the arc (note does not currently, pass the force argument to the out_port). Defaults to False. |
False
|
time
|
int
|
Travel time for request to spend in the arc (in addition to the arc's 'number_of_timesteps' parameter). Defaults to 0. |
0
|
Returns:
Type | Description |
---|---|
dict
|
A VQIP amount of water that was not successfully pushed |
Source code in wsimod/arcs/arcs.py
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 |
|
update_queue(direction=None, backflow_enabled=True)
Iterate over all requests in the queue, removing them if they have no volume.
If a request is a push and has 0 travel time remaining then the push will be triggered at the out_port, if the out_port responds that it cannot receive the push, then this water will be returned as backflow (if enabled).
If a request is a pull and has 0 travel time remaining then it is simply summed with other 0 travel time pull_requests and returned (since the pull is made at the out_port when the send_pull_request is made).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
direction
|
str
|
Direction of flow, can be 'push' or 'pull. Defaults to None. |
None
|
backflow_enabled
|
bool
|
Enable backflow, described above, if not enabled then the request will remain in the queue until all water has been received. Defaults to True. |
True
|
Returns:
Name | Type | Description |
---|---|---|
total_backflow |
dict
|
In the case of a push direction, any backflow will be returned as a VQIP amount |
total_removed |
dict
|
In the case of a pull direction, any pulled water will be returned as a VQIP amount |
Source code in wsimod/arcs/arcs.py
448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 |
|
SewerArc
WeirArc
Bases: SewerArc
Source code in wsimod/arcs/arcs.py
902 903 904 905 |
|