Skip to content

Instantly share code, notes, and snippets.

@richfitz
Created April 9, 2019 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richfitz/f3f618c45c8f5c0a52a7441ec15595b4 to your computer and use it in GitHub Desktop.
Save richfitz/f3f618c45c8f5c0a52a7441ec15595b4 to your computer and use it in GitHub Desktop.
{
"version": "0.2.0",
"config": {
"base": "odin",
"include": []
},
"meta": {
"internal": "internal",
"user": "user",
"state": "state",
"result": "dstatedt",
"output": "output",
"time": "t",
"initial_time": "initial_t"
},
"features": {
"discrete": false,
"has_array": false,
"has_output": false,
"has_user": false,
"has_delay": false,
"has_interpolate": false,
"has_stochastic": false,
"has_include": false,
"initial_time_dependent": false
},
"data": {
"elements": [
{
"name": "K",
"location": "internal",
"storage_type": "double",
"rank": 0,
"dimnames": null
},
{
"name": "N",
"location": "variable",
"storage_type": "double",
"rank": 0,
"dimnames": null
},
{
"name": "N0",
"location": "internal",
"storage_type": "double",
"rank": 0,
"dimnames": null
},
{
"name": "initial_N",
"location": "internal",
"storage_type": "double",
"rank": 0,
"dimnames": null
},
{
"name": "r",
"location": "internal",
"storage_type": "double",
"rank": 0,
"dimnames": null
}
],
"variable": {
"length": 1,
"contents": [
{
"name": "N",
"offset": 0,
"initial": "initial_N"
}
]
},
"output": {
"length": 0,
"contents": []
}
},
"equations": [
{
"name": "K",
"type": "expression_scalar",
"source": [4],
"depends": null,
"lhs": "K",
"rhs": {
"value": 100
}
},
{
"name": "N0",
"type": "expression_scalar",
"source": [3],
"depends": null,
"lhs": "N0",
"rhs": {
"value": 1
}
},
{
"name": "deriv_N",
"type": "expression_scalar",
"source": [1],
"depends": {
"functions": ["*", "(", "-", "/"],
"variables": ["r", "N", "K"]
},
"lhs": "N",
"rhs": {
"value": [
"*",
[
"*",
"r",
"N"
],
[
"(",
[
"-",
1,
[
"/",
"N",
"K"
]
]
]
]
}
},
{
"name": "initial_N",
"type": "expression_scalar",
"source": [2],
"depends": {
"functions": [],
"variables": ["N0"]
},
"lhs": "initial_N",
"rhs": {
"value": "N0"
}
},
{
"name": "r",
"type": "expression_scalar",
"source": [5],
"depends": null,
"lhs": "r",
"rhs": {
"value": 0.5
}
}
],
"components": {
"create": {
"variables": [],
"equations": ["K", "N0", "r", "initial_N"]
},
"user": {
"variables": [],
"equations": []
},
"initial": {
"variables": [],
"equations": []
},
"rhs": {
"variables": ["N"],
"equations": ["deriv_N"]
},
"output": {
"variables": [],
"equations": []
}
},
"user": [],
"interpolate": {
"min": [],
"max": [],
"critical": []
},
"source": ["deriv(N) <- r * N * (1 - N/K)", "initial(N) <- N0", "N0 <- 1", "K <- 100", "r <- 0.5"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment