{"action":"closed","issue":{"url":"https://api.github.com/repos/tulip-control/tulip-control/issues/129","labels_url":"https://api.github.com/repos/tulip-control/tulip-control/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/tulip-control/tulip-control/issues/129/comments","events_url":"https://api.github.com/repos/tulip-control/tulip-control/issues/129/events","html_url":"https://github.com/tulip-control/tulip-control/issues/129","id":98446941,"number":129,"title":"Allow partial match of inputs in reaction() of machines.py","user":{"login":"iamkaushik5","id":13080591,"avatar_url":"https://avatars.githubusercontent.com/u/13080591?v=3","gravatar_id":"","url":"https://api.github.com/users/iamkaushik5","html_url":"https://github.com/iamkaushik5","followers_url":"https://api.github.com/users/iamkaushik5/followers","following_url":"https://api.github.com/users/iamkaushik5/following{/other_user}","gists_url":"https://api.github.com/users/iamkaushik5/gists{/gist_id}","starred_url":"https://api.github.com/users/iamkaushik5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamkaushik5/subscriptions","organizations_url":"https://api.github.com/users/iamkaushik5/orgs","repos_url":"https://api.github.com/users/iamkaushik5/repos","events_url":"https://api.github.com/users/iamkaushik5/events{/privacy}","received_events_url":"https://api.github.com/users/iamkaushik5/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tulip-control/tulip-control/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/tulip-control/tulip-control/milestones/3","html_url":"https://github.com/tulip-control/tulip-control/milestones/1.2.0","labels_url":"https://api.github.com/repos/tulip-control/tulip-control/milestones/3/labels","id":814236,"number":3,"title":"1.2.0","description":"The immediate successor to version 1.1a. Important breaks in compatibility are expected, but not enough to warrant changing the major version number. As stated in [the announcement for release 1.1a](https://sourceforge.net/p/tulip-control/mailman/message/33143925/), from version 1.2.0 onwards \"greater care will be taken to ensure backwards compatibility and to clearly indicate parts of the API that are not stable.\"","creator":{"login":"murrayrm","id":293362,"avatar_url":"https://avatars.githubusercontent.com/u/293362?v=3","gravatar_id":"","url":"https://api.github.com/users/murrayrm","html_url":"https://github.com/murrayrm","followers_url":"https://api.github.com/users/murrayrm/followers","following_url":"https://api.github.com/users/murrayrm/following{/other_user}","gists_url":"https://api.github.com/users/murrayrm/gists{/gist_id}","starred_url":"https://api.github.com/users/murrayrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/murrayrm/subscriptions","organizations_url":"https://api.github.com/users/murrayrm/orgs","repos_url":"https://api.github.com/users/murrayrm/repos","events_url":"https://api.github.com/users/murrayrm/events{/privacy}","received_events_url":"https://api.github.com/users/murrayrm/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":16,"state":"open","created_at":"2014-10-05T18:14:16Z","updated_at":"2015-09-08T23:57:59Z","due_on":"2015-09-10T07:00:00Z","closed_at":null},"comments":9,"created_at":"2015-07-31T18:34:33Z","updated_at":"2015-09-08T23:57:59Z","closed_at":"2015-09-08T23:57:59Z","body":"Hi, my name is Kaushik and I am a graduate student working with Necmiye Ozay on Tulip as part of a summer project and I wanted to bring this issue to everyone's attention regarding the reaction function in machines.py\r\n\r\nCurrently, the reaction function allows for stepping through a created mealy machine by providing the next input. However, the current function requires the input specification to match the entirety of the input spec in the mealy machine. However, when running most simulations, only a few inputs are required to identify a single path from the current state. Please see the code below:\r\n\r\n  enabled_trans = [\r\n            (i, j, d)\r\n            for i, j, d in self.edges_iter([from_state], data=True)\r\n            for k in inputs.iteritems() if k in project_dict(d, self.inputs).items()] #added\r\n            # if project_dict(d, self.inputs) == inputs]\r\n\r\nThe commented line at the end is what is currently in the function. Notice how it requires that the input be directly equal to the input spec in the machine. Instead, the for statement above was added as a temporary fix. This for statement basically enables a transition if a single element of the inputs matches a single element of the output. This allowed me to simulate my example that I am working on because I only needed to provide the next state as input. However, this doesn't help for cases where multiple inputs are actually required to identify a single path from the current state. In that case, this fix would actually enable the same transiton twice, which will cause a determinism error because the program thinks there are two possible paths. Does anybody have any suggestions as to a permanent fix?\r\n\r\n\r\nSecond,\r\nThe error messages are not proper. The function seems to default to the 'this is not deterministic' error regardless of whether that is the issue. For example, if I sent inputs into the function that are not valid options from the current state, I get a determinism error, when really the error should say that 'these are not valid inputs'\r\n\r\nThanks.\r\n\r\n\r\n-Kaushik Kannan"}}