-
Notifications
You must be signed in to change notification settings - Fork 46
SoftwarePI
Related: ConceptNetworkCreation, SoftwareNeuronEngine, SoftwareUI
SoftwareProgrammingInterface (PI)
With the PI you can write your own ConceptNeuronModels or SoftwareModules where the details are left to the source code.
/Descriptions of features and interfaces of the PI are also covered in the code itself.
Capabilities
- Add synapses
- Call (repeatedly) the “Fire”-method (SoftwareModule)
- After each call to “Fire” you can retrieve the count of neurons that fired
- The engine will execute a single engine cycle every time this is called
- Define neuron-array (give its dimension ("length"))
- Retrieve neuron-information
- Set neuron-parameters
A module can do anything the computer can do without restriction.
there are template files (under the “Tools” folder in the source code). These can be added to Visual Studio to make creating modules and their dialogs easy. Then within Visual Studio, you can “Add new item” and just as you might select C# Class, you can select “Module” to create a new module or “Module Dlg” to create a custom dialog box for a module.
All modules are inherited from the class ModuleBase; Module Dialogs inherit from ModuleBaseDlg. (These take care of all the housekeeping)
Within the Neuron Engine, edit the NeuronBase.h file and add your new model name to the enum near the beginning of the file. Then, edit the NeuronBase.cpp file and edit the “Fire1” and “Fire2” methods to create the functionality for your new model. Within the code, you can see how the various existing models are handled. This is all that’s needed to make the new neuron model work in the Neuron Engine.
To make your new model also accessible from the Brain Simulator user interface, you’ll need to edit Neuron.cs and add your new model type to the modelType enum and a tooltip to the modelToolTip array. Then you’ll need to edit NeuronView.cs, edit the GetNeuronView method to change the way the neuron displays (if you want), and likewise the SetCustomCMItems method if you want the context menu to display custom parameters.
The process for synapses is similar (to neuron module creation) except that the enum change is in the file SynapseBase.h while the functionality of the synapse is in NeuronBase.cpp. For the user interface, similar changes will be needed for Synapse.cs and SynapseView.cs.