I’ve been trying for months to create a way to simulate electrical circuits. I’ve tried so many different ways, but this is what I currently have.
Circuit Board actor has components attached to it that are the elements (ex: sources, resistors, ground, etc). Circuit Board actor has an array of connection structures which describe element connections (which component’s terminal to which component terminal). Every circuit element has a terminal map, integers as keys, with an energy struct that holds voltage and amperage as values.
Here is an organized way to explain this:
Components (scene components)
- Terminals (Int to S_Energy Map
- Key of Int
- Value of S_Energy
- Voltage Drop (ex: diode)
- Other variables (EX: Integrity)
Connections (struct array)
Each connection (struct)
Object 1 Terminal (int)
Object 2 Terminal (int)
Object 1 (component ref)
Object 2 (component ref)
All energy flow and actions should take place on the circuit board blueprint, the component is just a data holder. I’m having trouble simulating the flow of energy from component to component. I usually use Set Members in S_Energy on each terminal for each connection. Am I going about this all wrong? If anybody can give some suggestions or ideas it would be greatly appreciated.
Here are some sites I use for refrences
I have a general understanding (about 2-3 years) of electronics, C++/C# and blueprints experience.