Skip to content
Snippets Groups Projects
Unverified Commit 488ece0c authored by Benjamin Cumming's avatar Benjamin Cumming Committed by GitHub
Browse files

Extend ring (#611)

Extend the ring benchmark to have an optional number of synapses attached to each cell, instead of a fixed count of one synapse per cell.
This doesn't change the behavior of the model: only the first synapse is used for communication. The other synapses only effect is to
increase the per-cell computational overheads, to more effectively mimic real world performance.
parent face9915
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,9 @@ struct cell_parameters { ...@@ -22,6 +22,9 @@ struct cell_parameters {
std::array<double,2> branch_probs = {1.0, 0.5}; // Probability of a branch occuring. std::array<double,2> branch_probs = {1.0, 0.5}; // Probability of a branch occuring.
std::array<unsigned,2> compartments = {20, 2}; // Compartment count on a branch. std::array<unsigned,2> compartments = {20, 2}; // Compartment count on a branch.
std::array<double,2> lengths = {200, 20}; // Length of branch in μm. std::array<double,2> lengths = {200, 20}; // Length of branch in μm.
// The number of synapses per cell.
unsigned synapses = 1;
}; };
struct ring_params { struct ring_params {
...@@ -65,6 +68,7 @@ ring_params read_options(int argc, char** argv) { ...@@ -65,6 +68,7 @@ ring_params read_options(int argc, char** argv) {
param_from_json(params.cell.branch_probs, "branch-probs", json); param_from_json(params.cell.branch_probs, "branch-probs", json);
param_from_json(params.cell.compartments, "compartments", json); param_from_json(params.cell.compartments, "compartments", json);
param_from_json(params.cell.lengths, "lengths", json); param_from_json(params.cell.lengths, "lengths", json);
param_from_json(params.cell.synapses, "synapses", json);
if (!json.empty()) { if (!json.empty()) {
for (auto it=json.begin(); it!=json.end(); ++it) { for (auto it=json.begin(); it!=json.end(); ++it) {
......
...@@ -86,7 +86,7 @@ public: ...@@ -86,7 +86,7 @@ public:
std::vector<arb::event_generator> event_generators(cell_gid_type gid) const override { std::vector<arb::event_generator> event_generators(cell_gid_type gid) const override {
std::vector<arb::event_generator> gens; std::vector<arb::event_generator> gens;
if (!gid) { if (!gid) {
gens.push_back(arb::explicit_generator(arb::pse_vector{{{0, 0}, 0.1, 1.0}})); gens.push_back(arb::explicit_generator(arb::pse_vector{{{0, 0}, event_weight_, 1.0}}));
} }
return gens; return gens;
} }
...@@ -109,7 +109,7 @@ private: ...@@ -109,7 +109,7 @@ private:
cell_size_type num_cells_; cell_size_type num_cells_;
cell_parameters cell_params_; cell_parameters cell_params_;
double min_delay_; double min_delay_;
float event_weight_ = 0.01; float event_weight_ = 0.05;
}; };
struct cell_stats { struct cell_stats {
...@@ -341,6 +341,11 @@ arb::mc_cell branch_cell(arb::cell_gid_type gid, const cell_parameters& params) ...@@ -341,6 +341,11 @@ arb::mc_cell branch_cell(arb::cell_gid_type gid, const cell_parameters& params)
// Add a synapse to the mid point of the first dendrite. // Add a synapse to the mid point of the first dendrite.
cell.add_synapse({1, 0.5}, "expsyn"); cell.add_synapse({1, 0.5}, "expsyn");
// Add additional synapses that will not be connected to anything.
for (unsigned i=1u; i<params.synapses; ++i) {
cell.add_synapse({1, 0.5}, "expsyn");
}
return cell; return cell;
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment