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

New new examples #81

Closed

Conversation

neonWhiteout
Copy link
Collaborator

Rewrote the new examples using the Stratification, Composition and Rewriting DSLs.

Needs cleaning up, but I got all the examples to work.

I really cheated making the Rewriting DSL, I converted the stock flow back into a stock and flow block.

neonWhiteout and others added 30 commits August 16, 2023 16:11
…dependency. Added Pkg.activate(../../..) to top of all new examples to ensure they use the versions in Project.toml (will likely need to do this for the old examples as well).
…rease to 1.9 when we update Catlab and AlgebraicRewriting versions)
Fixed Algebraic Rewriting version to be < 0.2 as opposed to < 2.0
…r symbol, return index of first stock with matching name.
… in stratification. EG, *death* would match all symbols which have death as a substring.

Currently case sensitive...
…ented out StratifyDSL test file (no tests yet)
…p to (can change this behaviour with a const in Syntax)
… get rid of _. Matches now don't overwrite; that is, if you have a match on a previous line, a future match won't redo it.
@neonWhiteout
Copy link
Collaborator Author

Yeah @Saityi I think I'm gonna need help figuring out how the heck I'm gonna merge stuff at this point

@neonWhiteout
Copy link
Collaborator Author

It should probably go without saying, but this should not be merged yet

…definitions in StockFlow.jl. infer_links can now look at position to deal with tiebreakers (eg, vA = A + A, vB = B + B, vA -> vB, A -> B, we can figure out which LV maps to which by checking the positions of A and B)
…ert_vector to syntax. Use max instead of ternary when converting back to vector.
@neonWhiteout
Copy link
Collaborator Author

This should be the first time in a while that the tests pass.

…aram twice, or a sum variable has the same stock twice), now always map to the first. Additional tests in Syntax. Some refactoring and comment updates.
@neonWhiteout
Copy link
Collaborator Author

Ok, gonna start splitting this into other branches and try getting the stratification DSL merged.

It's a function which takes three stockflows and a quoteblock.

…If I"m going to map it all to the same thing, why should we care about position at all. Consequently, updated tests a bit.
@neonWhiteout
Copy link
Collaborator Author

See #83. Specifically only includes stratification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant