-
Notifications
You must be signed in to change notification settings - Fork 21
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
Support for continuous or hybrid Petri nets? #179
Comments
Is that where the arrows have fractional multiplicities? You could encode that onto our SITO schema by using one input or output arrow and then having an attribute with type Rational, Real, or Float64 to store the multiplicity. We are currently using multiple arrows to encode the multiplicity, which only gives you Nats for the multiplicities. @present SchPetriNet(FreeSchema) begin
T::Ob
S::Ob
I::Ob
O::Ob
it::Hom(I, T)
is::Hom(I, S)
ot::Hom(O, T)
os::Hom(O, S)
end You could inherit from SchPetriNet like this: @present SchMultNet <: SchPetriNet begin
Mult::AttrType
# multiplicity of input arcs
im::Attr(I, Mult)
# multiplicity of output arcs
om::Attr(O, Mult)
end You can't express the constraint that for a pair (s::S, t::T) you have at most 1 If you want to segregate your state variables into two types of variables, you can use slice categories. https://royalsocietypublishing.org/doi/10.1098/rsta.2021.0309 section 3 explains how to use slice categories to encode constraints on the variables of a petri net. We motivate it with host-vector models. But, you could use that technique to encode continuous vs discrete states. |
What I really meant is the type of the state variable (continuous/real or discrete/integer), though the fractional multiplicity is useful in other contexts. Thanks for the pointer to slice categories - I'd have to think how to get the lowered representation to understand the difference in treatment of these. |
If you just want to store the state type on each variable and there are no constraints for what kinds of processes can connect what types of variables, then you can just add an attribute |
Any plans or thoughts on implementing continuous or hybrid Petri nets? The ACSet data structure for continuous Petri nets would be the same (mostly) to the current implementation. For hybrid, would one want to have separate tables for continuous and discrete states, or just have an attribute added to the variables?
The text was updated successfully, but these errors were encountered: