AlgebraicJulia / StockFlow.jl

https://algebraicjulia.github.io/StockFlow.jl/
MIT License
63 stars 6 forks source link

Document table names in TheoryStockFlow #92

Open jpfairbanks opened 11 months ago

jpfairbanks commented 11 months ago

@Xiaoyan-Li, could you list out what all the table names and homs stand for in the schema? I tried to come up with good names and got confused on things like LSV.

neonWhiteout commented 11 months ago

This is the schema for StockAndFlowF. It doesn't contain the morphism names, though. Name/Op/Position aren't objects, from what I understand, they're additional datatypes for an ACSet. Symbol, Symbol, Int respectively.

S is stock, F is flow, SV is sum variables, P is parameters, V is variables. The others are all links between them.

LS is link stock, (links stocks and sum variables), LSV is link sum variable (links sum variables and variables), LV is link variable (links stocks and variables), LVV is link variable variables, LPV is link parameter variables. I is inflows and O is outflows.

image

jpfairbanks commented 11 months ago

Thanks!

jpfairbanks commented 11 months ago

Why are inflows and outflows, when in the primitive schema we just had flows between a pair of stocks?

neonWhiteout commented 11 months ago

Inflows and Outflows allow for flows into and out of a model (to or from CLOUD), as opposed to needing a stock on both sides. Each complete flow will have both an inflow or outflow.

jpfairbanks commented 11 months ago

Exactly 1 inflow and 1 outflow? Or can you reuse the same flow with different stocks as the I and O?

neonWhiteout commented 11 months ago

The intention is 0 or 1 inflow and 0 or 1 outflow; I'm unsure if it's currently enforced. @Saityi

jpfairbanks commented 11 months ago

Interesting. The full-fledges stock flow diagram is more complex than I thought. I might stick to StockFlowp for now.

jpfairbanks commented 11 months ago

We might could use a variation on half-edge graph for this. https://blog.algebraicjulia.org/post/2020/09/cset-graphs-2/#half-edge-graphs

By using half-edges, you can encode systems where an edge is allowed to be dangling. It is specific to undirected graphs, but that could be generalized.

neonWhiteout commented 11 months ago

Here is the schema with the morphism names.

I think there was also some talk about applications of flows with no inflows and outflows, but Nicholas/Xiaoyan would know more about that.

image