diff-grok 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.MD +80 -31
- package/dist/index.d.ts +6 -0
- package/{index.js → dist/index.js} +2 -1
- package/dist/index.js.map +1 -0
- package/dist/src/examples/basic-use.d.ts +10 -0
- package/dist/src/examples/basic-use.js.map +1 -0
- package/dist/src/examples/check-methods.d.ts +1 -0
- package/{src → dist/src}/examples/check-methods.js +15 -3
- package/dist/src/examples/check-methods.js.map +1 -0
- package/dist/src/examples/corr-probs.d.ts +15 -0
- package/{src → dist/src}/examples/corr-probs.js +2 -2
- package/dist/src/examples/corr-probs.js.map +1 -0
- package/dist/src/examples/cyclic-model.d.ts +6 -0
- package/dist/src/examples/cyclic-model.js.map +1 -0
- package/dist/src/examples/e5.d.ts +15 -0
- package/dist/src/examples/e5.js.map +1 -0
- package/dist/src/examples/hires.d.ts +15 -0
- package/dist/src/examples/hires.js.map +1 -0
- package/dist/src/examples/index.d.ts +22 -0
- package/dist/src/examples/index.js.map +1 -0
- package/dist/src/examples/model-updates.d.ts +6 -0
- package/dist/src/examples/model-updates.js.map +1 -0
- package/dist/src/examples/orego.d.ts +15 -0
- package/dist/src/examples/orego.js.map +1 -0
- package/dist/src/examples/pipeline-use.d.ts +6 -0
- package/dist/src/examples/pipeline-use.js.map +1 -0
- package/dist/src/examples/pollution.d.ts +15 -0
- package/dist/src/examples/pollution.js.map +1 -0
- package/{src/examples/print-benchmark.ts → dist/src/examples/print-benchmark.d.ts} +8 -58
- package/dist/src/examples/print-benchmark.js.map +1 -0
- package/dist/src/examples/robertson.d.ts +15 -0
- package/{src → dist/src}/examples/robertson.js +2 -2
- package/dist/src/examples/robertson.js.map +1 -0
- package/dist/src/examples/scripting.d.ts +1 -0
- package/dist/src/examples/scripting.js.map +1 -0
- package/dist/src/examples/vdpol.d.ts +15 -0
- package/dist/src/examples/vdpol.js.map +1 -0
- package/dist/src/latex-export/examples/advanced-to-latex.d.ts +2 -0
- package/dist/src/latex-export/examples/advanced-to-latex.js +41 -0
- package/dist/src/latex-export/examples/advanced-to-latex.js.map +1 -0
- package/dist/src/latex-export/examples/basic-to-latex.d.ts +2 -0
- package/dist/src/latex-export/examples/basic-to-latex.js +17 -0
- package/dist/src/latex-export/examples/basic-to-latex.js.map +1 -0
- package/dist/src/latex-export/examples/bioreactor-to-latex-selective.d.ts +2 -0
- package/dist/src/latex-export/examples/bioreactor-to-latex-selective.js +145 -0
- package/dist/src/latex-export/examples/bioreactor-to-latex-selective.js.map +1 -0
- package/dist/src/latex-export/examples/chem-react-to-latex-no-cdot.d.ts +2 -0
- package/dist/src/latex-export/examples/chem-react-to-latex-no-cdot.js +41 -0
- package/dist/src/latex-export/examples/chem-react-to-latex-no-cdot.js.map +1 -0
- package/dist/src/latex-export/examples/energy-n-control-to-markdown.d.ts +2 -0
- package/dist/src/latex-export/examples/energy-n-control-to-markdown.js +58 -0
- package/dist/src/latex-export/examples/energy-n-control-to-markdown.js.map +1 -0
- package/dist/src/latex-export/examples/extended-to-markdown.d.ts +2 -0
- package/dist/src/latex-export/examples/extended-to-markdown.js +37 -0
- package/dist/src/latex-export/examples/extended-to-markdown.js.map +1 -0
- package/dist/src/latex-export/examples/fermentation-to-latex.d.ts +2 -0
- package/dist/src/latex-export/examples/fermentation-to-latex.js +32 -0
- package/dist/src/latex-export/examples/fermentation-to-latex.js.map +1 -0
- package/dist/src/latex-export/examples/ga-production-to-markdown.d.ts +2 -0
- package/dist/src/latex-export/examples/ga-production-to-markdown.js +58 -0
- package/dist/src/latex-export/examples/ga-production-to-markdown.js.map +1 -0
- package/dist/src/latex-export/examples/nimotuzumab-to-latex.d.ts +2 -0
- package/dist/src/latex-export/examples/nimotuzumab-to-latex.js +53 -0
- package/dist/src/latex-export/examples/nimotuzumab-to-latex.js.map +1 -0
- package/dist/src/latex-export/examples/pk-pd-to-markdown-minimal.d.ts +2 -0
- package/dist/src/latex-export/examples/pk-pd-to-markdown-minimal.js +50 -0
- package/dist/src/latex-export/examples/pk-pd-to-markdown-minimal.js.map +1 -0
- package/dist/src/latex-export/examples/pk-to-markdown.d.ts +2 -0
- package/dist/src/latex-export/examples/pk-to-markdown.js +35 -0
- package/dist/src/latex-export/examples/pk-to-markdown.js.map +1 -0
- package/dist/src/latex-export/examples/pollution-to-latex.d.ts +2 -0
- package/dist/src/latex-export/examples/pollution-to-latex.js +141 -0
- package/dist/src/latex-export/examples/pollution-to-latex.js.map +1 -0
- package/dist/src/latex-export/examples/robertson-to-latex-no-meta.d.ts +2 -0
- package/dist/src/latex-export/examples/robertson-to-latex-no-meta.js +25 -0
- package/dist/src/latex-export/examples/robertson-to-latex-no-meta.js.map +1 -0
- package/dist/src/latex-export/generator/bracket-manager.d.ts +19 -0
- package/dist/src/latex-export/generator/bracket-manager.js +58 -0
- package/dist/src/latex-export/generator/bracket-manager.js.map +1 -0
- package/dist/src/latex-export/generator/document-builder.d.ts +13 -0
- package/dist/src/latex-export/generator/document-builder.js +433 -0
- package/dist/src/latex-export/generator/document-builder.js.map +1 -0
- package/dist/src/latex-export/generator/latex-generator.d.ts +23 -0
- package/dist/src/latex-export/generator/latex-generator.js +176 -0
- package/dist/src/latex-export/generator/latex-generator.js.map +1 -0
- package/dist/src/latex-export/index.d.ts +8 -0
- package/dist/src/latex-export/index.js +25 -0
- package/dist/src/latex-export/index.js.map +1 -0
- package/dist/src/latex-export/output/md-formatter.d.ts +16 -0
- package/dist/src/latex-export/output/md-formatter.js +27 -0
- package/dist/src/latex-export/output/md-formatter.js.map +1 -0
- package/dist/src/latex-export/output/tex-formatter.d.ts +5 -0
- package/dist/src/latex-export/output/tex-formatter.js +20 -0
- package/dist/src/latex-export/output/tex-formatter.js.map +1 -0
- package/dist/src/latex-export/parser/ast-parser.d.ts +7 -0
- package/dist/src/latex-export/parser/ast-parser.js +153 -0
- package/dist/src/latex-export/parser/ast-parser.js.map +1 -0
- package/dist/src/latex-export/parser/ivp-parser.d.ts +6 -0
- package/dist/src/latex-export/parser/ivp-parser.js +219 -0
- package/dist/src/latex-export/parser/ivp-parser.js.map +1 -0
- package/dist/src/latex-export/parser/line-joiner.d.ts +25 -0
- package/dist/src/latex-export/parser/line-joiner.js +80 -0
- package/dist/src/latex-export/parser/line-joiner.js.map +1 -0
- package/dist/src/latex-export/parser/tokenizer.d.ts +7 -0
- package/dist/src/latex-export/parser/tokenizer.js +143 -0
- package/dist/src/latex-export/parser/tokenizer.js.map +1 -0
- package/dist/src/latex-export/transformer/functions.d.ts +12 -0
- package/dist/src/latex-export/transformer/functions.js +47 -0
- package/dist/src/latex-export/transformer/functions.js.map +1 -0
- package/dist/src/latex-export/transformer/identifier.d.ts +23 -0
- package/dist/src/latex-export/transformer/identifier.js +194 -0
- package/dist/src/latex-export/transformer/identifier.js.map +1 -0
- package/dist/src/latex-export/transformer/operators.d.ts +9 -0
- package/dist/src/latex-export/transformer/operators.js +41 -0
- package/dist/src/latex-export/transformer/operators.js.map +1 -0
- package/dist/src/latex-export/types.d.ts +122 -0
- package/dist/src/latex-export/types.js +10 -0
- package/dist/src/latex-export/types.js.map +1 -0
- package/{src/pipeline/basic-pipeline-creator.ts → dist/src/pipeline/basic-pipeline-creator.d.ts} +11 -28
- package/dist/src/pipeline/basic-pipeline-creator.js.map +1 -0
- package/dist/src/pipeline/constants.d.ts +14 -0
- package/dist/src/pipeline/constants.js.map +1 -0
- package/dist/src/pipeline/index.d.ts +7 -0
- package/dist/src/pipeline/index.js.map +1 -0
- package/dist/src/pipeline/input.d.ts +3 -0
- package/dist/src/pipeline/input.js.map +1 -0
- package/dist/src/pipeline/loops-pipeline-creator.d.ts +124 -0
- package/dist/src/pipeline/loops-pipeline-creator.js.map +1 -0
- package/dist/src/pipeline/output.d.ts +10 -0
- package/{src → dist/src}/pipeline/output.js +1 -1
- package/dist/src/pipeline/output.js.map +1 -0
- package/dist/src/pipeline/pipeline-creator.d.ts +12 -0
- package/{src → dist/src}/pipeline/pipeline-creator.js +2 -0
- package/dist/src/pipeline/pipeline-creator.js.map +1 -0
- package/{src/pipeline/pipeline.ts → dist/src/pipeline/pipeline.d.ts} +10 -97
- package/dist/src/pipeline/pipeline.js.map +1 -0
- package/{src/pipeline/updates-pipeline-creator.ts → dist/src/pipeline/updates-pipeline-creator.d.ts} +15 -131
- package/dist/src/pipeline/updates-pipeline-creator.js.map +1 -0
- package/dist/src/scripting-tools/constants.d.ts +59 -0
- package/dist/src/scripting-tools/constants.js.map +1 -0
- package/dist/src/scripting-tools/index.d.ts +3 -0
- package/dist/src/scripting-tools/index.js.map +1 -0
- package/dist/src/scripting-tools/model-error.d.ts +10 -0
- package/{src → dist/src}/scripting-tools/model-error.js +2 -1
- package/dist/src/scripting-tools/model-error.js.map +1 -0
- package/dist/src/scripting-tools/scripting-tools.d.ts +277 -0
- package/{src → dist/src}/scripting-tools/scripting-tools.js +2 -4
- package/dist/src/scripting-tools/scripting-tools.js.map +1 -0
- package/dist/src/solver-tools/ab4-method.d.ts +46 -0
- package/{src → dist/src}/solver-tools/ab4-method.js +3 -3
- package/dist/src/solver-tools/ab4-method.js.map +1 -0
- package/dist/src/solver-tools/ab5-method.d.ts +46 -0
- package/{src → dist/src}/solver-tools/ab5-method.js +3 -3
- package/dist/src/solver-tools/ab5-method.js.map +1 -0
- package/dist/src/solver-tools/callbacks/callback-base.d.ts +8 -0
- package/dist/src/solver-tools/callbacks/callback-base.js.map +1 -0
- package/dist/src/solver-tools/callbacks/callback-tools.d.ts +6 -0
- package/dist/src/solver-tools/callbacks/callback-tools.js.map +1 -0
- package/dist/src/solver-tools/callbacks/iter-checker-callback.d.ts +12 -0
- package/{src → dist/src}/solver-tools/callbacks/iter-checker-callback.js +2 -0
- package/dist/src/solver-tools/callbacks/iter-checker-callback.js.map +1 -0
- package/dist/src/solver-tools/callbacks/time-checker-callback.d.ts +12 -0
- package/{src → dist/src}/solver-tools/callbacks/time-checker-callback.js +2 -2
- package/dist/src/solver-tools/callbacks/time-checker-callback.js.map +1 -0
- package/dist/src/solver-tools/cvode/common.d.ts +395 -0
- package/dist/src/solver-tools/cvode/common.js +483 -0
- package/dist/src/solver-tools/cvode/common.js.map +1 -0
- package/dist/src/solver-tools/cvode/cvode.d.ts +23 -0
- package/dist/src/solver-tools/cvode/cvode.js +1062 -0
- package/dist/src/solver-tools/cvode/cvode.js.map +1 -0
- package/dist/src/solver-tools/cvode/cvode_adams.d.ts +22 -0
- package/dist/src/solver-tools/cvode/cvode_adams.js +124 -0
- package/dist/src/solver-tools/cvode/cvode_adams.js.map +1 -0
- package/dist/src/solver-tools/cvode/cvode_bdf.d.ts +37 -0
- package/dist/src/solver-tools/cvode/cvode_bdf.js +153 -0
- package/dist/src/solver-tools/cvode/cvode_bdf.js.map +1 -0
- package/dist/src/solver-tools/cvode/cvode_class.d.ts +116 -0
- package/dist/src/solver-tools/cvode/cvode_class.js +163 -0
- package/dist/src/solver-tools/cvode/cvode_class.js.map +1 -0
- package/dist/src/solver-tools/cvode/cvode_hin.d.ts +24 -0
- package/dist/src/solver-tools/cvode/cvode_hin.js +119 -0
- package/dist/src/solver-tools/cvode/cvode_hin.js.map +1 -0
- package/dist/src/solver-tools/cvode/cvode_io.d.ts +98 -0
- package/dist/src/solver-tools/cvode/cvode_io.js +202 -0
- package/dist/src/solver-tools/cvode/cvode_io.js.map +1 -0
- package/dist/src/solver-tools/cvode/cvode_ls.d.ts +23 -0
- package/dist/src/solver-tools/cvode/cvode_ls.js +210 -0
- package/dist/src/solver-tools/cvode/cvode_ls.js.map +1 -0
- package/dist/src/solver-tools/cvode/cvode_nls.d.ts +25 -0
- package/dist/src/solver-tools/cvode/cvode_nls.js +220 -0
- package/dist/src/solver-tools/cvode/cvode_nls.js.map +1 -0
- package/dist/src/solver-tools/cvode/cvode_root.d.ts +64 -0
- package/dist/src/solver-tools/cvode/cvode_root.js +415 -0
- package/dist/src/solver-tools/cvode/cvode_root.js.map +1 -0
- package/dist/src/solver-tools/cvode/dense_linalg.d.ts +50 -0
- package/dist/src/solver-tools/cvode/dense_linalg.js +131 -0
- package/dist/src/solver-tools/cvode/dense_linalg.js.map +1 -0
- package/dist/src/solver-tools/cvode/index.d.ts +24 -0
- package/dist/src/solver-tools/cvode/index.js +26 -0
- package/dist/src/solver-tools/cvode/index.js.map +1 -0
- package/dist/src/solver-tools/cvode-method.d.ts +47 -0
- package/dist/src/solver-tools/cvode-method.js +114 -0
- package/dist/src/solver-tools/cvode-method.js.map +1 -0
- package/dist/src/solver-tools/index.d.ts +16 -0
- package/{src → dist/src}/solver-tools/index.js +1 -0
- package/dist/src/solver-tools/index.js.map +1 -0
- package/dist/src/solver-tools/lin-alg-tools.d.ts +6 -0
- package/dist/src/solver-tools/lin-alg-tools.js.map +1 -0
- package/dist/src/solver-tools/lsoda/blas.d.ts +59 -0
- package/{src → dist/src}/solver-tools/lsoda/blas.js +11 -0
- package/dist/src/solver-tools/lsoda/blas.js.map +1 -0
- package/dist/src/solver-tools/lsoda/cfode.d.ts +18 -0
- package/{src → dist/src}/solver-tools/lsoda/cfode.js +11 -0
- package/dist/src/solver-tools/lsoda/cfode.js.map +1 -0
- package/dist/src/solver-tools/lsoda/common.d.ts +85 -0
- package/dist/src/solver-tools/lsoda/common.js +96 -0
- package/dist/src/solver-tools/lsoda/common.js.map +1 -0
- package/dist/src/solver-tools/lsoda/corfailure.d.ts +18 -0
- package/{src → dist/src}/solver-tools/lsoda/corfailure.js +11 -0
- package/dist/src/solver-tools/lsoda/corfailure.js.map +1 -0
- package/dist/src/solver-tools/lsoda/correction.d.ts +23 -0
- package/{src → dist/src}/solver-tools/lsoda/correction.js +11 -0
- package/dist/src/solver-tools/lsoda/correction.js.map +1 -0
- package/dist/src/solver-tools/lsoda/dense.d.ts +47 -0
- package/{src → dist/src}/solver-tools/lsoda/dense.js +13 -0
- package/dist/src/solver-tools/lsoda/dense.js.map +1 -0
- package/dist/src/solver-tools/lsoda/index.d.ts +16 -0
- package/dist/src/solver-tools/lsoda/index.js +15 -0
- package/dist/src/solver-tools/lsoda/index.js.map +1 -0
- package/dist/src/solver-tools/lsoda/intdy.d.ts +19 -0
- package/{src → dist/src}/solver-tools/lsoda/intdy.js +11 -0
- package/dist/src/solver-tools/lsoda/intdy.js.map +1 -0
- package/dist/src/solver-tools/lsoda/lsoda.d.ts +66 -0
- package/{src → dist/src}/solver-tools/lsoda/lsoda.js +24 -5
- package/dist/src/solver-tools/lsoda/lsoda.js.map +1 -0
- package/dist/src/solver-tools/lsoda/methodswitch.d.ts +21 -0
- package/{src → dist/src}/solver-tools/lsoda/methodswitch.js +11 -0
- package/dist/src/solver-tools/lsoda/methodswitch.js.map +1 -0
- package/dist/src/solver-tools/lsoda/orderswitch.d.ts +21 -0
- package/{src → dist/src}/solver-tools/lsoda/orderswitch.js +11 -0
- package/dist/src/solver-tools/lsoda/orderswitch.js.map +1 -0
- package/dist/src/solver-tools/lsoda/prja.d.ts +18 -0
- package/{src → dist/src}/solver-tools/lsoda/prja.js +11 -0
- package/dist/src/solver-tools/lsoda/prja.js.map +1 -0
- package/dist/src/solver-tools/lsoda/scaleh.d.ts +16 -0
- package/{src → dist/src}/solver-tools/lsoda/scaleh.js +11 -0
- package/dist/src/solver-tools/lsoda/scaleh.js.map +1 -0
- package/dist/src/solver-tools/lsoda/solsy.d.ts +17 -0
- package/dist/src/solver-tools/lsoda/solsy.js +25 -0
- package/dist/src/solver-tools/lsoda/solsy.js.map +1 -0
- package/dist/src/solver-tools/lsoda/stoda.d.ts +19 -0
- package/{src → dist/src}/solver-tools/lsoda/stoda.js +11 -0
- package/dist/src/solver-tools/lsoda/stoda.js.map +1 -0
- package/dist/src/solver-tools/lsoda-method.d.ts +46 -0
- package/{src → dist/src}/solver-tools/lsoda-method.js +23 -9
- package/dist/src/solver-tools/lsoda-method.js.map +1 -0
- package/dist/src/solver-tools/mrt-method.d.ts +47 -0
- package/{src → dist/src}/solver-tools/mrt-method.js +2 -2
- package/dist/src/solver-tools/mrt-method.js.map +1 -0
- package/dist/src/solver-tools/rk3-method.d.ts +46 -0
- package/{src → dist/src}/solver-tools/rk3-method.js +2 -2
- package/dist/src/solver-tools/rk3-method.js.map +1 -0
- package/dist/src/solver-tools/rk4-method.d.ts +46 -0
- package/{src → dist/src}/solver-tools/rk4-method.js +2 -2
- package/dist/src/solver-tools/rk4-method.js.map +1 -0
- package/dist/src/solver-tools/rkdp-method.d.ts +46 -0
- package/{src → dist/src}/solver-tools/rkdp-method.js +2 -2
- package/dist/src/solver-tools/rkdp-method.js.map +1 -0
- package/dist/src/solver-tools/ros34prw-method.d.ts +46 -0
- package/{src → dist/src}/solver-tools/ros34prw-method.js +2 -2
- package/dist/src/solver-tools/ros34prw-method.js.map +1 -0
- package/dist/src/solver-tools/ros3prw-method.d.ts +46 -0
- package/{src → dist/src}/solver-tools/ros3prw-method.js +2 -2
- package/dist/src/solver-tools/ros3prw-method.js.map +1 -0
- package/{src/solver-tools/solver-defs.ts → dist/src/solver-tools/solver-defs.d.ts} +45 -84
- package/{src → dist/src}/solver-tools/solver-defs.js +1 -0
- package/dist/src/solver-tools/solver-defs.js.map +1 -0
- package/dist/src/worker-tools/index.d.ts +2 -0
- package/dist/src/worker-tools/index.js.map +1 -0
- package/{src/worker-tools/scripting.ts → dist/src/worker-tools/scripting.d.ts} +9 -91
- package/dist/src/worker-tools/scripting.js.map +1 -0
- package/dist/src/worker-tools/solving.d.ts +7 -0
- package/{src → dist/src}/worker-tools/solving.js +3 -1
- package/dist/src/worker-tools/solving.js.map +1 -0
- package/package.json +13 -12
- package/.claude/settings.local.json +0 -11
- package/.eslintrc.json +0 -45
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -29
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -22
- package/.github/scripts/bump-js-api-version.sh +0 -106
- package/.github/scripts/check-output.sh +0 -20
- package/.github/scripts/iac-cfn-deploy.sh +0 -90
- package/.github/scripts/slack_api_request.sh +0 -65
- package/.github/scripts/test_package.sh +0 -270
- package/.github/workflows/deploy-docs.yml +0 -15
- package/.github/workflows/libraries.yaml +0 -305
- package/.github/workflows/test.yaml +0 -19
- package/CLAUDE.md +0 -98
- package/CONTRIBUTING.md +0 -74
- package/eslintrc.json +0 -45
- package/images/E5.png +0 -0
- package/images/HIRES.png +0 -0
- package/images/OREGO.png +0 -0
- package/images/POLL-full.png +0 -0
- package/images/POLL.png +0 -0
- package/images/ROBER.png +0 -0
- package/images/VDP0L.png +0 -0
- package/images/VDPOL.png +0 -0
- package/images/acid-prod.gif +0 -0
- package/index.js.map +0 -1
- package/index.ts +0 -17
- package/jest.config.js +0 -13
- package/src/examples/basic-use.js.map +0 -1
- package/src/examples/basic-use.ts +0 -44
- package/src/examples/bioreactor.js +0 -125
- package/src/examples/bioreactor.js.map +0 -1
- package/src/examples/bioreactor.ts +0 -132
- package/src/examples/check-methods.js.map +0 -1
- package/src/examples/check-methods.ts +0 -81
- package/src/examples/corr-probs.js.map +0 -1
- package/src/examples/corr-probs.ts +0 -155
- package/src/examples/cyclic-model.js.map +0 -1
- package/src/examples/cyclic-model.ts +0 -112
- package/src/examples/e5.js.map +0 -1
- package/src/examples/e5.ts +0 -36
- package/src/examples/hires.js.map +0 -1
- package/src/examples/hires.ts +0 -40
- package/src/examples/index.js.map +0 -1
- package/src/examples/index.ts +0 -34
- package/src/examples/model-updates.js.map +0 -1
- package/src/examples/model-updates.ts +0 -122
- package/src/examples/orego.js.map +0 -1
- package/src/examples/orego.ts +0 -25
- package/src/examples/pipeline-use.js.map +0 -1
- package/src/examples/pipeline-use.ts +0 -98
- package/src/examples/pollution.js.map +0 -1
- package/src/examples/pollution.ts +0 -133
- package/src/examples/print-benchmark.js.map +0 -1
- package/src/examples/robertson.js.map +0 -1
- package/src/examples/robertson.ts +0 -19
- package/src/examples/scripting.js.map +0 -1
- package/src/examples/scripting.ts +0 -35
- package/src/examples/vdpol.js.map +0 -1
- package/src/examples/vdpol.ts +0 -17
- package/src/pipeline/basic-pipeline-creator.js.map +0 -1
- package/src/pipeline/constants.js.map +0 -1
- package/src/pipeline/constants.ts +0 -21
- package/src/pipeline/index.js.map +0 -1
- package/src/pipeline/index.ts +0 -7
- package/src/pipeline/input.js.map +0 -1
- package/src/pipeline/input.ts +0 -55
- package/src/pipeline/loops-pipeline-creator.js.map +0 -1
- package/src/pipeline/loops-pipeline-creator.ts +0 -252
- package/src/pipeline/output.js.map +0 -1
- package/src/pipeline/output.ts +0 -201
- package/src/pipeline/pipeline-creator.js.map +0 -1
- package/src/pipeline/pipeline-creator.ts +0 -20
- package/src/pipeline/pipeline.js.map +0 -1
- package/src/pipeline/updates-pipeline-creator.js.map +0 -1
- package/src/scripting-tools/constants.js.map +0 -1
- package/src/scripting-tools/constants.ts +0 -69
- package/src/scripting-tools/index.js.map +0 -1
- package/src/scripting-tools/index.ts +0 -8
- package/src/scripting-tools/model-error.js.map +0 -1
- package/src/scripting-tools/model-error.ts +0 -21
- package/src/scripting-tools/scripting-tools.js.map +0 -1
- package/src/scripting-tools/scripting-tools.ts +0 -1582
- package/src/solver-tools/ab4-method.js.map +0 -1
- package/src/solver-tools/ab4-method.ts +0 -395
- package/src/solver-tools/ab5-method.js.map +0 -1
- package/src/solver-tools/ab5-method.ts +0 -397
- package/src/solver-tools/callbacks/callback-base.js.map +0 -1
- package/src/solver-tools/callbacks/callback-base.ts +0 -12
- package/src/solver-tools/callbacks/callback-tools.js.map +0 -1
- package/src/solver-tools/callbacks/callback-tools.ts +0 -22
- package/src/solver-tools/callbacks/iter-checker-callback.js.map +0 -1
- package/src/solver-tools/callbacks/iter-checker-callback.ts +0 -25
- package/src/solver-tools/callbacks/time-checker-callback.js.map +0 -1
- package/src/solver-tools/callbacks/time-checker-callback.ts +0 -23
- package/src/solver-tools/index.js.map +0 -1
- package/src/solver-tools/index.ts +0 -15
- package/src/solver-tools/lin-alg-tools.js.map +0 -1
- package/src/solver-tools/lin-alg-tools.ts +0 -75
- package/src/solver-tools/lsoda/blas.js.map +0 -1
- package/src/solver-tools/lsoda/blas.ts +0 -267
- package/src/solver-tools/lsoda/cfode.js.map +0 -1
- package/src/solver-tools/lsoda/cfode.ts +0 -83
- package/src/solver-tools/lsoda/common.js +0 -94
- package/src/solver-tools/lsoda/common.js.map +0 -1
- package/src/solver-tools/lsoda/common.ts +0 -135
- package/src/solver-tools/lsoda/corfailure.js.map +0 -1
- package/src/solver-tools/lsoda/corfailure.ts +0 -30
- package/src/solver-tools/lsoda/correction.js.map +0 -1
- package/src/solver-tools/lsoda/correction.ts +0 -119
- package/src/solver-tools/lsoda/dense.js.map +0 -1
- package/src/solver-tools/lsoda/dense.ts +0 -129
- package/src/solver-tools/lsoda/index.js +0 -4
- package/src/solver-tools/lsoda/index.js.map +0 -1
- package/src/solver-tools/lsoda/index.ts +0 -5
- package/src/solver-tools/lsoda/intdy.js.map +0 -1
- package/src/solver-tools/lsoda/intdy.ts +0 -50
- package/src/solver-tools/lsoda/lsoda.js.map +0 -1
- package/src/solver-tools/lsoda/lsoda.ts +0 -632
- package/src/solver-tools/lsoda/methodswitch.js.map +0 -1
- package/src/solver-tools/lsoda/methodswitch.ts +0 -107
- package/src/solver-tools/lsoda/orderswitch.js.map +0 -1
- package/src/solver-tools/lsoda/orderswitch.ts +0 -95
- package/src/solver-tools/lsoda/prja.js.map +0 -1
- package/src/solver-tools/lsoda/prja.ts +0 -49
- package/src/solver-tools/lsoda/scaleh.js.map +0 -1
- package/src/solver-tools/lsoda/scaleh.ts +0 -33
- package/src/solver-tools/lsoda/solsy.js +0 -14
- package/src/solver-tools/lsoda/solsy.js.map +0 -1
- package/src/solver-tools/lsoda/solsy.ts +0 -18
- package/src/solver-tools/lsoda/stoda.js.map +0 -1
- package/src/solver-tools/lsoda/stoda.ts +0 -286
- package/src/solver-tools/lsoda-method.js.map +0 -1
- package/src/solver-tools/lsoda-method.ts +0 -136
- package/src/solver-tools/mrt-method.js.map +0 -1
- package/src/solver-tools/mrt-method.ts +0 -398
- package/src/solver-tools/rk3-method.js.map +0 -1
- package/src/solver-tools/rk3-method.ts +0 -257
- package/src/solver-tools/rk4-method.js.map +0 -1
- package/src/solver-tools/rk4-method.ts +0 -286
- package/src/solver-tools/rkdp-method.js.map +0 -1
- package/src/solver-tools/rkdp-method.ts +0 -300
- package/src/solver-tools/ros34prw-method.js.map +0 -1
- package/src/solver-tools/ros34prw-method.ts +0 -373
- package/src/solver-tools/ros3prw-method.js.map +0 -1
- package/src/solver-tools/ros3prw-method.ts +0 -342
- package/src/solver-tools/solver-defs.js.map +0 -1
- package/src/tests/correctness.test.js +0 -15
- package/src/tests/correctness.test.js.map +0 -1
- package/src/tests/correctness.test.ts +0 -16
- package/src/tests/lsoda-lib-correctness.test.js +0 -223
- package/src/tests/lsoda-lib-correctness.test.js.map +0 -1
- package/src/tests/lsoda-lib-correctness.test.ts +0 -283
- package/src/tests/lsoda-lib-performance.test.js +0 -95
- package/src/tests/lsoda-lib-performance.test.js.map +0 -1
- package/src/tests/lsoda-lib-performance.test.ts +0 -126
- package/src/tests/performance.test.js +0 -16
- package/src/tests/performance.test.js.map +0 -1
- package/src/tests/performance.test.ts +0 -17
- package/src/tests/pipeline.test.js +0 -10
- package/src/tests/pipeline.test.js.map +0 -1
- package/src/tests/pipeline.test.ts +0 -11
- package/src/tests/test-defs.js +0 -207
- package/src/tests/test-defs.js.map +0 -1
- package/src/tests/test-defs.ts +0 -225
- package/src/tests/test-utils.js +0 -28
- package/src/tests/test-utils.js.map +0 -1
- package/src/tests/test-utils.ts +0 -37
- package/src/worker-tools/index.js.map +0 -1
- package/src/worker-tools/index.ts +0 -2
- package/src/worker-tools/scripting.js.map +0 -1
- package/src/worker-tools/solving.js.map +0 -1
- package/src/worker-tools/solving.ts +0 -83
- package/tsconfig.json +0 -71
- package/typedoc.json +0 -8
- /package/{src → dist/src}/examples/basic-use.js +0 -0
- /package/{src → dist/src}/examples/cyclic-model.js +0 -0
- /package/{src → dist/src}/examples/e5.js +0 -0
- /package/{src → dist/src}/examples/hires.js +0 -0
- /package/{src → dist/src}/examples/index.js +0 -0
- /package/{src → dist/src}/examples/model-updates.js +0 -0
- /package/{src → dist/src}/examples/orego.js +0 -0
- /package/{src → dist/src}/examples/pipeline-use.js +0 -0
- /package/{src → dist/src}/examples/pollution.js +0 -0
- /package/{src → dist/src}/examples/print-benchmark.js +0 -0
- /package/{src → dist/src}/examples/scripting.js +0 -0
- /package/{src → dist/src}/examples/vdpol.js +0 -0
- /package/{src → dist/src}/pipeline/basic-pipeline-creator.js +0 -0
- /package/{src → dist/src}/pipeline/constants.js +0 -0
- /package/{src → dist/src}/pipeline/index.js +0 -0
- /package/{src → dist/src}/pipeline/input.js +0 -0
- /package/{src → dist/src}/pipeline/loops-pipeline-creator.js +0 -0
- /package/{src → dist/src}/pipeline/pipeline.js +0 -0
- /package/{src → dist/src}/pipeline/updates-pipeline-creator.js +0 -0
- /package/{src → dist/src}/scripting-tools/constants.js +0 -0
- /package/{src → dist/src}/scripting-tools/index.js +0 -0
- /package/{src → dist/src}/solver-tools/callbacks/callback-base.js +0 -0
- /package/{src → dist/src}/solver-tools/callbacks/callback-tools.js +0 -0
- /package/{src → dist/src}/solver-tools/lin-alg-tools.js +0 -0
- /package/{src → dist/src}/worker-tools/index.js +0 -0
- /package/{src → dist/src}/worker-tools/scripting.js +0 -0
package/src/examples/e5.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/** Kintetic constants for the E5 model */
|
|
2
|
-
enum E5 {
|
|
3
|
-
K1 = 7.89e-10,
|
|
4
|
-
K2 = 1.13e9,
|
|
5
|
-
K3 = 1.1e7,
|
|
6
|
-
K4 = 1.13e3,
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
/** The E5 model (chemical pyrolysis: https://archimede.uniba.it/~testset/report/e5.pdf) */
|
|
10
|
-
export const e5 = {
|
|
11
|
-
name: 'E5',
|
|
12
|
-
arg: {name: 't', start: 0, finish: 1e13, step: 2.5e8},
|
|
13
|
-
initial: [0.00176, 0, 0, 0],
|
|
14
|
-
func: (t: number, y: Float64Array, output: Float64Array) => {
|
|
15
|
-
// extract function values
|
|
16
|
-
const y1 = y[0];
|
|
17
|
-
const y2 = y[1];
|
|
18
|
-
const y3 = y[2];
|
|
19
|
-
const y4 = y[3];
|
|
20
|
-
|
|
21
|
-
// compute output
|
|
22
|
-
output[0] = -E5.K1 * y1 - E5.K3 * y1 * y3;
|
|
23
|
-
output[1] = E5.K1 * y1 - E5.K2 * y2 * y3;
|
|
24
|
-
output[2] = E5.K1 * y1 - E5.K2 * y2 * y3 - E5.K3 * y1 * y3 + E5.K4 * y4;
|
|
25
|
-
output[3] = E5.K3 * y1 * y3 - E5.K4 * y4;
|
|
26
|
-
},
|
|
27
|
-
tolerance: 1e-6,
|
|
28
|
-
solutionColNames: ['y1', 'y2', 'y3', 'y4'],
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const e5ReferencePoint = new Float64Array([
|
|
32
|
-
0.1152903278711829E-290,
|
|
33
|
-
0.8867655517642120E-22,
|
|
34
|
-
0.8854814626268838E-22,
|
|
35
|
-
0,
|
|
36
|
-
]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hires.js","sourceRoot":"","sources":["hires.ts"],"names":[],"mappings":"AAAA,mHAAmH;AACnH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,IAAI,EAAE,OAAO;IACb,GAAG,EAAE,EAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAC;IACxD,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACtC,IAAI,EAAE,CAAC,CAAS,EAAE,CAAe,EAAE,MAAoB,EAAE,EAAE;QACzD,0BAA0B;QAC1B,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,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,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,EAAE,CAAC;IACzC,CAAC;IACD,SAAS,EAAE,KAAK;IAChB,gBAAgB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;CACnE,CAAC,CAAC,QAAQ;AAEX,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,YAAY,CAAC;IAClD,qBAAqB;IACrB,qBAAqB;IACrB,qBAAqB;IACrB,qBAAqB;IACrB,qBAAqB;IACrB,qBAAqB;IACrB,qBAAqB;IACrB,qBAAqB;CACtB,CAAC,CAAC"}
|
package/src/examples/hires.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/** High Irradiance Responses of photomorphogenesis (see https://archimede.uniba.it/~testset/problems/hires.php) */
|
|
2
|
-
export const hires = {
|
|
3
|
-
name: 'HIRES',
|
|
4
|
-
arg: {name: 't', start: 0, finish: 321.8122, step: 0.01},
|
|
5
|
-
initial: [1, 0, 0, 0, 0, 0, 0, 0.0057],
|
|
6
|
-
func: (t: number, y: Float64Array, output: Float64Array) => {
|
|
7
|
-
// extract function values
|
|
8
|
-
const y1 = y[0];
|
|
9
|
-
const y2 = y[1];
|
|
10
|
-
const y3 = y[2];
|
|
11
|
-
const y4 = y[3];
|
|
12
|
-
const y5 = y[4];
|
|
13
|
-
const y6 = y[5];
|
|
14
|
-
const y7 = y[6];
|
|
15
|
-
const y8 = y[7];
|
|
16
|
-
|
|
17
|
-
// compute output
|
|
18
|
-
output[0] = -1.71 * y1 + 0.43 * y2 + 8.32 * y3 + 0.0007;
|
|
19
|
-
output[1] = 1.71 * y1 - 8.75 * y2;
|
|
20
|
-
output[2] = -10.03 * y3 + 0.43 * y4 + 0.035 * y5;
|
|
21
|
-
output[3] = 8.32 * y2 + 1.71 * y3 - 1.12 * y4;
|
|
22
|
-
output[4] = -1.745 * y5 + 0.43 * y6 + 0.43 * y7;
|
|
23
|
-
output[5] = -280 * y6 * y8 + 0.69 * y4 + 1.71 * y5 - 0.43 * y6 + 0.69 * y7;
|
|
24
|
-
output[6] = 280 * y6 * y8 - 1.81 * y7;
|
|
25
|
-
output[7] = -280 * y6 * y8 + 1.81 * y7;
|
|
26
|
-
},
|
|
27
|
-
tolerance: 1e-10,
|
|
28
|
-
solutionColNames: ['y1', 'y2', 'y3', 'y4', 'y5', 'y6', 'y7', 'y8'],
|
|
29
|
-
}; // hires
|
|
30
|
-
|
|
31
|
-
export const hiresReferencePoint = new Float64Array([
|
|
32
|
-
0.7371312573325668E-3,
|
|
33
|
-
0.1442485726316185E-3,
|
|
34
|
-
0.5888729740967575E-4,
|
|
35
|
-
0.1175651343283149E-2,
|
|
36
|
-
0.2386356198831331E-2,
|
|
37
|
-
0.6238968252742796E-2,
|
|
38
|
-
0.2849998395185769E-2,
|
|
39
|
-
0.2850001604814231E-2,
|
|
40
|
-
]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAC,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAC,KAAK,EAAE,mBAAmB,EAAC,MAAM,SAAS,CAAC;AACnD,OAAO,EAAC,KAAK,EAAE,mBAAmB,EAAC,MAAM,SAAS,CAAC;AACnD,OAAO,EAAC,KAAK,EAAE,mBAAmB,EAAC,MAAM,SAAS,CAAC;AACnD,OAAO,EAAC,EAAE,EAAE,gBAAgB,EAAC,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAC,MAAM,aAAa,CAAC;AAE/D;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,SAAS;IACT,KAAK;IACL,KAAK;IACL,KAAK;IACL,EAAE;IACF,SAAS;CACV,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,uBAAuB;IACvB,mBAAmB;IACnB,mBAAmB;IACnB,mBAAmB;IACnB,gBAAgB;IAChB,uBAAuB;CACxB,CAAC;AAEF,OAAO,EAAC,SAAS,EAAc,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAC,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAC,MAAM,mBAAmB,CAAC"}
|
package/src/examples/index.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {robertson, robertsonReferencePoint} from './robertson';
|
|
2
|
-
import {hires, hiresReferencePoint} from './hires';
|
|
3
|
-
import {vdpol, vdpolReferencePoint} from './vdpol';
|
|
4
|
-
import {orego, oregoReferencePoint} from './orego';
|
|
5
|
-
import {e5, e5ReferencePoint} from './e5';
|
|
6
|
-
import {pollution, pollutionReferencePoint} from './pollution';
|
|
7
|
-
|
|
8
|
-
/** Problems for performance check
|
|
9
|
-
* @internal
|
|
10
|
-
*/
|
|
11
|
-
export const perfProbs = [
|
|
12
|
-
robertson,
|
|
13
|
-
hires,
|
|
14
|
-
vdpol,
|
|
15
|
-
orego,
|
|
16
|
-
e5,
|
|
17
|
-
pollution,
|
|
18
|
-
];
|
|
19
|
-
|
|
20
|
-
/** Reference points for the performance problems
|
|
21
|
-
* @internal
|
|
22
|
-
*/
|
|
23
|
-
export const refPoints = [
|
|
24
|
-
robertsonReferencePoint,
|
|
25
|
-
hiresReferencePoint,
|
|
26
|
-
vdpolReferencePoint,
|
|
27
|
-
oregoReferencePoint,
|
|
28
|
-
e5ReferencePoint,
|
|
29
|
-
pollutionReferencePoint,
|
|
30
|
-
];
|
|
31
|
-
|
|
32
|
-
export {corrProbs, CorrProblem} from './corr-probs';
|
|
33
|
-
|
|
34
|
-
export {printRobertson, printHires, printOrego, printE5, printVdpol, printPollution} from './print-benchmark';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
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,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAElD,8CAA8C;IAC9C,MAAM,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IAEjE,qBAAqB;IAErB,sBAAsB;IACtB,IAAI,IAAI,GAAG,OAAO,CAAC;IACnB,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,IAAI,GAAG,WAAW,CAAC,CAAC;IAC1D,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAElB,6BAA6B;IAC7B,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAClC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;QAChC,IAAI,GAAG,EAAE,CAAC;QAEV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,EAAE,CAAC;YAC9B,IAAI,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;QAE9C,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;AACH,CAAC;AAAC,OAAO,GAAG,EAAE,CAAC;IACb,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
/* eslint-disable max-len */
|
|
2
|
-
/** This example shows how to apply pipelines and models with updates.
|
|
3
|
-
This approach can be used for in-webworkers analysis of models.
|
|
4
|
-
|
|
5
|
-
Here, we consider gluconic acid (GA) production by Aspergillus niger modeling.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import * as DGL from '../../index';
|
|
9
|
-
|
|
10
|
-
/** 1. Model specification */
|
|
11
|
-
const model = `#name: GA-production
|
|
12
|
-
#tags: model
|
|
13
|
-
#description: Gluconic acid (GA) production by Aspergillus niger modeling
|
|
14
|
-
#equations:
|
|
15
|
-
dX/dt = rX
|
|
16
|
-
dS/dt = -gamma * rX - lambda * X
|
|
17
|
-
dO/dt = Kla * (Cod - O) - delta * rX - phi * X
|
|
18
|
-
dP/dt = alpha * rX + beta * X
|
|
19
|
-
|
|
20
|
-
#expressions:
|
|
21
|
-
mu = muM * S / (Ks + S) * O / (Ko + O)
|
|
22
|
-
rX = mu * X
|
|
23
|
-
|
|
24
|
-
#argument: t, 1-st stage
|
|
25
|
-
_t0 = 0 {units: h; caption: initial; category: Misc} [Start of the process]
|
|
26
|
-
_t1 = 60 {units: h; caption: 1-st stage; category: Durations; min: 20; max: 80} [Duration of the 1-st stage]
|
|
27
|
-
step = 0.1 {units: h; caption: step; category: Misc; min: 0.01; max: 1} [Time step of simulation]
|
|
28
|
-
|
|
29
|
-
#update: 2-nd stage
|
|
30
|
-
duration = overall - _t1
|
|
31
|
-
S += 70
|
|
32
|
-
|
|
33
|
-
#inits:
|
|
34
|
-
X = 5 {units: kg/m³; caption: biomass; category: Initial concentrations; min: 1; max: 10} [Aspergillus niger biomass]
|
|
35
|
-
S = 150 {units: kg/m³; caption: glucose; category: Initial concentrations; min: 50; max: 200} [Glucose]
|
|
36
|
-
O = 7 {units: kg/m³; caption: oxygen; category: Initial concentrations; min: 1; max: 10} [Dissolved oxygen]
|
|
37
|
-
P = 0 {units: kg/m³; caption: acid; category: Initial concentrations; min: 0; max: 0.1} [Gluconic acid]
|
|
38
|
-
|
|
39
|
-
#output:
|
|
40
|
-
t {caption: time}
|
|
41
|
-
X {caption: biomass}
|
|
42
|
-
S {caption: glucose}
|
|
43
|
-
O {caption: oxygen}
|
|
44
|
-
P {caption: acid}
|
|
45
|
-
|
|
46
|
-
#parameters:
|
|
47
|
-
overall = 100 {units: h; category: Durations; min: 100; max: 140} [Overall duration]
|
|
48
|
-
muM = 0.668 {units: 1/h; category: Parameters} [Monod type model parameter]
|
|
49
|
-
alpha = 2.92 {category: Parameters} [Monod type model parameter]
|
|
50
|
-
beta = 0.131 {units: 1/h; category: Parameters} [Monod type model parameter]
|
|
51
|
-
gamma = 2.12 {category: Parameters} [Monod type model parameter]
|
|
52
|
-
lambda = 0.232 {units: 1/h; category: Parameters} [Monod type model parameter]
|
|
53
|
-
delta = 0.278 {category: Parameters} [Monod type model parameter]
|
|
54
|
-
phi = 4.87e-3 {units: 1/h; category: Parameters} [Monod type model parameter]
|
|
55
|
-
Ks = 1.309e2 {units: g/L; category: Parameters} [Monod type model parameter]
|
|
56
|
-
Ko = 3.63e-4 {units: g/L; category: Parameters} [Monod type model parameter]
|
|
57
|
-
Kla = 1.7e-2 {units: 1/s; category: Parameters} [Volumetric mass transfer coefficient]
|
|
58
|
-
Cod = 15 {units: kg/m³; category: Parameters} [Liquid phase dissolved oxygen saturation concentration]
|
|
59
|
-
|
|
60
|
-
#tolerance: 1e-9`;
|
|
61
|
-
|
|
62
|
-
/** 2. Generate IVP-objects: for the main thread & for computations in webworkers */
|
|
63
|
-
const ivp = DGL.getIVP(model);
|
|
64
|
-
const ivpWW = DGL.getIvp2WebWorker(ivp);
|
|
65
|
-
|
|
66
|
-
/** 3. Perform computations */
|
|
67
|
-
try {
|
|
68
|
-
// 3.1) Extract names of outputs
|
|
69
|
-
const outputNames = DGL.getOutputNames(ivp);
|
|
70
|
-
const outSize = outputNames.length;
|
|
71
|
-
|
|
72
|
-
// 3.2) Set model inputs
|
|
73
|
-
const inputs = {
|
|
74
|
-
_t0: 0,
|
|
75
|
-
_t1: 60,
|
|
76
|
-
_h: 1,
|
|
77
|
-
X: 5,
|
|
78
|
-
S: 150,
|
|
79
|
-
O: 7,
|
|
80
|
-
P: 0,
|
|
81
|
-
overall: 100,
|
|
82
|
-
muM: 0.668,
|
|
83
|
-
alpha: 2.92,
|
|
84
|
-
beta: 0.131,
|
|
85
|
-
gamma: 2.12,
|
|
86
|
-
lambda: 0.232,
|
|
87
|
-
delta: 0.278,
|
|
88
|
-
phi: 4.87e-3,
|
|
89
|
-
Ks: 1.309e2,
|
|
90
|
-
Ko: 3.63e-4,
|
|
91
|
-
Kla: 1.7e-2,
|
|
92
|
-
Cod: 15,
|
|
93
|
-
};
|
|
94
|
-
const inputVector = DGL.getInputVector(inputs, ivp);
|
|
95
|
-
|
|
96
|
-
// 3.3) Create a pipeline
|
|
97
|
-
const creator = DGL.getPipelineCreator(ivp);
|
|
98
|
-
const pipeline = creator.getPipeline(inputVector);
|
|
99
|
-
|
|
100
|
-
// 3.4) Apply pipeline to perform computations
|
|
101
|
-
const solution = DGL.applyPipeline(pipeline, ivpWW, inputVector);
|
|
102
|
-
|
|
103
|
-
// 3.5) Print results
|
|
104
|
-
|
|
105
|
-
// 3.5.1) Table header
|
|
106
|
-
let line = ' ';
|
|
107
|
-
outputNames.forEach((name) => line += name + ' ');
|
|
108
|
-
console.log(line);
|
|
109
|
-
|
|
110
|
-
// 3.5.2) Table with solution
|
|
111
|
-
const length = solution[0].length;
|
|
112
|
-
for (let i = 0; i < length; ++i) {
|
|
113
|
-
line = '';
|
|
114
|
-
|
|
115
|
-
for (let j = 0; j < outSize; ++j)
|
|
116
|
-
line += solution[j][i].toFixed(8) + ' ';
|
|
117
|
-
|
|
118
|
-
console.log(line);
|
|
119
|
-
}
|
|
120
|
-
} catch (err) {
|
|
121
|
-
console.log('Simulation failed: ', err instanceof Error ? err.message : 'Unknown problem!');
|
|
122
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orego.js","sourceRoot":"","sources":["orego.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,IAAI,EAAE,OAAO;IACb,GAAG,EAAE,EAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAC;IACnD,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAClB,IAAI,EAAE,CAAC,CAAS,EAAE,CAAe,EAAE,MAAoB,EAAE,EAAE;QACzD,0BAA0B;QAC1B,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAChB,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAChB,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAEhB,iBAAiB;QACjB,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,WAAW,GAAG,EAAE,GAAG,EAAE,CAAE,CAAC;QACjE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;QAC7C,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;IAChC,CAAC;IACD,SAAS,EAAE,IAAI;IACf,gBAAgB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;CACrC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,YAAY,CAAC;IAClD,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;CAClB,CAAC,CAAC"}
|
package/src/examples/orego.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/** The OREGO model (see https://archimede.uniba.it/~testset/report/orego.pdf) */
|
|
2
|
-
export const orego = {
|
|
3
|
-
name: 'OREGO',
|
|
4
|
-
arg: {name: 't', start: 0, finish: 360, step: 0.01},
|
|
5
|
-
initial: [1, 2, 3],
|
|
6
|
-
func: (t: number, y: Float64Array, output: Float64Array) => {
|
|
7
|
-
// extract function values
|
|
8
|
-
const y1 = y[0];
|
|
9
|
-
const y2 = y[1];
|
|
10
|
-
const y3 = y[2];
|
|
11
|
-
|
|
12
|
-
// compute output
|
|
13
|
-
output[0] = 77.27 * (y2 - y1 * y2 + y1 - 0.000008375 * y1 * y1 );
|
|
14
|
-
output[1] = 1 / 77.27 * (-y2 - y1 * y2 + y3);
|
|
15
|
-
output[2] = 0.161 * (y1 - y3);
|
|
16
|
-
},
|
|
17
|
-
tolerance: 1e-8,
|
|
18
|
-
solutionColNames: ['y1', 'y2', 'y3'],
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const oregoReferencePoint = new Float64Array([
|
|
22
|
-
1.000814870318523,
|
|
23
|
-
1228.178521549917,
|
|
24
|
-
132.0554942846706,
|
|
25
|
-
]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline-use.js","sourceRoot":"","sources":["pipeline-use.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B;;;;EAIE;AAEF,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AAEnC,iDAAiD;AACjD,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uGAkCyF,CAAC;AAExG,oFAAoF;AACpF,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC9B,MAAM,KAAK,GAAG,GAAG,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;AAExC,8BAA8B;AAC9B,IAAI,CAAC;IACH,gCAAgC;IAChC,MAAM,WAAW,GAAG,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC;IAEnC,wBAAwB;IACxB,MAAM,MAAM,GAAG;QACb,GAAG,EAAE,CAAC,EAAE,6BAA6B;QACrC,GAAG,EAAE,EAAE,EAAE,2BAA2B;QACpC,EAAE,EAAE,CAAC,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G,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;AACH,CAAC;AAAC,OAAO,GAAG,EAAE,CAAC;IACb,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/* eslint-disable max-len */
|
|
2
|
-
/** This example shows how to apply pipelines and models with customized outputs.
|
|
3
|
-
This approach can be used for in-webworkers analysis of models.
|
|
4
|
-
|
|
5
|
-
Here, we consider modeling queues: https://en.wikipedia.org/wiki/M/M/c_queue
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import * as DGL from '../../index';
|
|
9
|
-
|
|
10
|
-
/** 1. Model specification: the M|M|2|2 model */
|
|
11
|
-
const model = `#name: M|M|2|2
|
|
12
|
-
#description: Modelling the system with two servers & two waiting places (EXPLAINED)
|
|
13
|
-
#equations:
|
|
14
|
-
dp0/dt = -la * p0 + mu * p1
|
|
15
|
-
dp1/dt = la * p0 - (la + mu) * p1 + 2 * mu * p2
|
|
16
|
-
dp2/dt = la * p1 - (la + 2 * mu) * p2 + 2 * mu * p3
|
|
17
|
-
dp3/dt = la * p2 - (la + 2 * mu) * p3 + 2 * mu * p4
|
|
18
|
-
|
|
19
|
-
#expressions:
|
|
20
|
-
la = 1 / arrival
|
|
21
|
-
mu = 1 / service
|
|
22
|
-
p4 = 1 - p0 - p1 - p2 - p3
|
|
23
|
-
busy = 1 - p0 - p1
|
|
24
|
-
queue = p3 + 2 * p4
|
|
25
|
-
|
|
26
|
-
#argument: t
|
|
27
|
-
_t0 = 0 {min: 0; max: 10; caption: start; category: Time; units: min} [Initial time of simulation]
|
|
28
|
-
_t1 = 60 {min: 20; max: 100; caption: finish; category: Time; units: min} [Final time of simulation]
|
|
29
|
-
_h = 1 {min: 0.01; max: 0.1; caption: step; category: Time; units: min} [Time step of simulation]
|
|
30
|
-
|
|
31
|
-
#inits:
|
|
32
|
-
p0 = 1 {min: 0; max: 1; category: Initial state; caption: empty} [Probability that initially there are NO customers]
|
|
33
|
-
p1 = 0 {min: 0; max: 1; category: Initial state; caption: single} [Probability that initially there is ONE customer]
|
|
34
|
-
p2 = 0 {min: 0; max: 1; category: Initial state; caption: two} [Probability that initially there are TWO customers]
|
|
35
|
-
p3 = 0 {min: 0; max: 1; category: Initial state; caption: three} [Probability that initially there are THREE customers]
|
|
36
|
-
|
|
37
|
-
#output:
|
|
38
|
-
t {caption: Time, min}
|
|
39
|
-
p0 {caption: P(Empty)}
|
|
40
|
-
busy {caption: P(Full load)}
|
|
41
|
-
queue {caption: E(Queue)}
|
|
42
|
-
|
|
43
|
-
#parameters:
|
|
44
|
-
arrival = 10 {min: 1; max: 100; category: Means; caption: arrival; units: min} [Mean arrival time]
|
|
45
|
-
service = 100 {min: 1; max: 100; category: Means; caption: service; units: min} [Mean service time]`;
|
|
46
|
-
|
|
47
|
-
/** 2. Generate IVP-objects: for the main thread & for computations in webworkers */
|
|
48
|
-
const ivp = DGL.getIVP(model);
|
|
49
|
-
const ivpWW = DGL.getIvp2WebWorker(ivp);
|
|
50
|
-
|
|
51
|
-
/** 3. Perform computations */
|
|
52
|
-
try {
|
|
53
|
-
// 3.1) Extract names of outputs
|
|
54
|
-
const outputNames = DGL.getOutputNames(ivp);
|
|
55
|
-
const outSize = outputNames.length;
|
|
56
|
-
|
|
57
|
-
// 3.2) Set model inputs
|
|
58
|
-
const inputs = {
|
|
59
|
-
_t0: 0, // Initial time of simulation
|
|
60
|
-
_t1: 60, // Final time of simulation
|
|
61
|
-
_h: 1, // Time step of simulation
|
|
62
|
-
p0: 1, // Probability that initially there are NO customers
|
|
63
|
-
p1: 0, // Probability that initially there is ONE customer
|
|
64
|
-
p2: 0, // Probability that initially there are TWO customers
|
|
65
|
-
p3: 0, // Probability that initially there are THREE customers
|
|
66
|
-
arrival: 10, // Mean arrival time
|
|
67
|
-
service: 100, // Mean service time
|
|
68
|
-
};
|
|
69
|
-
const inputVector = DGL.getInputVector(inputs, ivp);
|
|
70
|
-
|
|
71
|
-
// 3.3) Create a pipeline
|
|
72
|
-
const creator = DGL.getPipelineCreator(ivp);
|
|
73
|
-
const pipeline = creator.getPipeline(inputVector);
|
|
74
|
-
|
|
75
|
-
// 3.4) Apply pipeline to perform computations
|
|
76
|
-
const solution = DGL.applyPipeline(pipeline, ivpWW, inputVector);
|
|
77
|
-
|
|
78
|
-
// 3.5) Print results
|
|
79
|
-
|
|
80
|
-
// 3.5.1) Table header
|
|
81
|
-
let line = '';
|
|
82
|
-
outputNames.forEach((name) => line += name + ' ');
|
|
83
|
-
console.log(line);
|
|
84
|
-
|
|
85
|
-
// 3.5.2) Table with solution
|
|
86
|
-
const length = solution[0].length;
|
|
87
|
-
for (let i = 0; i < length; ++i) {
|
|
88
|
-
line = '';
|
|
89
|
-
|
|
90
|
-
for (let j = 0; j < outSize; ++j)
|
|
91
|
-
line += solution[j][i].toFixed(8) + ' ';
|
|
92
|
-
|
|
93
|
-
console.log(line);
|
|
94
|
-
}
|
|
95
|
-
} catch (err) {
|
|
96
|
-
console.log('Simulation failed: ', err instanceof Error ? err.message : 'Unknown problem!');
|
|
97
|
-
}
|
|
98
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pollution.js","sourceRoot":"","sources":["pollution.ts"],"names":[],"mappings":"AAAE,iDAAiD;AACjD,IAAK,GA0BJ;AA1BD,WAAK,GAAG;IACN,4BAAS,CAAA;IACT,4BAAS,CAAA;IACT,6BAAW,CAAA;IACX,+BAAW,CAAA;IACX,+BAAW,CAAA;IACX,6BAAU,CAAA;IACV,+BAAW,CAAA;IACX,6BAAU,CAAA;IACV,6BAAW,CAAA;IACX,8BAAS,CAAA;IACT,+BAAW,CAAA;IACX,+BAAW,CAAA;IACX,8BAAU,CAAA;IACV,+BAAY,CAAA;IACZ,iCAAW,CAAA;IACX,iCAAY,C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3 = 1.23e4,
|
|
6
|
-
K4 = 8.6e-4,
|
|
7
|
-
K5 = 8.2e-4,
|
|
8
|
-
K6 = 1.5e4,
|
|
9
|
-
K7 = 1.3e-4,
|
|
10
|
-
K8 = 2.4e4,
|
|
11
|
-
K9 = 1.65e4,
|
|
12
|
-
K10 = 9e3,
|
|
13
|
-
K11 = 0.022,
|
|
14
|
-
K12 = 1.2e4,
|
|
15
|
-
K13 = 1.88,
|
|
16
|
-
K14 = 1.63e4,
|
|
17
|
-
K15 = 4.8e6,
|
|
18
|
-
K16 = 3.5e-4,
|
|
19
|
-
K17 = 0.0175,
|
|
20
|
-
K18 = 1e8,
|
|
21
|
-
K19 = 4.44e11,
|
|
22
|
-
K20 = 1240,
|
|
23
|
-
K21 = 2.1,
|
|
24
|
-
K22 = 5.78,
|
|
25
|
-
K23 = 0.0474,
|
|
26
|
-
K24 = 1780,
|
|
27
|
-
K25 = 3.12,
|
|
28
|
-
}; // POL
|
|
29
|
-
|
|
30
|
-
/** The chemical reaction part of the air pollution model (https://archimede.uniba.it/~testset/report/pollu.pdf) */
|
|
31
|
-
export const pollution = {
|
|
32
|
-
name: 'Pollution',
|
|
33
|
-
arg: {name: 't', start: 0, finish: 60, step: 0.002},
|
|
34
|
-
initial: [0, 0.2, 0, 0.04, 0, 0, 0.1, 0.3, 0.01, 0, 0, 0, 0, 0, 0, 0, 0.007, 0, 0, 0],
|
|
35
|
-
func: (t: number, y: Float64Array, output: Float64Array) => {
|
|
36
|
-
// extract function values
|
|
37
|
-
const y1 = y[0];
|
|
38
|
-
const y2 = y[1];
|
|
39
|
-
const y3 = y[2];
|
|
40
|
-
const y4 = y[3];
|
|
41
|
-
const y5 = y[4];
|
|
42
|
-
const y6 = y[5];
|
|
43
|
-
const y7 = y[6];
|
|
44
|
-
const y8 = y[7];
|
|
45
|
-
const y9 = y[8];
|
|
46
|
-
const y10 = y[9];
|
|
47
|
-
const y11 = y[10];
|
|
48
|
-
const y12 = y[11];
|
|
49
|
-
const y13 = y[12];
|
|
50
|
-
const y14 = y[13];
|
|
51
|
-
const y15 = y[14];
|
|
52
|
-
const y16 = y[15];
|
|
53
|
-
const y17 = y[16];
|
|
54
|
-
const y18 = y[17];
|
|
55
|
-
const y19 = y[18];
|
|
56
|
-
const y20 = y[19];
|
|
57
|
-
|
|
58
|
-
// evaluate expressions
|
|
59
|
-
const r1 = POL.K1 * y1;
|
|
60
|
-
const r2 = POL.K2 * y2 * y4;
|
|
61
|
-
const r3 = POL.K3 * y5 * y2;
|
|
62
|
-
const r4 = POL.K4 * y7;
|
|
63
|
-
const r5 = POL.K5 * y7;
|
|
64
|
-
const r6 = POL.K6 * y7 * y6;
|
|
65
|
-
const r7 = POL.K7 * y9;
|
|
66
|
-
const r8 = POL.K8 * y9 * y6;
|
|
67
|
-
const r9 = POL.K9 * y11 * y2;
|
|
68
|
-
const r10 = POL.K10 * y11 * y1;
|
|
69
|
-
const r11 = POL.K11 * y13;
|
|
70
|
-
const r12 = POL.K12 * y10 * y2;
|
|
71
|
-
const r13 = POL.K13 * y14;
|
|
72
|
-
const r14 = POL.K14 * y1 * y6;
|
|
73
|
-
const r15 = POL.K15 * y3;
|
|
74
|
-
const r16 = POL.K16 * y4;
|
|
75
|
-
const r17 = POL.K17 * y4;
|
|
76
|
-
const r18 = POL.K18 * y16;
|
|
77
|
-
const r19 = POL.K19 * y16;
|
|
78
|
-
const r20 = POL.K20 * y17 * y6;
|
|
79
|
-
const r21 = POL.K21 * y19;
|
|
80
|
-
const r22 = POL.K22 * y19;
|
|
81
|
-
const r23 = POL.K23 * y1 * y4;
|
|
82
|
-
const r24 = POL.K24 * y19 * y1;
|
|
83
|
-
const r25 = POL.K25 * y20;
|
|
84
|
-
|
|
85
|
-
// compute output
|
|
86
|
-
output[0] = -(r1 + r10 + r14 + r23 + r24) + (r2 + r3 + r9 + r11 + r12 + r22 + r25);
|
|
87
|
-
output[1] = -r2 - r3 - r9 - r12 + r1 + r21;
|
|
88
|
-
output[2] = -r15 + r1 + r17 + r19 + r22;
|
|
89
|
-
output[3] = -r2 - r16 - r17 - r23 + r15;
|
|
90
|
-
output[4] = -r3 +2 * r4 + r6 +r7 +r13 + r20;
|
|
91
|
-
output[5] = -r6 - r8 - r14 - r20 + r3 + 2 * r18;
|
|
92
|
-
output[6] = -r4 - r5 - r6 + r13;
|
|
93
|
-
output[7] = r4 + r5 + r6 + r7;
|
|
94
|
-
output[8] = -r7 - r8;
|
|
95
|
-
output[9] = -r12 +r7 + r9;
|
|
96
|
-
output[10] = -r9 - r10 + r8 + r11;
|
|
97
|
-
output[11] = r9;
|
|
98
|
-
output[12] = -r11 + r10;
|
|
99
|
-
output[13] = -r13 + r12;
|
|
100
|
-
output[14] = r14;
|
|
101
|
-
output[15] = -r18 - r19 + r16;
|
|
102
|
-
output[16] = -r20;
|
|
103
|
-
output[17] = r20;
|
|
104
|
-
output[18] = -r21 - r22 - r24 + r23 + r25;
|
|
105
|
-
output[19] = -r25 + r24;
|
|
106
|
-
},
|
|
107
|
-
tolerance: 1e-6,
|
|
108
|
-
solutionColNames: ['y1', 'y2', 'y3', 'y4', 'y5', 'y6', 'y7', 'y8', 'y9', 'y10', 'y11',
|
|
109
|
-
'y12', 'y13', 'y14', 'y15', 'y16', 'y17', 'y18', 'y19', 'y20'],
|
|
110
|
-
}; // pollution
|
|
111
|
-
|
|
112
|
-
export const pollutionReferencePoint = new Float64Array([
|
|
113
|
-
0.05646255480022769,
|
|
114
|
-
0.1342484130422339,
|
|
115
|
-
0.4139734331099427E-8,
|
|
116
|
-
0.5523140207484359E-2,
|
|
117
|
-
0.2018977262302196E-6,
|
|
118
|
-
0.1464541863493966E-6,
|
|
119
|
-
0.7784249118997964E-1,
|
|
120
|
-
0.3245075353396018,
|
|
121
|
-
0.7494013383880406E-2,
|
|
122
|
-
0.1622293157301561E-7,
|
|
123
|
-
0.1135863833257075E-7,
|
|
124
|
-
0.2230505975721359E-2,
|
|
125
|
-
0.2087162882798630E-3,
|
|
126
|
-
0.1396921016840158E-4,
|
|
127
|
-
0.8964884856898295E-2,
|
|
128
|
-
0.4352846369330103E-17,
|
|
129
|
-
0.6899219696263405E-2,
|
|
130
|
-
0.1007803037365946E-3,
|
|
131
|
-
0.1772146513969984E-5,
|
|
132
|
-
0.5682943292316392E-4,
|
|
133
|
-
]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"print-benchmark.js","sourceRoot":"","sources":["print-benchmark.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAC,EAAE,EAAC,MAAM,MAAM,CAAC;AACxB,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAqB,GAAG,EAAE,QAAQ,EAAC,MAAM,aAAa,CAAC;AAE9D,iEAAiE;AACjE,MAAM,UAAU,aAAa,CAAC,IAAU,EAAE,MAAoB,EAAE,SAAiB;IAC/E,IAAI,CAAC;QACL,oBAAoB;QAClB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;QAE9B,iBAAiB;QAEjB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEvB,IAAI,IAAI,GAAW,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAEjF,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAElB,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAElC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,EAAE,CAAC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AG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAA,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA,CAAC;QAC5D,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAA,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA,CAAC;IAC5B,CAAC;IACD,SAAS,EAAE,IAAI;IACf,gBAAgB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,YAAY,CAAC;IACtD,qBAAqB;IACrB,sBAAsB;IACtB,kBAAkB;CACnB,CAAC,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/** Robertson chemical reaction, updated version (see https://archimede.uniba.it/~testset/problems/rober.php) */
|
|
2
|
-
export const robertson = {
|
|
3
|
-
name: 'Robertson',
|
|
4
|
-
arg: {name: 't', start: 0, finish: 10e11, step: 2.5e6},
|
|
5
|
-
initial: [1, 0, 0],
|
|
6
|
-
func: (t: number, y: Float64Array, output: Float64Array) => {
|
|
7
|
-
output[0] = -0.04 * y[0] + 1e4 * y[1] * y[2];
|
|
8
|
-
output[1] = 0.04 * y[0] - 1e4 * y[1] * y[2] - 3e7 * y[1]**2;
|
|
9
|
-
output[2] = 3e7 * y[1]**2;
|
|
10
|
-
},
|
|
11
|
-
tolerance: 1e-7,
|
|
12
|
-
solutionColNames: ['A', 'B', 'C'],
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const robertsonReferencePoint = new Float64Array([
|
|
16
|
-
0.2083340149701255E-7,
|
|
17
|
-
0.8333360770334713E-13,
|
|
18
|
-
0.9999999791665050,
|
|
19
|
-
]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scripting.js","sourceRoot":"","sources":["scripting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;AAE9C;;;;;;;GAOG;AAEH,mDAAmD;AACnD,MAAM,KAAK,GAAG;;;;;;;;;;;;cAYA,CAAC;AAEf,sBAAsB;AACtB,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAE1B,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEjB,8CAA8C;AAC9C,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;AAE7B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import {getIVP, getJScode} from '../../index';
|
|
2
|
-
|
|
3
|
-
/** Example. Solve the following initial value problem
|
|
4
|
-
dx / dt = x + y - cos(t)
|
|
5
|
-
dy / dt = x - y + sin(t)
|
|
6
|
-
x(0) = 1
|
|
7
|
-
y(0) = 0
|
|
8
|
-
|
|
9
|
-
on [0, 1] with the step 0.01.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/** Diff Grok model specifying the given problem */
|
|
13
|
-
const model = `#name: Example
|
|
14
|
-
#equations:
|
|
15
|
-
dx/dt = x + y - cos(t)
|
|
16
|
-
dy/dt = x - y + sin(t)
|
|
17
|
-
|
|
18
|
-
#inits:
|
|
19
|
-
x = 1
|
|
20
|
-
y = 0
|
|
21
|
-
|
|
22
|
-
#argument: t
|
|
23
|
-
start = 0
|
|
24
|
-
finish = 1
|
|
25
|
-
step = 0.01`;
|
|
26
|
-
|
|
27
|
-
// Get parsed formulas
|
|
28
|
-
const ivp = getIVP(model);
|
|
29
|
-
|
|
30
|
-
console.log(ivp);
|
|
31
|
-
|
|
32
|
-
// Get lines of JS-code specifying ODEs object
|
|
33
|
-
const lines = getJScode(ivp);
|
|
34
|
-
|
|
35
|
-
console.log(lines);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vdpol.js","sourceRoot":"","sources":["vdpol.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,IAAI,EAAE,aAAa;IACnB,GAAG,EAAE,EAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAC;IACnD,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAChB,IAAI,EAAE,CAAC,CAAS,EAAE,CAAe,EAAE,MAAoB,EAAE,EAAE;QACzD,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACjB,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,CAAC;IACD,SAAS,EAAE,KAAK;IAChB,gBAAgB,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,YAAY,CAAC;IAClD,iBAAiB;IACjB,CAAC,qBAAqB;CACvB,CAAC,CAAC"}
|
package/src/examples/vdpol.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/** Van der Pol oscillator (see https://archimede.uniba.it/~testset/problems/vdpol.php) */
|
|
2
|
-
export const vdpol = {
|
|
3
|
-
name: 'van der Pol',
|
|
4
|
-
arg: {name: 't', start: 0, finish: 2000, step: 0.1},
|
|
5
|
-
initial: [-1, 1],
|
|
6
|
-
func: (t: number, y: Float64Array, output: Float64Array) => {
|
|
7
|
-
output[0] = y[1];
|
|
8
|
-
output[1] = -y[0] + 1000 * (1 - y[0] * y[0]) * y[1];
|
|
9
|
-
},
|
|
10
|
-
tolerance: 1e-12,
|
|
11
|
-
solutionColNames: ['x1', 'x2'],
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const vdpolReferencePoint = new Float64Array([
|
|
15
|
-
1.706167732170469,
|
|
16
|
-
-0.8928097010248125E-3,
|
|
17
|
-
]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"basic-pipeline-creator.js","sourceRoot":"","sources":["basic-pipeline-creator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,OAAO,EAAC,eAAe,EAAC,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2FO;AACP,MAAM,OAAO,yBAA0B,SAAQ,eAAe;IAC5D,sDAAsD;IACtD,YAAY,GAAQ;QAClB,KAAK,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IAED;;MAEE;IACK,WAAW,CAAC,MAAoB;QACrC,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,OAAO,EAAE,IAAI;oBACb,GAAG,EAAE,IAAI;oBACT,QAAQ,EAAE,IAAI;iBACf;aACF;YACD,GAAG,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC;SAC7B,CAAC;IACJ,CAAC;CACF,CAAC,4BAA4B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC;AAC/B,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC;AAC7B,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AACrC,MAAM,CAAC,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAC5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAClC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC;AAEhC,4BAA4B;AAC5B,MAAM,CAAN,IAAY,GAIX;AAJD,WAAY,GAAG;IACb,oBAAa,CAAA;IACb,qBAAc,CAAA;IACd,kBAAW,CAAA;AACb,CAAC,EAJW,GAAG,KAAH,GAAG,QAId;AAAA,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC;AAExC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,GAAG,CAAiB;IACpD,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;IACd,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IACf,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;CACd,CAAC,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export const ARG_INP_COUNT = 3;
|
|
2
|
-
export const ARG_COL_IDX = 0;
|
|
3
|
-
export const CORRECTION_FACTOR = 0.5;
|
|
4
|
-
export const DEFAULT_CORRECTION = 0.0000001;
|
|
5
|
-
export const LOOP_PARAMS_CONT = 1;
|
|
6
|
-
export const LOOP_MIN_COUNT = 1;
|
|
7
|
-
|
|
8
|
-
/** Default argument names*/
|
|
9
|
-
export enum ARG {
|
|
10
|
-
START = '_t0',
|
|
11
|
-
FINISH = '_t1',
|
|
12
|
-
STEP = '_h',
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const LOOP_COUNT_NAME = '_count';
|
|
16
|
-
|
|
17
|
-
export const argName2IdxMap = new Map<string, number>([
|
|
18
|
-
[ARG.START, 0],
|
|
19
|
-
[ARG.FINISH, 1],
|
|
20
|
-
[ARG.STEP, 2],
|
|
21
|
-
]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,aAAa,EAAE,kBAAkB,EAAC,MAAM,YAAY,CAAC;AAChF,OAAO,EAAC,aAAa,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AACvD,OAAO,EAAC,eAAe,EAAC,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAC,yBAAyB,EAAC,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAC,0BAA0B,EAAC,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAC,2BAA2B,EAAC,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAC,cAAc,EAAC,MAAM,SAAS,CAAC"}
|