Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Franck Pommereau
/
snakes
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Franck Pommereau
2014-06-23 15:13:35 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e7e9e3f2e5626f4c7173aa80b17c17eb4128632a
e7e9e3f2
1 parent
eb3dafec
fixed regression
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
cinzia.py
cinzia.py
View file @
e7e9e3f
...
...
@@ -24,18 +24,19 @@ class CinziaSimulator (BaseSimulator) :
ret
[
"variables"
]
=
dict
((
place
,
tokens
.
items
()[
0
])
for
place
,
tokens
in
marking
.
items
())
ret
[
"groups"
]
=
[
"timed"
,
"even"
,
"odd"
]
ret
[
"modes"
]
=
[]
modes
=
[]
for
i
,
(
trans
,
binding
)
in
enumerate
(
marking
.
modes
)
:
if
(
state
+
i
)
%
5
==
0
:
groups
=
[
"timed"
]
else
:
groups
=
[]
ret
[
"modes"
]
.
append
(
modes
.
append
(
{
"state"
:
state
,
"mode"
:
i
,
"html"
:
"
%
s (
%
s)"
%
(
trans
.
name
[
7
:],
binding
),
"groups"
:
groups
+
[
"odd"
if
(
state
%
2
)
else
"even"
]
})
ret
[
"modes"
]
=
[{
"select"
:
"#modes"
,
"items"
:
modes
}]
return
ret
class
CinziaHTTPSimulator
(
BaseHTTPSimulator
)
:
...
...
Please
register
or
login
to post a comment