Title: step function · Issue #2 · BondGraphTools/BondGraphTools-Tutorials · GitHub
Open Graph Title: step function · Issue #2 · BondGraphTools/BondGraphTools-Tutorials
X Title: step function · Issue #2 · BondGraphTools/BondGraphTools-Tutorials
Description: Hi there, seems like the step function code in the tutorial has some mistakes as it gives me the following error: ModelException: Invalid control function for var: 0. Control functions should be of the form: 0 = f(t, x, dx/dt) from BondG...
Open Graph Description: Hi there, seems like the step function code in the tutorial has some mistakes as it gives me the following error: ModelException: Invalid control function for var: 0. Control functions should be of...
X Description: Hi there, seems like the step function code in the tutorial has some mistakes as it gives me the following error: ModelException: Invalid control function for var: 0. Control functions should be of...
Opengraph URL: https://github.com/BondGraphTools/BondGraphTools-Tutorials/issues/2
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"step function","articleBody":"Hi there, seems like the step function code in the tutorial has some mistakes as it gives me the following error:\r\n\r\nModelException: Invalid control function for var: 0.\r\n Control functions should be of the form:\r\n0 = f(t, x, dx/dt)\r\n\r\n```\r\nfrom BondGraphTools import *\r\n\r\n#%%\r\n\r\nmodel = new(name= 'RC')\r\n\r\n#%%\r\nC = new(\"C\", value= 1)\r\nR = new(\"R\", value= 1)\r\nKCL = new(\"0\")\r\n\r\n#%%\r\n\r\nadd(model, R, C, KCL)\r\nconnect(R, KCL)\r\nconnect(KCL, C)\r\n\r\n#%%\r\n\r\nSf = new(\"Sf\")\r\nadd(model, Sf)\r\nconnect(Sf, KCL)\r\ndraw(model)\r\n\r\n\r\n#%%\r\ntimespan = [0, 5]\r\nx0 = {'x_0':1}\r\n\r\nstep_fn = {'u_0': 't \u003c 1 ? 1 : 0'} # if t \u003c 0 then 1 else 0\r\nt, x = simulate(model, timespan=timespan, x0=x0, control_vars= step_fn)\r\nplot(t,x)\r\n```\r\nThanks","author":{"url":"https://github.com/Niimaa","@type":"Person","name":"Niimaa"},"datePublished":"2021-07-26T22:16:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2/BondGraphTools-Tutorials/issues/2"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ea8f2210-ac42-088f-fbb4-7351257205a6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C962:AAAF8:46AFA8:5C1C24:698D2EA5 |
| html-safe-nonce | 060dd3216aa689d81a2479febb25083b20fe43fb9fc49634fe954c297f61771c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTYyOkFBQUY4OjQ2QUZBODo1QzFDMjQ6Njk4RDJFQTUiLCJ2aXNpdG9yX2lkIjoiMzg0MzYyMzgzODYyNTQ0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7c55b28d9a54f72e21b076b14f19b1ff569a612021e8ae147e8eb53d1c7cd90d |
| hovercard-subject-tag | issue:953331673 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/BondGraphTools/BondGraphTools-Tutorials/2/issue_layout |
| twitter:image | https://opengraph.githubassets.com/76e645ada726b73323163c43406a341aca005a50a514db6b95dba1bff6998292/BondGraphTools/BondGraphTools-Tutorials/issues/2 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/76e645ada726b73323163c43406a341aca005a50a514db6b95dba1bff6998292/BondGraphTools/BondGraphTools-Tutorials/issues/2 |
| og:image:alt | Hi there, seems like the step function code in the tutorial has some mistakes as it gives me the following error: ModelException: Invalid control function for var: 0. Control functions should be of... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Niimaa |
| hostname | github.com |
| expected-hostname | github.com |
| None | c25395580e1e3bf82d705e0982a1b24255366088720fef945f1493d5e3e67954 |
| turbo-cache-control | no-preview |
| go-import | github.com/BondGraphTools/BondGraphTools-Tutorials git https://github.com/BondGraphTools/BondGraphTools-Tutorials.git |
| octolytics-dimension-user_id | 43798806 |
| octolytics-dimension-user_login | BondGraphTools |
| octolytics-dimension-repository_id | 149375713 |
| octolytics-dimension-repository_nwo | BondGraphTools/BondGraphTools-Tutorials |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 149375713 |
| octolytics-dimension-repository_network_root_nwo | BondGraphTools/BondGraphTools-Tutorials |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1fa2bc33fc715bfb2cb9dd8a9cad4f811c16c371 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width