Open kaizu opened 8 years ago
In this case, the following might be enough:
with reaction_rules():
for i in range(5):
X(p=ac("int{}".format(i))) > X(p=ac("int{}".format(i + 1))) | k
where ac
returns a AnyCallable
object with the given name. This will generate X(p=int1) > X(p=int2) | k
.
The following expression is available now.
with reaction_rules():
_eval; _int = lambda i: _eval("int{}".format(i))
for i in range(5):
X(p=_int(i)) > X(p=_int(i + 1)) | k
See https://github.com/ecell/ecell4/commit/e7f903557a0e2da846403168823e981b0b6b4fc5
However, this is not rule-based.
Something like:
Of course, this is completely wrong in the current semantics.
See https://en.wikipedia.org/wiki/Guard_%28computer_science%29