Closed csweetapple closed 3 years ago
you are right! the interface file messes this up by applying an OUTPUT designation to anything named double *x
and double *y
. This is obviously a wrong thing to do.
%apply double *OUTPUT {
double *value,
double *x,
double *y,
double *baseDemand,
SWIG makes this sort of thing very easy for APIs that have clear naming conventions for in, out, and in/out variables. However, there is no consistent way to do this with EPANET. One suggestion might be to simply rename the variables in the epanet function declarations and re-SWIG everything.
All things considered, it would be my preference to bulk re-name the declared variables in the EPANET header file - and use some well-known convention. Probably deserves an issue/conversation on that other repo!
finally fixed in dev and available at https://pypi.org/project/owa-epanet/2.2.2/
In the EPANET source code, EN_setvertices has five arguments:
In the owa-epanet toolkit,
setvertices
is missing thex
andy
arguments and there is no other function that allows these to be set.