Comments (2)
Hi,
I think the best idea is to implement a delay block with one input and one output.
First you need to create your DelayBlock by subclassing the Block class, you will need to redefine some methods (see some examples https://github.com/masfaraud/BMSpy/blob/master/bms/blocks/continuous.py), in particular the Evaluate method that give output values of the block at a given iteration it with timestep ts.
In the Gain block, the Evaluate method calls the InputValues method. You should not use it for your block because it will give you only a fixed number of previous values of the input variable. You should take them manually in the attribute _values of your input variable.
Maybe you'll miss a method in the Variable to have the value of a variable at a given time (an interpolation of the _values attribute vector). I have implemented it in DynamicSystem.VariableValues, there is maybe something to rethink there.
Don't hesitate if you have further questions. I am waiting for the PR then :)
from bmspy.
Merge the PR #19
from bmspy.
Related Issues (20)
- Networkx needs to be < 2.0 HOT 5
- GUI idea HOT 6
- Calculus functions
- Calculus functions HOT 2
- install and plot problems HOT 3
- Create a CONTRIBUTING file (or include contributing info on README) HOT 2
- Update built documentation HOT 1
- pep8? HOT 3
- Evaluate called once per output
- Combine Blocks into new Block HOT 5
- first_order.py example gives ZeroDivisionError HOT 4
- IndexError in "VariablesValues" method HOT 2
- ODE solving HOT 1
- Documentation HOT 2
- Can't find Drag and Drop HOT 1
- Upload to conda HOT 2
- License information missing HOT 1
- Plotting does not work with the examples.
- Pypi package (bms-0.1.0) incomplete HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bmspy.