StockFlow.jl icon indicating copy to clipboard operation
StockFlow.jl copied to clipboard

Hom DSL

Open neonWhiteout opened this issue 1 year ago • 5 comments

(@hom WeightModel l_type begin
  :stocks
  NormalWeight => pop
  OverWeight => pop
  Obese => pop

  :parameters
  μ => μ
  ~δ => δ
  rage => rage
  _ => rFstOrder

  :dynamic_variables
  v_NewBorn => v_birth
  ~Becoming => v_fstOrder
  ~Death => v_death
  _ => v_aging

  :flows
  f_NewBorn => f_birth
  ~Becoming => f_fstOrder
  ~Death => f_death
  ~id => f_aging
  _ => f_death



end) == typed_WeightModel

Note, this creates a homomorphism from WeightModel to (l_type with all attributes mapped to nothing).

neonWhiteout avatar Oct 01 '23 00:10 neonWhiteout

It's going to say there's a lot of changes because I merged #93 into it

neonWhiteout avatar Oct 01 '23 00:10 neonWhiteout

Thing is, this is literally just half of a @stratify call. Need to figure out what I can pull out from both and use.

neonWhiteout avatar Oct 01 '23 00:10 neonWhiteout

PLEASE NOTE THIS HAS #93 MERGED INTO IT!!! This will cause a lot of reformatting to occur throughout the project, to shorten lines and get tabs to be 2 spaces rather than 4.

neonWhiteout avatar Dec 06 '23 00:12 neonWhiteout

Codecov Report

Attention: 284 lines in your changes are missing coverage. Please review.

Comparison is base (e82fa18) 50.03% compared to head (b224859) 52.03%. Report is 1 commits behind head on master.

Files Patch % Lines
src/StockFlow.jl 13.75% 138 Missing :warning:
src/SystemStructure.jl 58.97% 64 Missing :warning:
src/CausalLoop.jl 0.00% 40 Missing :warning:
src/Syntax.jl 93.37% 19 Missing :warning:
src/syntax/Stratification.jl 89.25% 13 Missing :warning:
src/syntax/Homomorphism.jl 92.30% 4 Missing :warning:
src/PremadeModels.jl 25.00% 3 Missing :warning:
src/syntax/Composition.jl 95.08% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #101      +/-   ##
==========================================
+ Coverage   50.03%   52.03%   +2.00%     
==========================================
  Files           9       10       +1     
  Lines        1525     1597      +72     
==========================================
+ Hits          763      831      +68     
- Misses        762      766       +4     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Dec 06 '23 00:12 codecov[bot]

@Xiaoyan-Li

neonWhiteout avatar Dec 06 '23 20:12 neonWhiteout