EPANET icon indicating copy to clipboard operation
EPANET copied to clipboard

Allow null-terminated strings as element IDs

Open AbelHeinsbroek opened this issue 9 years ago • 10 comments

The current length of object ids is limited to 32 characters. It would be nice to increase this length to 128 characters to allow the usage of UUIDs as object ids.

AbelHeinsbroek avatar Nov 21 '16 19:11 AbelHeinsbroek

good idea ... redefining MAXID is easy, but maybe a further step would be to allow null-terminated strings of arbitrary length.

samhatchett avatar Nov 21 '16 19:11 samhatchett

I also like this suggestion, using UUIDs as network ids would a useful feature.

eldemet avatar Nov 21 '16 19:11 eldemet

Redefining MAXID is not enough, the id length is encoded in some of the input[n].c files as well, for example in the functions for writing input files.

AbelHeinsbroek avatar Nov 21 '16 19:11 AbelHeinsbroek

is there a face-palm emoji?

samhatchett avatar Nov 21 '16 19:11 samhatchett

could be done but might be important to do it in a way which won't break old code (backward compatibility). Also, 128 characters would defiantly break compatibility with EPANET 2.0 GUI, would be good idea to talk about this with the new GUI people.

eladsal avatar Nov 21 '16 19:11 eladsal

good item for the roadmap, anyway. the future may look like migrating to a new set of apis, and adapt current functions to wrap the extended set for compatibility.

samhatchett avatar Nov 21 '16 19:11 samhatchett

The new GUI we are building does not currently enforce a maximum ID length, it is just treated as an arbitrary Python string.

MarkGrayRESPEC avatar Nov 21 '16 20:11 MarkGrayRESPEC

I've updated the title of this Issue to be more general. Thinking that the inp parser can have its own limits, but no need to impose those on the toolkit user.

samhatchett avatar Nov 22 '16 17:11 samhatchett

Moving to 2.3

eladsal avatar Nov 05 '18 17:11 eladsal