Past versions of WaterModels have assumed (1) the optimization model being solved is represented in some per-unit system and (2) all solution data are also represented in that per-unit system. Unlike other network modeling packages (e.g., GasModels), a make_si_units! function (or equivalent) had not been implemented, and transforming data between per-unit and SI systems was not straightforward. This pull request makes the following additions or corrections:
A make_si_units! function, allowing the user to transform per-unit network and solution data to SI units;
Updates to the documentation to encourage use of make_si_units! when interpreting results;
The ability to formulate problems as expected even when per_unit=false;
Tests to verify the correct behavior of make_si_units! and make_per_unit! for single- and multinetwork data; and
Correction of per-unit transformations that were not previously being made (e.g., diameter for regulator components and scaling of _FLOW_MIN for pumps without a specified active lower bound);
Modification of prior unit tests to call make_si_units! before testing of expected solution values.
Past versions of WaterModels have assumed (1) the optimization model being solved is represented in some per-unit system and (2) all solution data are also represented in that per-unit system. Unlike other network modeling packages (e.g., GasModels), a
make_si_units!
function (or equivalent) had not been implemented, and transforming data between per-unit and SI systems was not straightforward. This pull request makes the following additions or corrections:make_si_units!
function, allowing the user to transform per-unit network and solution data to SI units;make_si_units!
when interpreting results;per_unit=false
;make_si_units!
andmake_per_unit!
for single- and multinetwork data; anddiameter
for regulator components and scaling of_FLOW_MIN
for pumps without a specified active lower bound);make_si_units!
before testing of expected solution values.