Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Free choice #1

Closed
vldtecno opened this issue Jul 8, 2017 · 2 comments
Closed

Free choice #1

vldtecno opened this issue Jul 8, 2017 · 2 comments
Labels
Milestone

Comments

@vldtecno
Copy link
Owner

vldtecno commented Jul 8, 2017

Implement free choice nets.
Multiple choice scenario: more than one transition is active at the same time because of a common place and after one of them fires the others can no longer fire.
The decision of which to be fired should be random. Each transition should have an equal probability of being fired.
(At the moment it depends on the order on the insertion order of transitions in the vector, so it is not random. )

@vldtecno vldtecno added this to the Version 1.1 milestone Jul 8, 2017
@vldtecno
Copy link
Owner Author

vldtecno commented Sep 2, 2017

Implemented this feature in the dev branch. Merged to the v_1_1_x branch also.

Implementation details:

  • on execution iterate through all transitions
  • check which can be fired
  • create a vector with pointers to the transitions that can be fired.
  • randomize this vector.
  • iterate through the randomized vector and execute in order each transition.

@vldtecno
Copy link
Owner Author

vldtecno commented Sep 2, 2017

A Unit test was also added to the black box tests.
dev: 5d0e155
v_1_1_x: b578afb

@vldtecno vldtecno closed this as completed Sep 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant