ENsetdemandpattern function

Sets the index of a time pattern used for one of a node's demand categories.