Skip to content

Commit

Permalink
add grids on the figures
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariosmsk committed Jun 24, 2023
1 parent e6a379d commit 6ca8eff
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 15 deletions.
Binary file modified docs/source/_static/joss_advance_example_10_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/joss_advance_example_6_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,7 @@ Advance example
ax.plot(ub, 'k')
ax.plot(lb, 'k')
ax.plot(meanb, 'b')
ax.grid(True)
ax.legend(['Upper bound', 'Lower bound', 'Average'], loc='upper right')
ax.set_title(f'Pressure bounds, Node ID: {node_id}')
ax.set_xlabel('Time (hours)')
Expand Down Expand Up @@ -1064,6 +1065,7 @@ Advance example
ax.plot(ub, 'k')
ax.plot(lb, 'k')
ax.plot(p7, 'r')
ax.grid(True)
ax.legend(['Upper bound', 'Lower bound', 'Sensor'], loc='upper right')
ax.set_title(f'Pressure bounds, Leak Node ID: {leak_node_id}')
ax.set_xlabel('Time (hours)')
Expand Down
Binary file modified paper/figures/paper_leakage_alert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified paper/figures/paper_pressure_bounds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified paper/figures/paper_pressure_bounds_leak.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 16 additions & 14 deletions paper/joss_advance_example.ipynb

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions paper/joss_advance_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def activate_PDA(G):
ax.set_title(f'Pressure bounds, Node ID: {node_id}', fontsize=8)
ax.set_xlabel('Time (hours)', fontsize=8)
ax.set_ylabel(f'Pressure ({pressure_units})', fontsize=8)
ax.grid(True)
plt.show()
fig.savefig('figures/paper_pressure_bounds.png', dpi=300)

Expand Down Expand Up @@ -99,6 +100,7 @@ def activate_PDA(G):
ax.plot(ub, 'k')
ax.plot(lb, 'k')
ax.plot(p7, 'r')
ax.grid(True)
ax.legend(['Upper bound', 'Lower bound', 'Sensor'], loc='upper right', fontsize=8)
ax.set_title(f'Pressure bounds, Leak Node ID: {leak_node_id}', fontsize=8)
ax.set_xlabel('Time (hours)', fontsize=8)
Expand Down
2 changes: 1 addition & 1 deletion paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ G.setNodeBaseDemands(leak_node_index, leak_value)

## Simulate pressure sensor measurement at node '7'
scada_pressures = G.getComputedHydraulicTimeSeries().Pressure
ps7 = scada_pressures[:, node_index-1] # Sensor measurement at node "7"
ps7 = scada_pressures[:, node_index-1] # Sensor measurement at node "7"
```
![Pressure bounds, Leak Node. When a leakage exists in the network, the pressure may drop below the calculated lower bound at node 7, thus indicating an event.\label{fig:fig6}](figures/paper_pressure_bounds_leak.png){ width=75% }

Expand Down

0 comments on commit 6ca8eff

Please sign in to comment.