diff options
author | bnewbold <bnewbold@robocracy.org> | 2016-12-25 22:04:07 -0800 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2016-12-25 22:13:22 -0800 |
commit | 68aa8cb130ff68395c416b36a1e5661e6fa18e5d (patch) | |
tree | 6f08b9c25e1aabe39d90c5e3a5c4b44953af5338 /notes | |
parent | c902f8215546d73e1584380d7bb841cf965dc86f (diff) | |
download | modelthing-68aa8cb130ff68395c416b36a1e5661e6fa18e5d.tar.gz modelthing-68aa8cb130ff68395c416b36a1e5661e6fa18e5d.zip |
update/de-cruft notes directory
Diffstat (limited to 'notes')
-rw-r--r-- | notes/background.txt | 13 | ||||
-rw-r--r-- | notes/dae_libs.txt | 9 | ||||
-rw-r--r-- | notes/goals.txt | 9 | ||||
-rw-r--r-- | notes/ideas.txt | 4 | ||||
-rw-r--r-- | notes/julia_libs.txt (renamed from notes/implementation_libs.txt) | 10 | ||||
-rw-r--r-- | notes/list_of_examples.txt (renamed from notes/examples.txt) | 19 | ||||
-rw-r--r-- | notes/modelica33r1_grammar.txt (renamed from notes/modelica33r1_spec.txt) | 0 | ||||
-rw-r--r-- | notes/modelica_limitations.txt (renamed from notes/modelica.txt) | 2 | ||||
-rw-r--r-- | notes/parsing.txt | 3 | ||||
-rw-r--r-- | notes/solve_for.txt | 58 | ||||
-rw-r--r-- | notes/spec.txt | 10 | ||||
-rw-r--r-- | notes/tangle_demo.txt | 31 | ||||
-rw-r--r-- | notes/webface.txt | 15 |
13 files changed, 142 insertions, 41 deletions
diff --git a/notes/background.txt b/notes/background.txt index 700926d..72991e3 100644 --- a/notes/background.txt +++ b/notes/background.txt @@ -4,6 +4,12 @@ "CellML Model Repository" http://models.cellml.org/cellml +OpenCell tool for CellML +https://www.cellml.org/tools/opencell + +NeuroML +https://en.wikipedia.org/wiki/NeuroML + "BioModels Database" http://www.ebi.ac.uk/biomodels-main/ @@ -82,3 +88,10 @@ Luna Lang so far, vaporware http://www.luna-lang.org/ +### Other + +"HOW TO SIMULATE THE UNIVERSE IN 134 EASY STEPS" +Nicky Case, 2016 +http://ncase.me/OVC2016/ + +also: http://blog.ncase.me/evolution-not-revolution/ diff --git a/notes/dae_libs.txt b/notes/dae_libs.txt new file mode 100644 index 0000000..762d21b --- /dev/null +++ b/notes/dae_libs.txt @@ -0,0 +1,9 @@ + +##### Solvers/"Codes" + +SUNDIALS + http://computation.llnl.gov/projects/sundials + +DAEPACK + http://yoric.mit.edu/DAEPACK + diff --git a/notes/goals.txt b/notes/goals.txt deleted file mode 100644 index d3e4bc4..0000000 --- a/notes/goals.txt +++ /dev/null @@ -1,9 +0,0 @@ -- simple wiki/database tool with web front end -- some support or UI for compound models -- code generation: - - julia - - javascript - - rust? - - C? - - modelica -- Elm interactive front-end / debugger diff --git a/notes/ideas.txt b/notes/ideas.txt deleted file mode 100644 index 2f5d5ac..0000000 --- a/notes/ideas.txt +++ /dev/null @@ -1,4 +0,0 @@ -- FRP-based integration of models (via signals) -- Elm-based browser simulation environment -- fast simulator/plotter in Rust -- try to integrate or use "Luna" language diff --git a/notes/implementation_libs.txt b/notes/julia_libs.txt index 94a961f..3ab17c8 100644 --- a/notes/implementation_libs.txt +++ b/notes/julia_libs.txt @@ -32,13 +32,3 @@ PEGParser.jl ParserCombinator.jl More Haskell-like. Meh. - -##### GUI Demos - -numeric.js - Has an ODE solver. Use with Elm? - -Tangle.js - Brett's JS widget-y thing. Very simple. - How did he do plots/graphs for those demos? - http://worrydream.com/Tangle/guide.html diff --git a/notes/examples.txt b/notes/list_of_examples.txt index 5f5d4d3..b8b416f 100644 --- a/notes/examples.txt +++ b/notes/list_of_examples.txt @@ -1,16 +1,15 @@ Newer list: -https://en.wikipedia.org/wiki/Radioactive_decay#One-decay_process -https://en.wikipedia.org/wiki/Hodgkin%E2%80%93Huxley_model -logistic function -Black–Scholes -https://en.wikipedia.org/wiki/Sethi_model -von Bertalanffy growth equation +- https://en.wikipedia.org/wiki/Radioactive_decay#One-decay_process +- https://en.wikipedia.org/wiki/Hodgkin%E2%80%93Huxley_model +- logistic function +- Black–Scholes +- https://en.wikipedia.org/wiki/Sethi_model +- von Bertalanffy growth equation ### Models Simple, equation based: -- World3 (from limits to growth report) - classic predator-prey (Lotka–Volterra) - attractors - that vegan paper @@ -57,3 +56,9 @@ https://www.wikidata.org/wiki/Q173227 (physical constant) ### Units https://www.wikidata.org/wiki/Q15088658 (measured value) + +### Existing / Import +- World3 (from limits to growth report) +- Tennessee Eastman Process Control Challenge Problem + http://yoric.mit.edu/DAEPACK/Examples/Eastman +- OpenWorm (in NeuroML) diff --git a/notes/modelica33r1_spec.txt b/notes/modelica33r1_grammar.txt index 2df42dd..2df42dd 100644 --- a/notes/modelica33r1_spec.txt +++ b/notes/modelica33r1_grammar.txt diff --git a/notes/modelica.txt b/notes/modelica_limitations.txt index 69457c1..5c4294d 100644 --- a/notes/modelica.txt +++ b/notes/modelica_limitations.txt @@ -1,2 +1,2 @@ - Double derivative (eg, "der(der(x)) = a") is not allowed. +Partial derivatives are not allowed. diff --git a/notes/parsing.txt b/notes/parsing.txt index 6a13b76..a3c29ef 100644 --- a/notes/parsing.txt +++ b/notes/parsing.txt @@ -3,3 +3,6 @@ Parser Refs: http://notes.willcrichton.net/parsing-strategies-in-rust/ http://smallcultfollowing.com/babysteps/blog/2015/09/14/lalrpop/ https://github.com/nikomatsakis/lalrpop/ + + +libsyntax: rust lib for parsing rust itself diff --git a/notes/solve_for.txt b/notes/solve_for.txt new file mode 100644 index 0000000..b1cf81d --- /dev/null +++ b/notes/solve_for.txt @@ -0,0 +1,58 @@ + + x = a*y + c + y = 4 * c + + solve for [c] in terms of [a, x] + first solve for other unknowns: [y] + + x = a*(4*c) + c + + x = c * (1 + 4*a) + c = (1 + 4*a) / x + +N equations in M unknowns, P constants + + 0 = x + y + 0 = y*2 + 1 - x + +----------------------------------- + +solve_for(self, P: Vec<String>, M: Vec<String>, Q: HashMap<String, Expr>) + + +returns a ModelicaModel with fixed components; equations are LHS identifier, in + correct order, no extends, no connections, name suffixed " (rewritten)", + components as Parameter (w/ val), Input, or Output + + +V variables +Q constants (become kwargs) +P bound vars (independent, inputs/passed, become like constants) +M unknowns (dependent, outputs) +N' total equations +N equations with unknowns + + V = Q + P + M + check: each Q is Integer or Float UnderSpecifiedConstant + filter N' to get N OverConstrained if extra equations + check: N >= M UnderConstrained + +while len(eqns) > 0: + 1. find first eqn with single unknown, and pop it + 2. rebalance to get unknown on LHS + 3. remove unknown from unknown list + +return: sort equations to match order + +solve_for(var) impl for SimpleEquation => Result<SimpleEquation, String> + check: var only on one side VariableNotFound or NaiveImplementation + put var on LHS + recursively apply rules to symmetrically unwrap LHS onto RHS + if try to unwrap Abs: NaiveImplementation + +----------------------------------- +systems of differential equations: + will be N equations of N variables, in terms of implied time + +should be no unknowns; odex thing is just varying initial equations +have JS boxes to show ranges of initial conditions diff --git a/notes/spec.txt b/notes/spec.txt deleted file mode 100644 index 405629b..0000000 --- a/notes/spec.txt +++ /dev/null @@ -1,10 +0,0 @@ - -variable types: - state - parameter - constant - independent (?) - dependent (?) - time (special case?) - -"variables"? or "symbols"? or "quantities"? diff --git a/notes/tangle_demo.txt b/notes/tangle_demo.txt new file mode 100644 index 0000000..463abe1 --- /dev/null +++ b/notes/tangle_demo.txt @@ -0,0 +1,31 @@ + + +/experiments/%model/tangle.html +/experiments/%model/tangle-model.js + +<script type="text/javascript" src="Tangle.js"></script> + +this part in body's onLoad; after live script has downloaded. +var table = new Tangle (document.getElementById("MODELNAME"), { + initialize: function () { + this.CONSTANT = INIT; + this.IN_VAR = INIT; + }, + update: function () { + var vals = model(); + this.OUT_VAR = vals[0]; + this.OUT_VAR = vals[1]; + [...] + }, +}); + +<p id="MODELNAME"> +<!-- TODO: some built-in js that checks if in/out vars are the same, and + alerts if not? --> +<!-- EDIT ME: this part is template --> +When the parameters are <span data-var="VARSLUG"> for VARSLUG</span>, [...], + and the variables are <span data-var="cookies" class="TKAdjustableNumber"> + for VAR</span>, then you get <span data-var=OUTVAR> for OUTVAR</span> +<!-- END EDIT ME --> + + diff --git a/notes/webface.txt b/notes/webface.txt index 2932f8e..78306bd 100644 --- a/notes/webface.txt +++ b/notes/webface.txt @@ -21,3 +21,18 @@ hyperphysics plotly.js: d3.js and stack.gl https://plot.ly/javascript/ https://github.com/plotly/plotly.js + + +##### GUI Demos + +numeric.js + Has an ODE solver. Use with Elm? + +Tangle.js + Brett's JS widget-y thing. Very simple. + How did he do plots/graphs for those demos? + http://worrydream.com/Tangle/guide.html + +KaTeX LaTeX rendering + Faster than mathjax? + https://github.com/Khan/KaTeX |