From 8d2a1b4c836ad163c0245b124cf1b187d134531e Mon Sep 17 00:00:00 2001 From: "wisniewski.alexis" Date: Thu, 23 Jan 2025 14:32:31 +0100 Subject: [PATCH] more questions and mysteries --- .../polebalancing.ipynb | 1416 ++++++++++++++++- 1 file changed, 1400 insertions(+), 16 deletions(-) diff --git a/doc/tutorials/cart_pole_reinforcement_learning/polebalancing.ipynb b/doc/tutorials/cart_pole_reinforcement_learning/polebalancing.ipynb index 1e168bf96..58c4a22fe 100644 --- a/doc/tutorials/cart_pole_reinforcement_learning/polebalancing.ipynb +++ b/doc/tutorials/cart_pole_reinforcement_learning/polebalancing.ipynb @@ -39,10 +39,19 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "6ded29bc", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "pygame 2.6.1 (SDL 2.28.4, Python 3.12.8)\n", + "Hello from the pygame community. https://www.pygame.org/contribute.html\n" + ] + } + ], "source": [ "import pygame as pg\n", "from typing import Tuple\n", @@ -407,12 +416,13 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "id": "3f9b07a1", "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", + "%matplotlib tk\n", "class PlotRenderer():\n", " def __init__(self, init_x = [0], init_y = [0]) -> None:\n", " plt.ion()\n", @@ -431,8 +441,6 @@ " self.q_value_ax.set_title(\"Q-Values for a state of (param1/param2)\")\n", " self.cmap = plt.cm.coolwarm\n", " \n", - " def average_values(self, boxes):\n", - " res = []\n", " def update(self, x, y, boxes) -> None:\n", " print(x)\n", " self.x.append(x)\n", @@ -444,7 +452,7 @@ "\n", " if(x % 10 == 0):\n", " q_values = boxes[:,:,:,:,0] - boxes[:,:,:,:,1]\n", - " self.q_value_ax.imshow(np.mean(q_values, axis = (2,3)), cmap=plt.cm.coolwarm, interpolation='none')\n", + " self.q_value_ax.imshow(np.mean(q_values, axis = (1,3)), cmap=plt.cm.coolwarm, interpolation='none')\n", "\n", " plt.draw\n", " plt.pause(0.0001)\n", @@ -461,10 +469,202 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "id": "717eda26-e385-494f-bdca-9847eefe01ca", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2\n", + "3\n", + "4\n", + "5\n", + "6\n", + "7\n", + "8\n", + "9\n", + "10\n", + "11\n", + "12\n", + "13\n", + "14\n", + "15\n", + "16\n", + "17\n", + "18\n", + "19\n", + "20\n", + "21\n", + "22\n", + "23\n", + "24\n", + "25\n", + "26\n", + "27\n", + "28\n", + "29\n", + "30\n", + "31\n", + "32\n", + "33\n", + "34\n", + "35\n", + "36\n", + "37\n", + "38\n", + "39\n", + "40\n", + "41\n", + "42\n", + "43\n", + "44\n", + "45\n", + "46\n", + "47\n", + "48\n", + "49\n", + "50\n", + "51\n", + "52\n", + "53\n", + "54\n", + "55\n", + "56\n", + "57\n", + "58\n", + "59\n", + "60\n", + "61\n", + "62\n", + "63\n", + "64\n", + "65\n", + "66\n", + "67\n", + "68\n", + "69\n", + "70\n", + "71\n", + "72\n", + "73\n", + "74\n", + "75\n", + "76\n", + "77\n", + "78\n", + "79\n", + "80\n", + "81\n", + "82\n", + "83\n", + "84\n", + "85\n", + "86\n", + "87\n", + "88\n", + "89\n", + "90\n", + "91\n", + "92\n", + "93\n", + "94\n", + "95\n", + "96\n", + "97\n", + "98\n", + "99\n", + "100\n", + "101\n", + "102\n", + "103\n", + "104\n", + "105\n", + "106\n", + "107\n", + "108\n", + "109\n", + "110\n", + "111\n", + "112\n", + "113\n", + "114\n", + "115\n", + "116\n", + "117\n", + "118\n", + "119\n", + "120\n", + "121\n", + "122\n", + "123\n", + "124\n", + "125\n", + "126\n", + "127\n", + "128\n", + "129\n", + "130\n", + "131\n", + "132\n", + "133\n", + "134\n", + "135\n", + "136\n", + "137\n", + "138\n", + "139\n", + "140\n", + "141\n", + "142\n", + "143\n", + "144\n", + "145\n", + "146\n", + "147\n", + "148\n", + "149\n", + "150\n", + "151\n", + "152\n", + "153\n", + "154\n", + "155\n", + "156\n", + "157\n", + "158\n", + "159\n", + "160\n", + "161\n", + "162\n", + "163\n", + "164\n", + "165\n", + "166\n", + "167\n", + "168\n", + "169\n", + "170\n", + "171\n", + "172\n", + "173\n", + "174\n", + "175\n" + ] + }, + { + "ename": "", + "evalue": "", + "output_type": "error", + "traceback": [ + "\u001b[1;31mThe Kernel crashed while executing code in the current cell or a previous cell. \n", + "\u001b[1;31mPlease review the code in the cell(s) to identify a possible cause of the failure. \n", + "\u001b[1;31mClick here for more info. \n", + "\u001b[1;31mView Jupyter log for further details." + ] + } + ], "source": [ "import sys\n", "\n", @@ -556,10 +756,1148 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "id": "8e16ea83", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:root:PyGSL is not available. The stiffness test will be skipped.\n", + "WARNING:root:Error when importing: No module named 'pygsl'\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + " -- N E S T --\n", + " Copyright (C) 2004 The NEST Initiative\n", + "\n", + " Version: 3.8.0\n", + " Built: Aug 27 2024 04:38:39\n", + "\n", + " This program is provided AS IS and comes with\n", + " NO WARRANTY. See the file LICENSE for details.\n", + "\n", + " Problems or suggestions?\n", + " Visit https://www.nest-simulator.org\n", + "\n", + " Type 'nest.help()' to find out more about NEST.\n", + "\n", + "\n", + " -- N E S T --\n", + " Copyright (C) 2004 The NEST Initiative\n", + "\n", + " Version: 3.8.0\n", + " Built: Aug 27 2024 04:38:39\n", + "\n", + " This program is provided AS IS and comes with\n", + " NO WARRANTY. See the file LICENSE for details.\n", + "\n", + " Problems or suggestions?\n", + " Visit https://www.nest-simulator.org\n", + "\n", + " Type 'nest.help()' to find out more about NEST.\n", + "\n", + "[15,ignore_and_fire_neuron_nestml, WARNING, [35:34;35:58]]: Model contains a call to fixed-timestep functions (``resolution()`` and/or ``steps()``). This restricts the model to being compatible only with fixed-timestep simulators. Consider eliminating ``resolution()`` and ``steps()`` from the model, and using ``timestep()`` instead.\n", + "\u001b[33mCMake Warning (dev) at CMakeLists.txt:93 (project):\n", + " cmake_minimum_required() should be called prior to this top-level project()\n", + " call. Please see the cmake-commands(7) manual for usage documentation of\n", + " both commands.\n", + "This warning is for project developers. Use -Wno-dev to suppress it.\n", + "\u001b[0m\n", + "-- The CXX compiler identification is Clang 17.0.6\n", + "-- Detecting CXX compiler ABI info\n", + "-- Detecting CXX compiler ABI info - done\n", + "-- Check for working CXX compiler: /opt/homebrew/anaconda3/envs/.venv/bin/arm64-apple-darwin20.0.0-clang++ - skipped\n", + "-- Detecting CXX compile features\n", + "-- Detecting CXX compile features - done\n", + "\u001b[0m\u001b[0m\n", + "\u001b[0m-------------------------------------------------------\u001b[0m\n", + "\u001b[0mnestml_4f96132537824d3e80d969bd586bb4ca_module Configuration Summary\u001b[0m\n", + "\u001b[0m-------------------------------------------------------\u001b[0m\n", + "\u001b[0m\u001b[0m\n", + "\u001b[0mC++ compiler : /opt/homebrew/anaconda3/envs/.venv/bin/arm64-apple-darwin20.0.0-clang++\u001b[0m\n", + "\u001b[0mBuild static libs : OFF\u001b[0m\n", + "\u001b[0mC++ compiler flags : -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /opt/homebrew/anaconda3/envs/.venv/include\u001b[0m\n", + "\u001b[0mNEST compiler flags : -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /opt/homebrew/anaconda3/envs/.venv/include -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/nest-simulator_1724732993440/work=/usr/local/src/conda/nest-simulator-3.8 -fdebug-prefix-map=/opt/homebrew/anaconda3/envs/.venv=/usr/local/src/conda-prefix -std=c++17 -Wall -Xclang -fopenmp -O2\u001b[0m\n", + "\u001b[0mNEST include dirs : -I/opt/homebrew/anaconda3/envs/.venv/include/nest -I/opt/homebrew/anaconda3/envs/.venv/include -I/opt/homebrew/anaconda3/envs/.venv/include -I/opt/homebrew/anaconda3/envs/.venv/include -I/opt/homebrew/anaconda3/envs/.venv/include\u001b[0m\n", + "\u001b[0mNEST libraries flags : -L/opt/homebrew/anaconda3/envs/.venv/lib/nest -lnest -lsli /opt/homebrew/anaconda3/envs/.venv/lib/libltdl.dylib /opt/homebrew/anaconda3/envs/.venv/lib/libreadline.dylib /opt/homebrew/anaconda3/envs/.venv/lib/libncurses.dylib /opt/homebrew/anaconda3/envs/.venv/lib/libgsl.dylib /opt/homebrew/anaconda3/envs/.venv/lib/libgslcblas.dylib /opt/homebrew/anaconda3/envs/.venv/lib/libomp.dylib\u001b[0m\n", + "\u001b[0m\u001b[0m\n", + "\u001b[0m-------------------------------------------------------\u001b[0m\n", + "\u001b[0m\u001b[0m\n", + "\u001b[0mYou can now build and install 'nestml_4f96132537824d3e80d969bd586bb4ca_module' using\u001b[0m\n", + "\u001b[0m make\u001b[0m\n", + "\u001b[0m make install\u001b[0m\n", + "\u001b[0m\u001b[0m\n", + "\u001b[0mThe library file libnestml_4f96132537824d3e80d969bd586bb4ca_module.so will be installed to\u001b[0m\n", + "\u001b[0m /var/folders/3h/2lc1zrkd375b1l0m8zcfj6440000gn/T/nestml_target_wbnkfyxv\u001b[0m\n", + "\u001b[0mThe module can be loaded into NEST using\u001b[0m\n", + "\u001b[0m (nestml_4f96132537824d3e80d969bd586bb4ca_module) Install (in SLI)\u001b[0m\n", + "\u001b[0m nest.Install(nestml_4f96132537824d3e80d969bd586bb4ca_module) (in PyNEST)\u001b[0m\n", + "\u001b[0m\u001b[0m\n", + "\u001b[33mCMake Warning (dev) in CMakeLists.txt:\n", + " No cmake_minimum_required command is present. A line of code such as\n", + "\n", + " cmake_minimum_required(VERSION 3.31)\n", + "\n", + " should be added at the top of the file. The version specified may be lower\n", + " if you wish to support older CMake versions for this project. For more\n", + " information run \"cmake --help-policy CMP0000\".\n", + "This warning is for project developers. Use -Wno-dev to suppress it.\n", + "\u001b[0m\n", + "-- Configuring done (0.3s)\n", + "-- Generating done (0.0s)\n", + "-- Build files have been written to: /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target\n", + "[ 66%] \u001b[32mBuilding CXX object CMakeFiles/nestml_4f96132537824d3e80d969bd586bb4ca_module_module.dir/nestml_4f96132537824d3e80d969bd586bb4ca_module.o\u001b[0m\n", + "[ 66%] \u001b[32mBuilding CXX object CMakeFiles/nestml_4f96132537824d3e80d969bd586bb4ca_module_module.dir/ignore_and_fire_neuron_nestml.o\u001b[0m\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/ignore_and_fire_neuron_nestml.cpp:165:16: warning: unused variable '__timestep' [-Wunused-variable]\n", + " 165 | const double __timestep = nest::Time::get_resolution().get_ms(); // do not remove, this is necessary for the timestep() function\n", + " | ^~~~~~~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/ignore_and_fire_neuron_nestml.cpp:195:16: warning: unused variable '__timestep' [-Wunused-variable]\n", + " 195 | const double __timestep = nest::Time::get_resolution().get_ms(); // do not remove, this is necessary for the timestep() function\n", + " | ^~~~~~~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/ignore_and_fire_neuron_nestml.cpp:238:10: warning: unused variable 'get_t' [-Wunused-variable]\n", + " 238 | auto get_t = [origin, lag](){ return nest::Time( nest::Time::step( origin.get_steps() + lag + 1) ).get_ms(); };\n", + " | ^~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/ignore_and_fire_neuron_nestml.cpp:232:16: warning: unused variable '__timestep' [-Wunused-variable]\n", + " 232 | const double __timestep = nest::Time::get_resolution().get_ms(); // do not remove, this is necessary for the timestep() function\n", + " | ^~~~~~~~~~\n", + "4 warnings generated.\n", + "[100%] \u001b[32m\u001b[1mLinking CXX shared module nestml_4f96132537824d3e80d969bd586bb4ca_module.so\u001b[0m\n", + "[100%] Built target nestml_4f96132537824d3e80d969bd586bb4ca_module_module\n", + "[100%] Built target nestml_4f96132537824d3e80d969bd586bb4ca_module_module\n", + "\u001b[36mInstall the project...\u001b[0m\n", + "-- Install configuration: \"\"\n", + "-- Installing: /var/folders/3h/2lc1zrkd375b1l0m8zcfj6440000gn/T/nestml_target_wbnkfyxv/nestml_4f96132537824d3e80d969bd586bb4ca_module.so\n", + "[1,GLOBAL, INFO]: List of files that will be processed:\n", + "[2,GLOBAL, INFO]: /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/../../../models/neurons/iaf_psc_exp_neuron.nestml\n", + "[3,GLOBAL, INFO]: /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/../../../models/synapses/neuromodulated_stdp_synapse.nestml\n", + "[4,GLOBAL, INFO]: Target platform code will be generated in directory: '/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target'\n", + "[5,GLOBAL, INFO]: Target platform code will be installed in directory: '/var/folders/3h/2lc1zrkd375b1l0m8zcfj6440000gn/T/nestml_target_zk0k5qqz'\n", + "\n", + " -- N E S T --\n", + " Copyright (C) 2004 The NEST Initiative\n", + "\n", + " Version: 3.8.0\n", + " Built: Aug 27 2024 04:38:39\n", + "\n", + " This program is provided AS IS and comes with\n", + " NO WARRANTY. See the file LICENSE for details.\n", + "\n", + " Problems or suggestions?\n", + " Visit https://www.nest-simulator.org\n", + "\n", + " Type 'nest.help()' to find out more about NEST.\n", + "\n", + "[6,GLOBAL, INFO]: The NEST Simulator version was automatically detected as: v3.8.0\n", + "[7,GLOBAL, INFO]: Given template root path is not an absolute path. Creating the absolute path with default templates directory '/opt/homebrew/anaconda3/envs/.venv/lib/python3.12/site-packages/pynestml/codegeneration/resources_nest/point_neuron'\n", + "[8,GLOBAL, INFO]: Given template root path is not an absolute path. Creating the absolute path with default templates directory '/opt/homebrew/anaconda3/envs/.venv/lib/python3.12/site-packages/pynestml/codegeneration/resources_nest/point_neuron'\n", + "[9,GLOBAL, INFO]: Given template root path is not an absolute path. Creating the absolute path with default templates directory '/opt/homebrew/anaconda3/envs/.venv/lib/python3.12/site-packages/pynestml/codegeneration/resources_nest/point_neuron'\n", + "[10,GLOBAL, INFO]: The NEST Simulator installation path was automatically detected as: /opt/homebrew/anaconda3/envs/.venv\n", + "[11,GLOBAL, INFO]: Start processing '/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/../../../models/neurons/iaf_psc_exp_neuron.nestml'!\n", + "[12,GLOBAL, INFO]: Start processing '/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/../../../models/synapses/neuromodulated_stdp_synapse.nestml'!\n", + "[13,neuromodulated_stdp_synapse_nestml, INFO, [62:13;62:18]]: Implicit casting from (compatible) type '1 / ms' to 'real'.\n", + "[14,neuromodulated_stdp_synapse_nestml, INFO, [83:13;84:59]]: Implicit casting from (compatible) type 'ms' to 'real'.\n", + "[15,iaf_psc_exp_neuron_nestml, INFO, [66:39;66:63]]: Implicit magnitude conversion from pA to pA buffer with factor 1.0 \n", + "[16,iaf_psc_exp_neuron_nestml, INFO, [66:15;66:30]]: Implicit magnitude conversion from mV / ms to pA / pF with factor 1.0 \n", + "[17,neuromodulated_stdp_synapse_nestml, WARNING, [35:8;35:17]]: Variable 'd' has the same name as a physical unit!\n", + "[18,neuromodulated_stdp_synapse_nestml, INFO, [62:13;62:18]]: Implicit casting from (compatible) type '1 / ms' to 'real'.\n", + "[19,neuromodulated_stdp_synapse_nestml, INFO, [83:13;84:59]]: Implicit casting from (compatible) type 'ms' to 'real'.\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:root:Analysing input:\n", + "INFO:root:{\n", + " \"dynamics\": [\n", + " {\n", + " \"expression\": \"I_syn_exc' = (-I_syn_exc) / tau_syn_exc\",\n", + " \"initial_values\": {\n", + " \"I_syn_exc\": \"0\"\n", + " }\n", + " },\n", + " {\n", + " \"expression\": \"I_syn_inh' = (-I_syn_inh) / tau_syn_inh\",\n", + " \"initial_values\": {\n", + " \"I_syn_inh\": \"0\"\n", + " }\n", + " },\n", + " {\n", + " \"expression\": \"V_m' = (-(V_m - E_L)) / tau_m + (I_syn_exc - I_syn_inh + I_e + I_stim) / C_m\",\n", + " \"initial_values\": {\n", + " \"V_m\": \"E_L\"\n", + " }\n", + " },\n", + " {\n", + " \"expression\": \"refr_t' = (-1000.0) * 1.0 / 1000.0\",\n", + " \"initial_values\": {\n", + " \"refr_t\": \"0\"\n", + " }\n", + " }\n", + " ],\n", + " \"options\": {\n", + " \"output_timestep_symbol\": \"__h\"\n", + " },\n", + " \"parameters\": {\n", + " \"C_m\": \"250\",\n", + " \"E_L\": \"(-70)\",\n", + " \"I_e\": \"0\",\n", + " \"V_reset\": \"(-70)\",\n", + " \"V_th\": \"(-55)\",\n", + " \"refr_T\": \"2\",\n", + " \"tau_m\": \"10\",\n", + " \"tau_syn_exc\": \"2\",\n", + " \"tau_syn_inh\": \"2\"\n", + " }\n", + "}\n", + "INFO:root:Processing global options...\n", + "INFO:root:Processing input shapes...\n", + "INFO:root:\n", + "Processing differential-equation form shape I_syn_exc with defining expression = \"(-I_syn_exc) / tau_syn_exc\"\n", + "DEBUG:root:Splitting expression -I_syn_exc/tau_syn_exc (symbols [I_syn_exc])\n", + "DEBUG:root:\tlinear factors: Matrix([[-1/tau_syn_exc]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Created Shape with symbol I_syn_exc, derivative_factors = [-1/tau_syn_exc], inhom_term = 0.0, nonlin_term = 0.0\n", + "INFO:root:\tReturning shape: Shape \"I_syn_exc\" of order 1\n", + "INFO:root:Shape I_syn_exc: reconstituting expression -I_syn_exc/tau_syn_exc\n", + "INFO:root:\n", + "Processing differential-equation form shape I_syn_inh with defining expression = \"(-I_syn_inh) / tau_syn_inh\"\n", + "DEBUG:root:Splitting expression -I_syn_inh/tau_syn_inh (symbols [I_syn_inh])\n", + "DEBUG:root:\tlinear factors: Matrix([[-1/tau_syn_inh]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Created Shape with symbol I_syn_inh, derivative_factors = [-1/tau_syn_inh], inhom_term = 0.0, nonlin_term = 0.0\n", + "INFO:root:\tReturning shape: Shape \"I_syn_inh\" of order 1\n", + "INFO:root:Shape I_syn_inh: reconstituting expression -I_syn_inh/tau_syn_inh\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[20,GLOBAL, INFO]: State variables that will be moved from synapse to neuron: ['post_tr']\n", + "[21,GLOBAL, INFO]: Parameters that will be copied from synapse to neuron: ['tau_tr_post']\n", + "[22,GLOBAL, INFO]: Synaptic state variables moved to neuron that will need buffering: []\n", + "[23,GLOBAL, INFO]: Moving state var defining equation(s) post_tr\n", + "[24,GLOBAL, INFO]: Moving state variables for equation(s) post_tr\n", + "[25,GLOBAL, INFO]: Moving definition of post_tr from synapse to neuron\n", + "[26,GLOBAL, INFO]: \tMoving statement post_tr += 1.0\n", + "[27,GLOBAL, INFO]: In synapse: replacing ``continuous`` type input ports that are connected to postsynaptic neuron with external variable references\n", + "[28,GLOBAL, INFO]: Copying parameters from synapse to neuron...\n", + "[29,GLOBAL, INFO]: Copying definition of tau_tr_post from synapse to neuron\n", + "[30,GLOBAL, INFO]: Adding suffix to variables in spike updates\n", + "[31,GLOBAL, INFO]: In synapse: replacing variables with suffixed external variable references\n", + "[32,GLOBAL, INFO]: \t• Replacing variable post_tr\n", + "[33,GLOBAL, INFO]: Successfully constructed neuron-synapse pair iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml, neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml\n", + "[34,GLOBAL, INFO]: Analysing/transforming model 'iaf_psc_exp_neuron_nestml'\n", + "[35,iaf_psc_exp_neuron_nestml, INFO, [55:0;108:0]]: Starts processing of the model 'iaf_psc_exp_neuron_nestml'\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:root:\n", + "Processing differential-equation form shape V_m with defining expression = \"(-(V_m - E_L)) / tau_m + (I_syn_exc - I_syn_inh + I_e + I_stim) / C_m\"\n", + "DEBUG:root:Splitting expression (E_L - V_m)/tau_m + (I_e + I_stim + I_syn_exc - I_syn_inh)/C_m (symbols [V_m])\n", + "DEBUG:root:\tlinear factors: Matrix([[-1/tau_m]])\n", + "DEBUG:root:\tinhomogeneous term: E_L/tau_m + I_e/C_m\n", + "DEBUG:root:\tnonlinear term: I_stim/C_m + I_syn_exc/C_m - I_syn_inh/C_m\n", + "DEBUG:root:Created Shape with symbol V_m, derivative_factors = [-1/tau_m], inhom_term = E_L/tau_m + I_e/C_m, nonlin_term = I_stim/C_m + I_syn_exc/C_m - I_syn_inh/C_m\n", + "INFO:root:\tReturning shape: Shape \"V_m\" of order 1\n", + "INFO:root:Shape V_m: reconstituting expression E_L/tau_m - V_m/tau_m + I_e/C_m + I_stim/C_m + I_syn_exc/C_m - I_syn_inh/C_m\n", + "INFO:root:\n", + "Processing differential-equation form shape refr_t with defining expression = \"(-1000.0) * 1.0 / 1000.0\"\n", + "DEBUG:root:Splitting expression -1.00000000000000 (symbols [refr_t])\n", + "DEBUG:root:\tlinear factors: Matrix([[0]])\n", + "DEBUG:root:\tinhomogeneous term: -1.00000000000000\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Created Shape with symbol refr_t, derivative_factors = [0], inhom_term = -1.00000000000000, nonlin_term = 0.0\n", + "INFO:root:\tReturning shape: Shape \"refr_t\" of order 1\n", + "INFO:root:Shape refr_t: reconstituting expression -1.00000000000000\n", + "INFO:root:All known variables: [I_syn_exc, I_syn_inh, V_m, refr_t], all parameters used in ODEs: {I_stim, I_e, E_L, tau_syn_exc, C_m, tau_syn_inh, tau_m}\n", + "INFO:root:No numerical value specified for parameter \"I_stim\"\n", + "INFO:root:\n", + "Processing differential-equation form shape I_syn_exc with defining expression = \"(-I_syn_exc) / tau_syn_exc\"\n", + "DEBUG:root:Splitting expression -I_syn_exc/tau_syn_exc (symbols [I_syn_exc, I_syn_inh, V_m, refr_t, I_syn_exc])\n", + "DEBUG:root:\tlinear factors: Matrix([[-1/tau_syn_exc], [0], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Created Shape with symbol I_syn_exc, derivative_factors = [-1/tau_syn_exc], inhom_term = 0.0, nonlin_term = 0\n", + "INFO:root:\tReturning shape: Shape \"I_syn_exc\" of order 1\n", + "INFO:root:\n", + "Processing differential-equation form shape I_syn_inh with defining expression = \"(-I_syn_inh) / tau_syn_inh\"\n", + "DEBUG:root:Splitting expression -I_syn_inh/tau_syn_inh (symbols [I_syn_exc, I_syn_inh, V_m, refr_t, I_syn_exc, I_syn_inh])\n", + "DEBUG:root:\tlinear factors: Matrix([[0], [-1/tau_syn_inh], [0], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Created Shape with symbol I_syn_inh, derivative_factors = [-1/tau_syn_inh], inhom_term = 0.0, nonlin_term = 0\n", + "INFO:root:\tReturning shape: Shape \"I_syn_inh\" of order 1\n", + "INFO:root:\n", + "Processing differential-equation form shape V_m with defining expression = \"(-(V_m - E_L)) / tau_m + (I_syn_exc - I_syn_inh + I_e + I_stim) / C_m\"\n", + "DEBUG:root:Splitting expression (E_L - V_m)/tau_m + (I_e + I_stim + I_syn_exc - I_syn_inh)/C_m (symbols [I_syn_exc, I_syn_inh, V_m, refr_t, I_syn_exc, I_syn_inh, V_m])\n", + "DEBUG:root:\tlinear factors: Matrix([[1/C_m], [-1/C_m], [-1/tau_m], [0], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: E_L/tau_m + I_e/C_m + I_stim/C_m\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Created Shape with symbol V_m, derivative_factors = [-1/tau_m], inhom_term = E_L/tau_m + I_e/C_m + I_stim/C_m, nonlin_term = I_syn_exc/C_m - I_syn_inh/C_m\n", + "INFO:root:\tReturning shape: Shape \"V_m\" of order 1\n", + "INFO:root:\n", + "Processing differential-equation form shape refr_t with defining expression = \"(-1000.0) * 1.0 / 1000.0\"\n", + "DEBUG:root:Splitting expression -1.00000000000000 (symbols [I_syn_exc, I_syn_inh, V_m, refr_t, I_syn_exc, I_syn_inh, V_m, refr_t])\n", + "DEBUG:root:\tlinear factors: Matrix([[0], [0], [0], [0], [0], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: -1.00000000000000\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Created Shape with symbol refr_t, derivative_factors = [0], inhom_term = -1.00000000000000, nonlin_term = 0\n", + "INFO:root:\tReturning shape: Shape \"refr_t\" of order 1\n", + "INFO:root:Shape I_syn_exc: reconstituting expression -I_syn_exc/tau_syn_exc\n", + "DEBUG:root:Splitting expression -I_syn_exc/tau_syn_exc (symbols Matrix([[I_syn_exc], [I_syn_inh], [V_m], [refr_t]]))\n", + "DEBUG:root:\tlinear factors: Matrix([[-1/tau_syn_exc], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "INFO:root:Shape I_syn_inh: reconstituting expression -I_syn_inh/tau_syn_inh\n", + "DEBUG:root:Splitting expression -I_syn_inh/tau_syn_inh (symbols Matrix([[I_syn_exc], [I_syn_inh], [V_m], [refr_t]]))\n", + "DEBUG:root:\tlinear factors: Matrix([[0], [-1/tau_syn_inh], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "INFO:root:Shape V_m: reconstituting expression E_L/tau_m - V_m/tau_m + I_e/C_m + I_stim/C_m + I_syn_exc/C_m - I_syn_inh/C_m\n", + "DEBUG:root:Splitting expression E_L/tau_m - V_m/tau_m + I_e/C_m + I_stim/C_m + I_syn_exc/C_m - I_syn_inh/C_m (symbols Matrix([[I_syn_exc], [I_syn_inh], [V_m], [refr_t]]))\n", + "DEBUG:root:\tlinear factors: Matrix([[1/C_m], [-1/C_m], [-1/tau_m], [0]])\n", + "DEBUG:root:\tinhomogeneous term: E_L/tau_m + I_e/C_m + I_stim/C_m\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "INFO:root:Shape refr_t: reconstituting expression -1.00000000000000\n", + "DEBUG:root:Splitting expression -1.00000000000000 (symbols Matrix([[I_syn_exc], [I_syn_inh], [V_m], [refr_t]]))\n", + "DEBUG:root:\tlinear factors: Matrix([[0], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: -1.00000000000000\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Initializing system of shapes with x = Matrix([[I_syn_exc], [I_syn_inh], [V_m], [refr_t]]), A = Matrix([[-1/tau_syn_exc, 0, 0, 0], [0, -1/tau_syn_inh, 0, 0], [1/C_m, -1/C_m, -1/tau_m, 0], [0, 0, 0, 0]]), b = Matrix([[0], [0], [E_L/tau_m + I_e/C_m + I_stim/C_m], [-1.00000000000000]]), c = Matrix([[0], [0], [0], [0]])\n", + "INFO:root:Finding analytically solvable equations...\n", + "INFO:root:Shape I_syn_exc: reconstituting expression -I_syn_exc/tau_syn_exc\n", + "DEBUG:root:Splitting expression -I_syn_exc/tau_syn_exc (symbols [I_syn_exc, I_syn_inh, V_m, refr_t])\n", + "DEBUG:root:\tlinear factors: Matrix([[-1/tau_syn_exc], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "INFO:root:Shape I_syn_inh: reconstituting expression -I_syn_inh/tau_syn_inh\n", + "DEBUG:root:Splitting expression -I_syn_inh/tau_syn_inh (symbols [I_syn_exc, I_syn_inh, V_m, refr_t])\n", + "DEBUG:root:\tlinear factors: Matrix([[0], [-1/tau_syn_inh], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "INFO:root:Shape V_m: reconstituting expression E_L/tau_m - V_m/tau_m + I_e/C_m + I_stim/C_m + I_syn_exc/C_m - I_syn_inh/C_m\n", + "DEBUG:root:Splitting expression E_L/tau_m - V_m/tau_m + I_e/C_m + I_stim/C_m + I_syn_exc/C_m - I_syn_inh/C_m (symbols [I_syn_exc, I_syn_inh, V_m, refr_t])\n", + "DEBUG:root:\tlinear factors: Matrix([[1/C_m], [-1/C_m], [-1/tau_m], [0]])\n", + "DEBUG:root:\tinhomogeneous term: E_L/tau_m + I_e/C_m + I_stim/C_m\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "INFO:root:Shape refr_t: reconstituting expression -1.00000000000000\n", + "DEBUG:root:Splitting expression -1.00000000000000 (symbols [I_syn_exc, I_syn_inh, V_m, refr_t])\n", + "DEBUG:root:\tlinear factors: Matrix([[0], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: -1.00000000000000\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "INFO:root:Generating propagators for the following symbols: I_syn_exc, I_syn_inh, V_m, refr_t\n", + "DEBUG:root:Initializing system of shapes with x = Matrix([[I_syn_exc], [I_syn_inh], [V_m], [refr_t]]), A = Matrix([[-1/tau_syn_exc, 0, 0, 0], [0, -1/tau_syn_inh, 0, 0], [1/C_m, -1/C_m, -1/tau_m, 0], [0, 0, 0, 0]]), b = Matrix([[0], [0], [E_L/tau_m + I_e/C_m + I_stim/C_m], [-1.00000000000000]]), c = Matrix([[0], [0], [0], [0]])\n", + "WARNING:root:Under certain conditions, the propagator matrix is singular (contains infinities).\n", + "WARNING:root:List of all conditions that result in a singular propagator:\n", + "WARNING:root:\ttau_m = tau_syn_exc\n", + "WARNING:root:\ttau_m = tau_syn_inh\n", + "DEBUG:root:System of equations:\n", + "DEBUG:root:x = Matrix([[I_syn_exc], [I_syn_inh], [V_m], [refr_t]])\n", + "DEBUG:root:A = Matrix([\n", + "[-1/tau_syn_exc, 0, 0, 0],\n", + "[ 0, -1/tau_syn_inh, 0, 0],\n", + "[ 1/C_m, -1/C_m, -1/tau_m, 0],\n", + "[ 0, 0, 0, 0]])\n", + "DEBUG:root:b = Matrix([[0], [0], [E_L/tau_m + I_e/C_m + I_stim/C_m], [-1.00000000000000]])\n", + "DEBUG:root:c = Matrix([[0], [0], [0], [0]])\n", + "INFO:root:update_expr[I_syn_exc] = I_syn_exc*__P__I_syn_exc__I_syn_exc\n", + "INFO:root:update_expr[I_syn_inh] = I_syn_inh*__P__I_syn_inh__I_syn_inh\n", + "INFO:root:update_expr[V_m] = -E_L*__P__V_m__V_m + E_L + I_syn_exc*__P__V_m__I_syn_exc + I_syn_inh*__P__V_m__I_syn_inh + V_m*__P__V_m__V_m - I_e*__P__V_m__V_m*tau_m/C_m + I_e*tau_m/C_m - I_stim*__P__V_m__V_m*tau_m/C_m + I_stim*tau_m/C_m\n", + "INFO:root:update_expr[refr_t] = __P__refr_t__refr_t*refr_t - 1.0*__h\n", + "WARNING:root:Not preserving expression for variable \"I_syn_exc\" as it is solved by propagator solver\n", + "WARNING:root:Not preserving expression for variable \"I_syn_inh\" as it is solved by propagator solver\n", + "WARNING:root:Not preserving expression for variable \"V_m\" as it is solved by propagator solver\n", + "WARNING:root:Not preserving expression for variable \"refr_t\" as it is solved by propagator solver\n", + "INFO:root:In ode-toolbox: returning outdict = \n", + "INFO:root:[\n", + " {\n", + " \"initial_values\": {\n", + " \"I_syn_exc\": \"0\",\n", + " \"I_syn_inh\": \"0\",\n", + " \"V_m\": \"E_L\",\n", + " \"refr_t\": \"0\"\n", + " },\n", + " \"parameters\": {\n", + " \"C_m\": \"250.000000000000\",\n", + " \"E_L\": \"-70.0000000000000\",\n", + " \"I_e\": \"0\",\n", + " \"tau_m\": \"10.0000000000000\",\n", + " \"tau_syn_exc\": \"2.00000000000000\",\n", + " \"tau_syn_inh\": \"2.00000000000000\"\n", + " },\n", + " \"propagators\": {\n", + " \"__P__I_syn_exc__I_syn_exc\": \"exp(-__h/tau_syn_exc)\",\n", + " \"__P__I_syn_inh__I_syn_inh\": \"exp(-__h/tau_syn_inh)\",\n", + " \"__P__V_m__I_syn_exc\": \"tau_m*tau_syn_exc*(-exp(__h/tau_m) + exp(__h/tau_syn_exc))*exp(-__h*(tau_m + tau_syn_exc)/(tau_m*tau_syn_exc))/(C_m*(tau_m - tau_syn_exc))\",\n", + " \"__P__V_m__I_syn_inh\": \"tau_m*tau_syn_inh*(exp(__h/tau_m) - exp(__h/tau_syn_inh))*exp(-__h*(tau_m + tau_syn_inh)/(tau_m*tau_syn_inh))/(C_m*(tau_m - tau_syn_inh))\",\n", + " \"__P__V_m__V_m\": \"exp(-__h/tau_m)\",\n", + " \"__P__refr_t__refr_t\": \"1\"\n", + " },\n", + " \"solver\": \"analytical\",\n", + " \"state_variables\": [\n", + " \"I_syn_exc\",\n", + " \"I_syn_inh\",\n", + " \"V_m\",\n", + " \"refr_t\"\n", + " ],\n", + " \"update_expressions\": {\n", + " \"I_syn_exc\": \"I_syn_exc*__P__I_syn_exc__I_syn_exc\",\n", + " \"I_syn_inh\": \"I_syn_inh*__P__I_syn_inh__I_syn_inh\",\n", + " \"V_m\": \"-E_L*__P__V_m__V_m + E_L + I_syn_exc*__P__V_m__I_syn_exc + I_syn_inh*__P__V_m__I_syn_inh + V_m*__P__V_m__V_m - I_e*__P__V_m__V_m*tau_m/C_m + I_e*tau_m/C_m - I_stim*__P__V_m__V_m*tau_m/C_m + I_stim*tau_m/C_m\",\n", + " \"refr_t\": \"__P__refr_t__refr_t*refr_t - 1.0*__h\"\n", + " }\n", + " }\n", + "]\n", + "INFO:root:Analysing input:\n", + "INFO:root:{\n", + " \"dynamics\": [\n", + " {\n", + " \"expression\": \"I_syn_exc' = (-I_syn_exc) / tau_syn_exc\",\n", + " \"initial_values\": {\n", + " \"I_syn_exc\": \"0\"\n", + " }\n", + " },\n", + " {\n", + " \"expression\": \"I_syn_inh' = (-I_syn_inh) / tau_syn_inh\",\n", + " \"initial_values\": {\n", + " \"I_syn_inh\": \"0\"\n", + " }\n", + " },\n", + " {\n", + " \"expression\": \"V_m' = (-(V_m - E_L)) / tau_m + (I_syn_exc - I_syn_inh + I_e + I_stim) / C_m\",\n", + " \"initial_values\": {\n", + " \"V_m\": \"E_L\"\n", + " }\n", + " },\n", + " {\n", + " \"expression\": \"refr_t' = (-1000.0) * 1.0 / 1000.0\",\n", + " \"initial_values\": {\n", + " \"refr_t\": \"0\"\n", + " }\n", + " },\n", + " {\n", + " \"expression\": \"post_tr__for_neuromodulated_stdp_synapse_nestml' = (-post_tr__for_neuromodulated_stdp_synapse_nestml) / tau_tr_post__for_neuromodulated_stdp_synapse_nestml\",\n", + " \"initial_values\": {\n", + " \"post_tr__for_neuromodulated_stdp_synapse_nestml\": \"0.0\"\n", + " }\n", + " }\n", + " ],\n", + " \"options\": {\n", + " \"output_timestep_symbol\": \"__h\"\n", + " },\n", + " \"parameters\": {\n", + " \"C_m\": \"250\",\n", + " \"E_L\": \"(-70)\",\n", + " \"I_e\": \"0\",\n", + " \"V_reset\": \"(-70)\",\n", + " \"V_th\": \"(-55)\",\n", + " \"refr_T\": \"2\",\n", + " \"tau_m\": \"10\",\n", + " \"tau_syn_exc\": \"2\",\n", + " \"tau_syn_inh\": \"2\",\n", + " \"tau_tr_post__for_neuromodulated_stdp_synapse_nestml\": \"20\"\n", + " }\n", + "}\n", + "INFO:root:Processing global options...\n", + "INFO:root:Processing input shapes...\n", + "INFO:root:\n", + "Processing differential-equation form shape I_syn_exc with defining expression = \"(-I_syn_exc) / tau_syn_exc\"\n", + "DEBUG:root:Splitting expression -I_syn_exc/tau_syn_exc (symbols [I_syn_exc])\n", + "DEBUG:root:\tlinear factors: Matrix([[-1/tau_syn_exc]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Created Shape with symbol I_syn_exc, derivative_factors = [-1/tau_syn_exc], inhom_term = 0.0, nonlin_term = 0.0\n", + "INFO:root:\tReturning shape: Shape \"I_syn_exc\" of order 1\n", + "INFO:root:Shape I_syn_exc: reconstituting expression -I_syn_exc/tau_syn_exc\n", + "INFO:root:\n", + "Processing differential-equation form shape I_syn_inh with defining expression = \"(-I_syn_inh) / tau_syn_inh\"\n", + "DEBUG:root:Splitting expression -I_syn_inh/tau_syn_inh (symbols [I_syn_inh])\n", + "DEBUG:root:\tlinear factors: Matrix([[-1/tau_syn_inh]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Created Shape with symbol I_syn_inh, derivative_factors = [-1/tau_syn_inh], inhom_term = 0.0, nonlin_term = 0.0\n", + "INFO:root:\tReturning shape: Shape \"I_syn_inh\" of order 1\n", + "INFO:root:Shape I_syn_inh: reconstituting expression -I_syn_inh/tau_syn_inh\n", + "INFO:root:\n", + "Processing differential-equation form shape V_m with defining expression = \"(-(V_m - E_L)) / tau_m + (I_syn_exc - I_syn_inh + I_e + I_stim) / C_m\"\n", + "DEBUG:root:Splitting expression (E_L - V_m)/tau_m + (I_e + I_stim + I_syn_exc - I_syn_inh)/C_m (symbols [V_m])\n", + "DEBUG:root:\tlinear factors: Matrix([[-1/tau_m]])\n", + "DEBUG:root:\tinhomogeneous term: E_L/tau_m + I_e/C_m\n", + "DEBUG:root:\tnonlinear term: I_stim/C_m + I_syn_exc/C_m - I_syn_inh/C_m\n", + "DEBUG:root:Created Shape with symbol V_m, derivative_factors = [-1/tau_m], inhom_term = E_L/tau_m + I_e/C_m, nonlin_term = I_stim/C_m + I_syn_exc/C_m - I_syn_inh/C_m\n", + "INFO:root:\tReturning shape: Shape \"V_m\" of order 1\n", + "INFO:root:Shape V_m: reconstituting expression E_L/tau_m - V_m/tau_m + I_e/C_m + I_stim/C_m + I_syn_exc/C_m - I_syn_inh/C_m\n", + "INFO:root:\n", + "Processing differential-equation form shape refr_t with defining expression = \"(-1000.0) * 1.0 / 1000.0\"\n", + "DEBUG:root:Splitting expression -1.00000000000000 (symbols [refr_t])\n", + "DEBUG:root:\tlinear factors: Matrix([[0]])\n", + "DEBUG:root:\tinhomogeneous term: -1.00000000000000\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Created Shape with symbol refr_t, derivative_factors = [0], inhom_term = -1.00000000000000, nonlin_term = 0.0\n", + "INFO:root:\tReturning shape: Shape \"refr_t\" of order 1\n", + "INFO:root:Shape refr_t: reconstituting expression -1.00000000000000\n", + "INFO:root:\n", + "Processing differential-equation form shape post_tr__for_neuromodulated_stdp_synapse_nestml with defining expression = \"(-post_tr__for_neuromodulated_stdp_synapse_nestml) / tau_tr_post__for_neuromodulated_stdp_synapse_nestml\"\n", + "DEBUG:root:Splitting expression -post_tr__for_neuromodulated_stdp_synapse_nestml/tau_tr_post__for_neuromodulated_stdp_synapse_nestml (symbols [post_tr__for_neuromodulated_stdp_synapse_nestml])\n", + "DEBUG:root:\tlinear factors: Matrix([[-1/tau_tr_post__for_neuromodulated_stdp_synapse_nestml]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Created Shape with symbol post_tr__for_neuromodulated_stdp_synapse_nestml, derivative_factors = [-1/tau_tr_post__for_neuromodulated_stdp_synapse_nestml], inhom_term = 0.0, nonlin_term = 0.0\n", + "INFO:root:\tReturning shape: Shape \"post_tr__for_neuromodulated_stdp_synapse_nestml\" of order 1\n", + "INFO:root:Shape post_tr__for_neuromodulated_stdp_synapse_nestml: reconstituting expression -post_tr__for_neuromodulated_stdp_synapse_nestml/tau_tr_post__for_neuromodulated_stdp_synapse_nestml\n", + "INFO:root:All known variables: [I_syn_exc, I_syn_inh, V_m, refr_t, post_tr__for_neuromodulated_stdp_synapse_nestml], all parameters used in ODEs: {I_stim, tau_tr_post__for_neuromodulated_stdp_synapse_nestml, I_e, E_L, tau_syn_exc, C_m, tau_syn_inh, tau_m}\n", + "INFO:root:No numerical value specified for parameter \"I_stim\"\n", + "INFO:root:\n", + "Processing differential-equation form shape I_syn_exc with defining expression = \"(-I_syn_exc) / tau_syn_exc\"\n", + "DEBUG:root:Splitting expression -I_syn_exc/tau_syn_exc (symbols [I_syn_exc, I_syn_inh, V_m, refr_t, post_tr__for_neuromodulated_stdp_synapse_nestml, I_syn_exc])\n", + "DEBUG:root:\tlinear factors: Matrix([[-1/tau_syn_exc], [0], [0], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Created Shape with symbol I_syn_exc, derivative_factors = [-1/tau_syn_exc], inhom_term = 0.0, nonlin_term = 0\n", + "INFO:root:\tReturning shape: Shape \"I_syn_exc\" of order 1\n", + "INFO:root:\n", + "Processing differential-equation form shape I_syn_inh with defining expression = \"(-I_syn_inh) / tau_syn_inh\"\n", + "DEBUG:root:Splitting expression -I_syn_inh/tau_syn_inh (symbols [I_syn_exc, I_syn_inh, V_m, refr_t, post_tr__for_neuromodulated_stdp_synapse_nestml, I_syn_exc, I_syn_inh])\n", + "DEBUG:root:\tlinear factors: Matrix([[0], [-1/tau_syn_inh], [0], [0], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Created Shape with symbol I_syn_inh, derivative_factors = [-1/tau_syn_inh], inhom_term = 0.0, nonlin_term = 0\n", + "INFO:root:\tReturning shape: Shape \"I_syn_inh\" of order 1\n", + "INFO:root:\n", + "Processing differential-equation form shape V_m with defining expression = \"(-(V_m - E_L)) / tau_m + (I_syn_exc - I_syn_inh + I_e + I_stim) / C_m\"\n", + "DEBUG:root:Splitting expression (E_L - V_m)/tau_m + (I_e + I_stim + I_syn_exc - I_syn_inh)/C_m (symbols [I_syn_exc, I_syn_inh, V_m, refr_t, post_tr__for_neuromodulated_stdp_synapse_nestml, I_syn_exc, I_syn_inh, V_m])\n", + "DEBUG:root:\tlinear factors: Matrix([[1/C_m], [-1/C_m], [-1/tau_m], [0], [0], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: E_L/tau_m + I_e/C_m + I_stim/C_m\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Created Shape with symbol V_m, derivative_factors = [-1/tau_m], inhom_term = E_L/tau_m + I_e/C_m + I_stim/C_m, nonlin_term = I_syn_exc/C_m - I_syn_inh/C_m\n", + "INFO:root:\tReturning shape: Shape \"V_m\" of order 1\n", + "INFO:root:\n", + "Processing differential-equation form shape refr_t with defining expression = \"(-1000.0) * 1.0 / 1000.0\"\n", + "DEBUG:root:Splitting expression -1.00000000000000 (symbols [I_syn_exc, I_syn_inh, V_m, refr_t, post_tr__for_neuromodulated_stdp_synapse_nestml, I_syn_exc, I_syn_inh, V_m, refr_t])\n", + "DEBUG:root:\tlinear factors: Matrix([[0], [0], [0], [0], [0], [0], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: -1.00000000000000\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Created Shape with symbol refr_t, derivative_factors = [0], inhom_term = -1.00000000000000, nonlin_term = 0\n", + "INFO:root:\tReturning shape: Shape \"refr_t\" of order 1\n", + "INFO:root:\n", + "Processing differential-equation form shape post_tr__for_neuromodulated_stdp_synapse_nestml with defining expression = \"(-post_tr__for_neuromodulated_stdp_synapse_nestml) / tau_tr_post__for_neuromodulated_stdp_synapse_nestml\"\n", + "DEBUG:root:Splitting expression -post_tr__for_neuromodulated_stdp_synapse_nestml/tau_tr_post__for_neuromodulated_stdp_synapse_nestml (symbols [I_syn_exc, I_syn_inh, V_m, refr_t, post_tr__for_neuromodulated_stdp_synapse_nestml, I_syn_exc, I_syn_inh, V_m, refr_t, post_tr__for_neuromodulated_stdp_synapse_nestml])\n", + "DEBUG:root:\tlinear factors: Matrix([[0], [0], [0], [0], [-1/tau_tr_post__for_neuromodulated_stdp_synapse_nestml], [0], [0], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Created Shape with symbol post_tr__for_neuromodulated_stdp_synapse_nestml, derivative_factors = [-1/tau_tr_post__for_neuromodulated_stdp_synapse_nestml], inhom_term = 0.0, nonlin_term = 0\n", + "INFO:root:\tReturning shape: Shape \"post_tr__for_neuromodulated_stdp_synapse_nestml\" of order 1\n", + "INFO:root:Shape I_syn_exc: reconstituting expression -I_syn_exc/tau_syn_exc\n", + "DEBUG:root:Splitting expression -I_syn_exc/tau_syn_exc (symbols Matrix([[I_syn_exc], [I_syn_inh], [V_m], [refr_t], [post_tr__for_neuromodulated_stdp_synapse_nestml]]))\n", + "DEBUG:root:\tlinear factors: Matrix([[-1/tau_syn_exc], [0], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "INFO:root:Shape I_syn_inh: reconstituting expression -I_syn_inh/tau_syn_inh\n", + "DEBUG:root:Splitting expression -I_syn_inh/tau_syn_inh (symbols Matrix([[I_syn_exc], [I_syn_inh], [V_m], [refr_t], [post_tr__for_neuromodulated_stdp_synapse_nestml]]))\n", + "DEBUG:root:\tlinear factors: Matrix([[0], [-1/tau_syn_inh], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "INFO:root:Shape V_m: reconstituting expression E_L/tau_m - V_m/tau_m + I_e/C_m + I_stim/C_m + I_syn_exc/C_m - I_syn_inh/C_m\n", + "DEBUG:root:Splitting expression E_L/tau_m - V_m/tau_m + I_e/C_m + I_stim/C_m + I_syn_exc/C_m - I_syn_inh/C_m (symbols Matrix([[I_syn_exc], [I_syn_inh], [V_m], [refr_t], [post_tr__for_neuromodulated_stdp_synapse_nestml]]))\n", + "DEBUG:root:\tlinear factors: Matrix([[1/C_m], [-1/C_m], [-1/tau_m], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: E_L/tau_m + I_e/C_m + I_stim/C_m\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "INFO:root:Shape refr_t: reconstituting expression -1.00000000000000\n", + "DEBUG:root:Splitting expression -1.00000000000000 (symbols Matrix([[I_syn_exc], [I_syn_inh], [V_m], [refr_t], [post_tr__for_neuromodulated_stdp_synapse_nestml]]))\n", + "DEBUG:root:\tlinear factors: Matrix([[0], [0], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: -1.00000000000000\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "INFO:root:Shape post_tr__for_neuromodulated_stdp_synapse_nestml: reconstituting expression -post_tr__for_neuromodulated_stdp_synapse_nestml/tau_tr_post__for_neuromodulated_stdp_synapse_nestml\n", + "DEBUG:root:Splitting expression -post_tr__for_neuromodulated_stdp_synapse_nestml/tau_tr_post__for_neuromodulated_stdp_synapse_nestml (symbols Matrix([[I_syn_exc], [I_syn_inh], [V_m], [refr_t], [post_tr__for_neuromodulated_stdp_synapse_nestml]]))\n", + "DEBUG:root:\tlinear factors: Matrix([[0], [0], [0], [0], [-1/tau_tr_post__for_neuromodulated_stdp_synapse_nestml]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Initializing system of shapes with x = Matrix([[I_syn_exc], [I_syn_inh], [V_m], [refr_t], [post_tr__for_neuromodulated_stdp_synapse_nestml]]), A = Matrix([[-1/tau_syn_exc, 0, 0, 0, 0], [0, -1/tau_syn_inh, 0, 0, 0], [1/C_m, -1/C_m, -1/tau_m, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, -1/tau_tr_post__for_neuromodulated_stdp_synapse_nestml]]), b = Matrix([[0], [0], [E_L/tau_m + I_e/C_m + I_stim/C_m], [-1.00000000000000], [0]]), c = Matrix([[0], [0], [0], [0], [0]])\n", + "INFO:root:Finding analytically solvable equations...\n", + "INFO:root:Shape I_syn_exc: reconstituting expression -I_syn_exc/tau_syn_exc\n", + "DEBUG:root:Splitting expression -I_syn_exc/tau_syn_exc (symbols [I_syn_exc, I_syn_inh, V_m, refr_t, post_tr__for_neuromodulated_stdp_synapse_nestml])\n", + "DEBUG:root:\tlinear factors: Matrix([[-1/tau_syn_exc], [0], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "INFO:root:Shape I_syn_inh: reconstituting expression -I_syn_inh/tau_syn_inh\n", + "DEBUG:root:Splitting expression -I_syn_inh/tau_syn_inh (symbols [I_syn_exc, I_syn_inh, V_m, refr_t, post_tr__for_neuromodulated_stdp_synapse_nestml])\n", + "DEBUG:root:\tlinear factors: Matrix([[0], [-1/tau_syn_inh], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "INFO:root:Shape V_m: reconstituting expression E_L/tau_m - V_m/tau_m + I_e/C_m + I_stim/C_m + I_syn_exc/C_m - I_syn_inh/C_m\n", + "DEBUG:root:Splitting expression E_L/tau_m - V_m/tau_m + I_e/C_m + I_stim/C_m + I_syn_exc/C_m - I_syn_inh/C_m (symbols [I_syn_exc, I_syn_inh, V_m, refr_t, post_tr__for_neuromodulated_stdp_synapse_nestml])\n", + "DEBUG:root:\tlinear factors: Matrix([[1/C_m], [-1/C_m], [-1/tau_m], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: E_L/tau_m + I_e/C_m + I_stim/C_m\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "INFO:root:Shape refr_t: reconstituting expression -1.00000000000000\n", + "DEBUG:root:Splitting expression -1.00000000000000 (symbols [I_syn_exc, I_syn_inh, V_m, refr_t, post_tr__for_neuromodulated_stdp_synapse_nestml])\n", + "DEBUG:root:\tlinear factors: Matrix([[0], [0], [0], [0], [0]])\n", + "DEBUG:root:\tinhomogeneous term: -1.00000000000000\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "INFO:root:Shape post_tr__for_neuromodulated_stdp_synapse_nestml: reconstituting expression -post_tr__for_neuromodulated_stdp_synapse_nestml/tau_tr_post__for_neuromodulated_stdp_synapse_nestml\n", + "DEBUG:root:Splitting expression -post_tr__for_neuromodulated_stdp_synapse_nestml/tau_tr_post__for_neuromodulated_stdp_synapse_nestml (symbols [I_syn_exc, I_syn_inh, V_m, refr_t, post_tr__for_neuromodulated_stdp_synapse_nestml])\n", + "DEBUG:root:\tlinear factors: Matrix([[0], [0], [0], [0], [-1/tau_tr_post__for_neuromodulated_stdp_synapse_nestml]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "INFO:root:Generating propagators for the following symbols: I_syn_exc, I_syn_inh, V_m, refr_t, post_tr__for_neuromodulated_stdp_synapse_nestml\n", + "DEBUG:root:Initializing system of shapes with x = Matrix([[I_syn_exc], [I_syn_inh], [V_m], [refr_t], [post_tr__for_neuromodulated_stdp_synapse_nestml]]), A = Matrix([[-1/tau_syn_exc, 0, 0, 0, 0], [0, -1/tau_syn_inh, 0, 0, 0], [1/C_m, -1/C_m, -1/tau_m, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, -1/tau_tr_post__for_neuromodulated_stdp_synapse_nestml]]), b = Matrix([[0], [0], [E_L/tau_m + I_e/C_m + I_stim/C_m], [-1.00000000000000], [0]]), c = Matrix([[0], [0], [0], [0], [0]])\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[36,GLOBAL, INFO]: Analysing/transforming model 'iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml'\n", + "[37,iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml, INFO, [55:0;108:0]]: Starts processing of the model 'iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml'\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:root:Under certain conditions, the propagator matrix is singular (contains infinities).\n", + "WARNING:root:List of all conditions that result in a singular propagator:\n", + "WARNING:root:\ttau_m = tau_syn_exc\n", + "WARNING:root:\ttau_m = tau_syn_inh\n", + "DEBUG:root:System of equations:\n", + "DEBUG:root:x = Matrix([[I_syn_exc], [I_syn_inh], [V_m], [refr_t], [post_tr__for_neuromodulated_stdp_synapse_nestml]])\n", + "DEBUG:root:A = Matrix([\n", + "[-1/tau_syn_exc, 0, 0, 0, 0],\n", + "[ 0, -1/tau_syn_inh, 0, 0, 0],\n", + "[ 1/C_m, -1/C_m, -1/tau_m, 0, 0],\n", + "[ 0, 0, 0, 0, 0],\n", + "[ 0, 0, 0, 0, -1/tau_tr_post__for_neuromodulated_stdp_synapse_nestml]])\n", + "DEBUG:root:b = Matrix([[0], [0], [E_L/tau_m + I_e/C_m + I_stim/C_m], [-1.00000000000000], [0]])\n", + "DEBUG:root:c = Matrix([[0], [0], [0], [0], [0]])\n", + "INFO:root:update_expr[I_syn_exc] = I_syn_exc*__P__I_syn_exc__I_syn_exc\n", + "INFO:root:update_expr[I_syn_inh] = I_syn_inh*__P__I_syn_inh__I_syn_inh\n", + "INFO:root:update_expr[V_m] = -E_L*__P__V_m__V_m + E_L + I_syn_exc*__P__V_m__I_syn_exc + I_syn_inh*__P__V_m__I_syn_inh + V_m*__P__V_m__V_m - I_e*__P__V_m__V_m*tau_m/C_m + I_e*tau_m/C_m - I_stim*__P__V_m__V_m*tau_m/C_m + I_stim*tau_m/C_m\n", + "INFO:root:update_expr[refr_t] = __P__refr_t__refr_t*refr_t - 1.0*__h\n", + "INFO:root:update_expr[post_tr__for_neuromodulated_stdp_synapse_nestml] = __P__post_tr__for_neuromodulated_stdp_synapse_nestml__post_tr__for_neuromodulated_stdp_synapse_nestml*post_tr__for_neuromodulated_stdp_synapse_nestml\n", + "WARNING:root:Not preserving expression for variable \"I_syn_exc\" as it is solved by propagator solver\n", + "WARNING:root:Not preserving expression for variable \"I_syn_inh\" as it is solved by propagator solver\n", + "WARNING:root:Not preserving expression for variable \"V_m\" as it is solved by propagator solver\n", + "WARNING:root:Not preserving expression for variable \"refr_t\" as it is solved by propagator solver\n", + "WARNING:root:Not preserving expression for variable \"post_tr__for_neuromodulated_stdp_synapse_nestml\" as it is solved by propagator solver\n", + "INFO:root:In ode-toolbox: returning outdict = \n", + "INFO:root:[\n", + " {\n", + " \"initial_values\": {\n", + " \"I_syn_exc\": \"0\",\n", + " \"I_syn_inh\": \"0\",\n", + " \"V_m\": \"E_L\",\n", + " \"post_tr__for_neuromodulated_stdp_synapse_nestml\": \"0.0\",\n", + " \"refr_t\": \"0\"\n", + " },\n", + " \"parameters\": {\n", + " \"C_m\": \"250.000000000000\",\n", + " \"E_L\": \"-70.0000000000000\",\n", + " \"I_e\": \"0\",\n", + " \"tau_m\": \"10.0000000000000\",\n", + " \"tau_syn_exc\": \"2.00000000000000\",\n", + " \"tau_syn_inh\": \"2.00000000000000\",\n", + " \"tau_tr_post__for_neuromodulated_stdp_synapse_nestml\": \"20.0000000000000\"\n", + " },\n", + " \"propagators\": {\n", + " \"__P__I_syn_exc__I_syn_exc\": \"exp(-__h/tau_syn_exc)\",\n", + " \"__P__I_syn_inh__I_syn_inh\": \"exp(-__h/tau_syn_inh)\",\n", + " \"__P__V_m__I_syn_exc\": \"tau_m*tau_syn_exc*(-exp(__h/tau_m) + exp(__h/tau_syn_exc))*exp(-__h*(tau_m + tau_syn_exc)/(tau_m*tau_syn_exc))/(C_m*(tau_m - tau_syn_exc))\",\n", + " \"__P__V_m__I_syn_inh\": \"tau_m*tau_syn_inh*(exp(__h/tau_m) - exp(__h/tau_syn_inh))*exp(-__h*(tau_m + tau_syn_inh)/(tau_m*tau_syn_inh))/(C_m*(tau_m - tau_syn_inh))\",\n", + " \"__P__V_m__V_m\": \"exp(-__h/tau_m)\",\n", + " \"__P__post_tr__for_neuromodulated_stdp_synapse_nestml__post_tr__for_neuromodulated_stdp_synapse_nestml\": \"exp(-__h/tau_tr_post__for_neuromodulated_stdp_synapse_nestml)\",\n", + " \"__P__refr_t__refr_t\": \"1\"\n", + " },\n", + " \"solver\": \"analytical\",\n", + " \"state_variables\": [\n", + " \"I_syn_exc\",\n", + " \"I_syn_inh\",\n", + " \"V_m\",\n", + " \"refr_t\",\n", + " \"post_tr__for_neuromodulated_stdp_synapse_nestml\"\n", + " ],\n", + " \"update_expressions\": {\n", + " \"I_syn_exc\": \"I_syn_exc*__P__I_syn_exc__I_syn_exc\",\n", + " \"I_syn_inh\": \"I_syn_inh*__P__I_syn_inh__I_syn_inh\",\n", + " \"V_m\": \"-E_L*__P__V_m__V_m + E_L + I_syn_exc*__P__V_m__I_syn_exc + I_syn_inh*__P__V_m__I_syn_inh + V_m*__P__V_m__V_m - I_e*__P__V_m__V_m*tau_m/C_m + I_e*tau_m/C_m - I_stim*__P__V_m__V_m*tau_m/C_m + I_stim*tau_m/C_m\",\n", + " \"post_tr__for_neuromodulated_stdp_synapse_nestml\": \"__P__post_tr__for_neuromodulated_stdp_synapse_nestml__post_tr__for_neuromodulated_stdp_synapse_nestml*post_tr__for_neuromodulated_stdp_synapse_nestml\",\n", + " \"refr_t\": \"__P__refr_t__refr_t*refr_t - 1.0*__h\"\n", + " }\n", + " }\n", + "]\n", + "INFO:root:Analysing input:\n", + "INFO:root:{\n", + " \"dynamics\": [\n", + " {\n", + " \"expression\": \"pre_tr' = (-pre_tr) / tau_tr_pre\",\n", + " \"initial_values\": {\n", + " \"pre_tr\": \"0.0\"\n", + " }\n", + " }\n", + " ],\n", + " \"options\": {\n", + " \"output_timestep_symbol\": \"__h\"\n", + " },\n", + " \"parameters\": {\n", + " \"A_minus\": \"1.5\",\n", + " \"A_plus\": \"1.0\",\n", + " \"Wmax\": \"200.0\",\n", + " \"Wmin\": \"0.0\",\n", + " \"b\": \"0.0\",\n", + " \"d\": \"1\",\n", + " \"tau_c\": \"1000\",\n", + " \"tau_n\": \"200\",\n", + " \"tau_tr_post\": \"20\",\n", + " \"tau_tr_pre\": \"20\"\n", + " }\n", + "}\n", + "INFO:root:Processing global options...\n", + "INFO:root:Processing input shapes...\n", + "INFO:root:\n", + "Processing differential-equation form shape pre_tr with defining expression = \"(-pre_tr) / tau_tr_pre\"\n", + "DEBUG:root:Splitting expression -pre_tr/tau_tr_pre (symbols [pre_tr])\n", + "DEBUG:root:\tlinear factors: Matrix([[-1/tau_tr_pre]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Created Shape with symbol pre_tr, derivative_factors = [-1/tau_tr_pre], inhom_term = 0.0, nonlin_term = 0.0\n", + "INFO:root:\tReturning shape: Shape \"pre_tr\" of order 1\n", + "INFO:root:Shape pre_tr: reconstituting expression -pre_tr/tau_tr_pre\n", + "INFO:root:All known variables: [pre_tr], all parameters used in ODEs: {tau_tr_pre}\n", + "INFO:root:\n", + "Processing differential-equation form shape pre_tr with defining expression = \"(-pre_tr) / tau_tr_pre\"\n", + "DEBUG:root:Splitting expression -pre_tr/tau_tr_pre (symbols [pre_tr, pre_tr])\n", + "DEBUG:root:\tlinear factors: Matrix([[-1/tau_tr_pre], [0]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Created Shape with symbol pre_tr, derivative_factors = [-1/tau_tr_pre], inhom_term = 0.0, nonlin_term = 0\n", + "INFO:root:\tReturning shape: Shape \"pre_tr\" of order 1\n", + "INFO:root:Shape pre_tr: reconstituting expression -pre_tr/tau_tr_pre\n", + "DEBUG:root:Splitting expression -pre_tr/tau_tr_pre (symbols Matrix([[pre_tr]]))\n", + "DEBUG:root:\tlinear factors: Matrix([[-1/tau_tr_pre]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "DEBUG:root:Initializing system of shapes with x = Matrix([[pre_tr]]), A = Matrix([[-1/tau_tr_pre]]), b = Matrix([[0]]), c = Matrix([[0]])\n", + "INFO:root:Finding analytically solvable equations...\n", + "INFO:root:Shape pre_tr: reconstituting expression -pre_tr/tau_tr_pre\n", + "DEBUG:root:Splitting expression -pre_tr/tau_tr_pre (symbols [pre_tr])\n", + "DEBUG:root:\tlinear factors: Matrix([[-1/tau_tr_pre]])\n", + "DEBUG:root:\tinhomogeneous term: 0.0\n", + "DEBUG:root:\tnonlinear term: 0.0\n", + "INFO:root:Generating propagators for the following symbols: pre_tr\n", + "DEBUG:root:Initializing system of shapes with x = Matrix([[pre_tr]]), A = Matrix([[-1/tau_tr_pre]]), b = Matrix([[0]]), c = Matrix([[0]])\n", + "DEBUG:root:System of equations:\n", + "DEBUG:root:x = Matrix([[pre_tr]])\n", + "DEBUG:root:A = Matrix([[-1/tau_tr_pre]])\n", + "DEBUG:root:b = Matrix([[0]])\n", + "DEBUG:root:c = Matrix([[0]])\n", + "INFO:root:update_expr[pre_tr] = __P__pre_tr__pre_tr*pre_tr\n", + "WARNING:root:Not preserving expression for variable \"pre_tr\" as it is solved by propagator solver\n", + "INFO:root:In ode-toolbox: returning outdict = \n", + "INFO:root:[\n", + " {\n", + " \"initial_values\": {\n", + " \"pre_tr\": \"0.0\"\n", + " },\n", + " \"parameters\": {\n", + " \"tau_tr_pre\": \"20.0000000000000\"\n", + " },\n", + " \"propagators\": {\n", + " \"__P__pre_tr__pre_tr\": \"exp(-__h/tau_tr_pre)\"\n", + " },\n", + " \"solver\": \"analytical\",\n", + " \"state_variables\": [\n", + " \"pre_tr\"\n", + " ],\n", + " \"update_expressions\": {\n", + " \"pre_tr\": \"__P__pre_tr__pre_tr*pre_tr\"\n", + " }\n", + " }\n", + "]\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[38,GLOBAL, INFO]: Analysing/transforming synapse neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.\n", + "[39,neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml, INFO, [26:0;88:0]]: Starts processing of the model 'neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml'\n", + "[40,neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml, WARNING, [35:8;35:17]]: Variable 'd' has the same name as a physical unit!\n", + "[41,neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml, INFO, [62:13;62:18]]: Implicit casting from (compatible) type '1 / ms' to 'real'.\n", + "[42,neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml, INFO, [83:13;84:59]]: Implicit casting from (compatible) type 'ms' to 'real'.\n", + "[43,neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml, WARNING, [35:8;35:17]]: Variable 'd' has the same name as a physical unit!\n", + "[44,neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml, INFO, [62:13;62:18]]: Implicit casting from (compatible) type '1 / ms' to 'real'.\n", + "[45,neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml, INFO, [83:13;84:59]]: Implicit casting from (compatible) type 'ms' to 'real'.\n", + "[46,GLOBAL, INFO]: Rendering template /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml.cpp\n", + "[47,GLOBAL, INFO]: Rendering template /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml.h\n", + "[48,iaf_psc_exp_neuron_nestml, INFO, [55:0;108:0]]: Successfully generated code for the model: 'iaf_psc_exp_neuron_nestml' in: '/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target' !\n", + "[49,GLOBAL, INFO]: Rendering template /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml.cpp\n", + "[50,GLOBAL, INFO]: Rendering template /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml.h\n", + "[51,iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml, INFO, [55:0;108:0]]: Successfully generated code for the model: 'iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml' in: '/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target' !\n", + "[52,GLOBAL, INFO]: Rendering template /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h\n", + "[53,neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml, INFO, [26:0;88:0]]: Successfully generated code for the model: 'neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml' in: '/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target' !\n", + "[54,GLOBAL, INFO]: Rendering template /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/CMakeLists.txt\n", + "[55,GLOBAL, INFO]: Rendering template /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/nestml_63e9d96f65564460ad7732aa55581816_module.h\n", + "[56,GLOBAL, INFO]: Rendering template /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/nestml_63e9d96f65564460ad7732aa55581816_module.cpp\n", + "[57,GLOBAL, INFO]: Successfully generated NEST module code in '/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target' !\n", + "\u001b[33mCMake Warning (dev) at CMakeLists.txt:95 (project):\n", + " cmake_minimum_required() should be called prior to this top-level project()\n", + " call. Please see the cmake-commands(7) manual for usage documentation of\n", + " both commands.\n", + "This warning is for project developers. Use -Wno-dev to suppress it.\n", + "\u001b[0m\n", + "-- The CXX compiler identification is Clang 17.0.6\n", + "-- Detecting CXX compiler ABI info\n", + "-- Detecting CXX compiler ABI info - done\n", + "-- Check for working CXX compiler: /opt/homebrew/anaconda3/envs/.venv/bin/arm64-apple-darwin20.0.0-clang++ - skipped\n", + "-- Detecting CXX compile features\n", + "-- Detecting CXX compile features - done\n", + "\u001b[0m\u001b[0m\n", + "\u001b[0m-------------------------------------------------------\u001b[0m\n", + "\u001b[0mnestml_63e9d96f65564460ad7732aa55581816_module Configuration Summary\u001b[0m\n", + "\u001b[0m-------------------------------------------------------\u001b[0m\n", + "\u001b[0m\u001b[0m\n", + "\u001b[0mC++ compiler : /opt/homebrew/anaconda3/envs/.venv/bin/arm64-apple-darwin20.0.0-clang++\u001b[0m\n", + "\u001b[0mBuild static libs : OFF\u001b[0m\n", + "\u001b[0mC++ compiler flags : -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /opt/homebrew/anaconda3/envs/.venv/include\u001b[0m\n", + "\u001b[0mNEST compiler flags : -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /opt/homebrew/anaconda3/envs/.venv/include -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/nest-simulator_1724732993440/work=/usr/local/src/conda/nest-simulator-3.8 -fdebug-prefix-map=/opt/homebrew/anaconda3/envs/.venv=/usr/local/src/conda-prefix -std=c++17 -Wall -Xclang -fopenmp -O2\u001b[0m\n", + "\u001b[0mNEST include dirs : -I/opt/homebrew/anaconda3/envs/.venv/include/nest -I/opt/homebrew/anaconda3/envs/.venv/include -I/opt/homebrew/anaconda3/envs/.venv/include -I/opt/homebrew/anaconda3/envs/.venv/include -I/opt/homebrew/anaconda3/envs/.venv/include\u001b[0m\n", + "\u001b[0mNEST libraries flags : -L/opt/homebrew/anaconda3/envs/.venv/lib/nest -lnest -lsli /opt/homebrew/anaconda3/envs/.venv/lib/libltdl.dylib /opt/homebrew/anaconda3/envs/.venv/lib/libreadline.dylib /opt/homebrew/anaconda3/envs/.venv/lib/libncurses.dylib /opt/homebrew/anaconda3/envs/.venv/lib/libgsl.dylib /opt/homebrew/anaconda3/envs/.venv/lib/libgslcblas.dylib /opt/homebrew/anaconda3/envs/.venv/lib/libomp.dylib\u001b[0m\n", + "\u001b[0m\u001b[0m\n", + "\u001b[0m-------------------------------------------------------\u001b[0m\n", + "\u001b[0m\u001b[0m\n", + "\u001b[0mYou can now build and install 'nestml_63e9d96f65564460ad7732aa55581816_module' using\u001b[0m\n", + "\u001b[0m make\u001b[0m\n", + "\u001b[0m make install\u001b[0m\n", + "\u001b[0m\u001b[0m\n", + "\u001b[0mThe library file libnestml_63e9d96f65564460ad7732aa55581816_module.so will be installed to\u001b[0m\n", + "\u001b[0m /var/folders/3h/2lc1zrkd375b1l0m8zcfj6440000gn/T/nestml_target_zk0k5qqz\u001b[0m\n", + "\u001b[0mThe module can be loaded into NEST using\u001b[0m\n", + "\u001b[0m (nestml_63e9d96f65564460ad7732aa55581816_module) Install (in SLI)\u001b[0m\n", + "\u001b[0m nest.Install(nestml_63e9d96f65564460ad7732aa55581816_module) (in PyNEST)\u001b[0m\n", + "\u001b[0m\u001b[0m\n", + "\u001b[33mCMake Warning (dev) in CMakeLists.txt:\n", + " No cmake_minimum_required command is present. A line of code such as\n", + "\n", + " cmake_minimum_required(VERSION 3.31)\n", + "\n", + " should be added at the top of the file. The version specified may be lower\n", + " if you wish to support older CMake versions for this project. For more\n", + " information run \"cmake --help-policy CMP0000\".\n", + "This warning is for project developers. Use -Wno-dev to suppress it.\n", + "\u001b[0m\n", + "-- Configuring done (0.3s)\n", + "-- Generating done (0.0s)\n", + "-- Build files have been written to: /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target\n", + "[ 75%] \u001b[32mBuilding CXX object CMakeFiles/nestml_63e9d96f65564460ad7732aa55581816_module_module.dir/iaf_psc_exp_neuron_nestml.o\u001b[0m\n", + "[ 75%] \u001b[32mBuilding CXX object CMakeFiles/nestml_63e9d96f65564460ad7732aa55581816_module_module.dir/iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml.o\u001b[0m\n", + "[ 75%] \u001b[32mBuilding CXX object CMakeFiles/nestml_63e9d96f65564460ad7732aa55581816_module_module.dir/nestml_63e9d96f65564460ad7732aa55581816_module.o\u001b[0m\n", + "In file included from /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/nestml_63e9d96f65564460ad7732aa55581816_module.cpp:31:\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml.h:275:17: warning: 'iaf_psc_exp_neuron_nestml::get_C_m' hides overloaded virtual function [-Woverloaded-virtual]\n", + " 275 | inline double get_C_m() const\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/node.h:797:18: note: hidden overloaded virtual function 'nest::Node::get_C_m' declared here: different number of parameters (1 vs 0)\n", + " 797 | virtual double get_C_m( int comp );\n", + " | ^\n", + "In file included from /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml.cpp:44:\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml.h:275:17: warning: 'iaf_psc_exp_neuron_nestml::get_C_m' hides overloaded virtual function [-Woverloaded-virtual]\n", + " 275 | inline double get_C_m() const\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/node.h:797:18: note: hidden overloaded virtual function 'nest::Node::get_C_m' declared here: different number of parameters (1 vs 0)\n", + " 797 | virtual double get_C_m( int comp );\n", + " | ^\n", + "In file included from /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml.cpp:44:\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml.h:332:17: warning: 'iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml::get_C_m' hides overloaded virtual function [-Woverloaded-virtual]\n", + " 332 | inline double get_C_m() const\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/node.h:797:18: note: hidden overloaded virtual function 'nest::Node::get_C_m' declared here: different number of parameters (1 vs 0)\n", + " 797 | virtual double get_C_m( int comp );\n", + " | ^\n", + "In file included from /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml.cpp:44:\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml.h:272:8: warning: 'register_stdp_connection' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]\n", + " 272 | void register_stdp_connection( double t_first_read, double delay );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/node.h:482:16: note: overridden virtual function is here\n", + " 482 | virtual void register_stdp_connection( double, double );\n", + " | ^\n", + "In file included from /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/nestml_63e9d96f65564460ad7732aa55581816_module.cpp:33:\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml.h:332:17: warning: 'iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml::get_C_m' hides overloaded virtual function [-Woverloaded-virtual]\n", + " 332 | inline double get_C_m() const\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/node.h:797:18: note: hidden overloaded virtual function 'nest::Node::get_C_m' declared here: different number of parameters (1 vs 0)\n", + " 797 | virtual double get_C_m( int comp );\n", + " | ^\n", + "In file included from /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/nestml_63e9d96f65564460ad7732aa55581816_module.cpp:33:\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml.h:272:8: warning: 'register_stdp_connection' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]\n", + " 272 | void register_stdp_connection( double t_first_read, double delay );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/node.h:482:16: note: overridden virtual function is here\n", + " 482 | virtual void register_stdp_connection( double, double );\n", + " | ^\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml.cpp:188:16: warning: unused variable '__timestep' [-Wunused-variable]\n", + " 188 | const double __timestep = nest::Time::get_resolution().get_ms(); // do not remove, this is necessary for the timestep() function\n", + " | ^~~~~~~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml.cpp:233:16: warning: unused variable '__timestep' [-Wunused-variable]\n", + " 233 | const double __timestep = nest::Time::get_resolution().get_ms(); // do not remove, this is necessary for the timestep() function\n", + " | ^~~~~~~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml.cpp:286:10: warning: unused variable 'get_t' [-Wunused-variable]\n", + " 286 | auto get_t = [origin, lag](){ return nest::Time( nest::Time::step( origin.get_steps() + lag + 1) ).get_ms(); };\n", + " | ^~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml.cpp:280:16: warning: unused variable '__timestep' [-Wunused-variable]\n", + " 280 | const double __timestep = nest::Time::get_resolution().get_ms(); // do not remove, this is necessary for the timestep() function\n", + " | ^~~~~~~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml.cpp:461:16: warning: unused variable '__timestep' [-Wunused-variable]\n", + " 461 | const double __timestep = nest::Time::get_resolution().get_ms(); // do not remove, this is necessary for the timestep() function \n", + " | ^~~~~~~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml.cpp:469:16: warning: unused variable '__timestep' [-Wunused-variable]\n", + " 469 | const double __timestep = nest::Time::get_resolution().get_ms(); // do not remove, this is necessary for the timestep() function \n", + " | ^~~~~~~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml.cpp:198:16: warning: unused variable '__timestep' [-Wunused-variable]\n", + " 198 | const double __timestep = nest::Time::get_resolution().get_ms(); // do not remove, this is necessary for the timestep() function\n", + " | ^~~~~~~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml.cpp:252:16: warning: unused variable '__timestep' [-Wunused-variable]\n", + " 252 | const double __timestep = nest::Time::get_resolution().get_ms(); // do not remove, this is necessary for the timestep() function\n", + " | ^~~~~~~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml.cpp:307:10: warning: unused variable 'get_t' [-Wunused-variable]\n", + " 307 | auto get_t = [origin, lag](){ return nest::Time( nest::Time::step( origin.get_steps() + lag + 1) ).get_ms(); };\n", + " | ^~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml.cpp:301:16: warning: unused variable '__timestep' [-Wunused-variable]\n", + " 301 | const double __timestep = nest::Time::get_resolution().get_ms(); // do not remove, this is necessary for the timestep() function\n", + " | ^~~~~~~~~~\n", + "In file included from /Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/nestml_63e9d96f65564460ad7732aa55581816_module.cpp:36:\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:525:18: warning: unused variable '__timestep' [-Wunused-variable]\n", + " 525 | const double __timestep = nest::Time::get_resolution().get_ms(); // do not remove, this is necessary for the timestep() function\n", + " | ^~~~~~~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:550:12: warning: variable 'timestep' set but not used [-Wunused-but-set-variable]\n", + " 550 | double timestep = 0;\n", + " | ^\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:725:12: warning: unused variable 'cd' [-Wunused-variable]\n", + " 725 | double cd;\n", + " | ^~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:876:16: warning: unused variable '__timestep' [-Wunused-variable]\n", + " 876 | const double __timestep = nest::Time::get_resolution().get_ms(); // do not remove, this is necessary for the timestep() fu/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml.cpp:484:16: warning: unused variable '__timestep' [-Wunused-variable]\n", + "nction\n", + " | ^~~~~~~~~~\n", + " 484 | const double __timestep = nest::Time::get_resolution().get_ms(); // do not remove, this is necessary for the timestep() funct/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:889:16: warning: unused variable '__timestep' [-Wunused-variable]\n", + " 889 | const doiuble _o_tni m e\n", + "s t| ^~~~~~~~~~\n", + "ep = nest::Time::get_resolution().get_ms(); // do not remove, this is necessary for the timestep() function\n", + " | ^~~~~~~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml.cpp:492:16: warning: unused variable '__timestep' [-Wunused-variable]\n", + " 492 | const double __timestep = nest::Time::get_resolution().get_ms(); // do not remove, this is necessary for the timestep() function \n", + " | ^~~~~~~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:1035:18: warning: unused variable '_tr_t' [-Wunused-variable]\n", + " 1035 | const double _tr_t = start->t_; \n", + " | ^~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:1017:10: warning: unused variable 'timestep' [-Wunused-variable]\n", + " 1017 | double timestep = 0;\n", + " | ^~~~~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:527:10: warning: unused variable 'get_thread' [-Wunused-variable]\n", + " 527 | auto get_thread = [tid]()\n", + " | ^~~~~~~~~~\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_base.h:391:18: note: in instantiation of member function 'nest::neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml::send' requested here\n", + " 391 | C_[ lcid ].send( e, tid, cp );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_base.h:227:12: note: in instantiation of member function 'nest::Connector>::send_to_all' requested here\n", + " 227 | explicit Connector( const synindex syn_id )\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_model_impl.h:311:45: note: in instantiation of member function 'nest::Connector>::Connector' requested here\n", + " 311 | thread_local_connectors[ syn_id ] = new Connector< ConnectionT >( syn_id );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_model_impl.h:292:3: note: in instantiation of member function 'nest::GenericConnectorModel>::add_connection_' requested here\n", + " 292 | add_connection_( src, tgt, thread_local_connectors, syn_id, connection, actual_receptor_type );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_model.h:162:3: note: in instantiation of member function 'nest::GenericConnectorModel>::add_connection' requested here\n", + " 162 | GenericConnectorModel( const std::string name )\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/model_manager_impl.h:62:9: note: in instantiation of member function 'nest::GenericConnectorModel>::GenericConnectorModel' requested here\n", + " 62 | new GenericConnectorModel< ConnectionT< TargetIdentifierPtrRport > >( \"dummy\" );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/nest_impl.h:37:26: note: in instantiation of function template specialization 'nest::ModelManager::register_connection_model' requested here\n", + " 37 | kernel().model_manager.register_connection_model< ConnectorModelT >( name );\n", + " | ^\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:696:9: note: in instantiation of function template specialization 'nest::register_connection_model' requested here\n", + " 696 | nest::register_connection_model< neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml >( name );\n", + " | ^\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:605:14: warning: unused variable 'get_t' [-Wunused-variable]\n", + " 605 | auto get_t = [t_hist_entry_ms](){ return t_hist_entry_ms; }; // do not remove, this is in case the predefined time variable ``t`` is used in the NESTML model\n", + " | ^~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:633:12: warning: unused variable 'get_t' [-Wunused-variable]\n", + " 633 | auto get_t = [__t_spike](){ return __t_spike; }; // do not remove, this is in case the predefined time variable ``t`` is used in the NESTML model\n", + " | ^~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:672:12: warning: unused variable 'get_t' [-Wunused-variable]\n", + " 672 | auto get_t = [__t_spike](){ return __t_spike; }; // do not remove, this is in case the predefined time variable ``t`` is used in the NESTML model\n", + " | ^~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:960:10: warning: unused variable 'get_t' [-Wunused-variable]\n", + " 960 | auto get_t = [t_start](){ return t_start; }; // do not remove, this is in case the predefined time variable ``t`` is used in the NESTML model\n", + " | ^~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:600:9: note: in instantiation of member function 'nest::neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml::update_internal_state_' requested here\n", + " 600 | update_internal_state_(t_lastspike_, (start->t_ + __dendritic_delay) - t_lastspike_, cp);\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_base.h:391:18: note: in instantiation of member function 'nest::neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml::send' requested here\n", + " 391 | C_[ lcid ].send( e, tid, cp );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_base.h:227:12: note: in instantiation of member function 'nest::Connector>::send_to_all' requested here\n", + " 227 | explicit Connector( const synindex syn_id )\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_model_impl.h:311:45: note: in instantiation of member function 'nest::Connector>::Connector' requested here\n", + " 311 | thread_local_connectors[ syn_id ] = new Connector< ConnectionT >( syn_id );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_model_impl.h:292:3: note: in instantiation of member function 'nest::GenericConnectorModel>::add_connection_' requested here\n", + " 292 | add_connection_( src, tgt, thread_local_connectors, syn_id, connection, actual_receptor_type );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_model.h:162:3: note: in instantiation of member function 'nest::GenericConnectorModel>::add_connection' requested here\n", + " 162 | GenericConnectorModel( const std::string name )\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/model_manager_impl.h:62:9: note: in instantiation of member function 'nest::GenericConnectorModel>::GenericConnectorModel' requested here\n", + " 62 | new GenericConnectorModel< ConnectionT< TargetIdentifierPtrRport > >( \"dummy\" );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/nest_impl.h:37:26: note: in instantiation of function template specialization 'nest::ModelManager::register_connection_model' requested here\n", + " 37 | kernel().model_manager.register_connection_model< ConnectorModelT >( name );\n", + " | ^\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:696:9: note: in instantiation of function template specialization 'nest::register_connection_model' requested here\n", + " 696 | nest::register_connection_model< neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml >( name );\n", + " | ^\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:508:7: warning: expression result unused [-Wunused-value]\n", + " 508 | dynamic_cast< iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml& >(t);\n", + " | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_model_impl.h:316:14: note: in instantiation of member function 'nest::neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml::check_connection' requested here\n", + " 316 | connection.check_connection( src, tgt, receptor_type, get_common_properties() );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_model_impl.h:292:3: note: in instantiation of member function 'nest::GenericConnectorModel>::add_connection_' requested here\n", + " 292 | add_connection_( src, tgt, thread_local_connectors, syn_id, connection, actual_receptor_type );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_model.h:162:3: note: in instantiation of member function 'nest::GenericConnectorModel>::add_connection' requested here\n", + " 162 | GenericConnectorModel( const std::string name )\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/model_manager_impl.h:62:9: note: in instantiation of member function 'nest::GenericConnectorModel>::GenericConnectorModel' requested here\n", + " 62 | new GenericConnectorModel< ConnectionT< TargetIdentifierPtrRport > >( \"dummy\" );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/nest_impl.h:37:26: note: in instantiation of function template specialization 'nest::ModelManager::register_connection_model' requested here\n", + " 37 | kernel().model_manager.register_connection_model< ConnectorModelT >( name );\n", + " | ^\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:696:9: note: in instantiation of function template specialization 'nest::register_connection_model' requested here\n", + " 696 | nest::register_connection_model< neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml >( name );\n", + " | ^\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:527:10: warning: unused variable 'get_thread' [-Wunused-variable]\n", + " 527 | auto get_thread = [tid]()\n", + " | ^~~~~~~~~~\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_base.h:391:18: note: in instantiation of member function 'nest::neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml::send' requested here\n", + " 391 | C_[ lcid ].send( e, tid, cp );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_base.h:227:12: note: in instantiation of member function 'nest::Connector>::send_to_all' requested here\n", + " 227 | explicit Connector( const synindex syn_id )\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_model_impl.h:311:45: note: in instantiation of member function 'nest::Connector>::Connector' requested here\n", + " 311 | thread_local_connectors[ syn_id ] = new Connector< ConnectionT >( syn_id );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_model_impl.h:292:3: note: in instantiation of member function 'nest::GenericConnectorModel>::add_connection_' requested here\n", + " 292 | add_connection_( src, tgt, thread_local_connectors, syn_id, connection, actual_receptor_type );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_model.h:162:3: note: in instantiation of member function 'nest::GenericConnectorModel>::add_connection' requested here\n", + " 162 | GenericConnectorModel( const std::string name )\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/model_manager_impl.h:103:38: note: in instantiation of member function 'nest::GenericConnectorModel>::GenericConnectorModel' requested here\n", + " 103 | ConnectorModel* conn_model = new GenericConnectorModel< CompleteConnectionT >( name );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/model_manager_impl.h:67:5: note: in instantiation of function template specialization 'nest::ModelManager::register_specific_connection_model_>' requested here\n", + " 67 | register_specific_connection_model_< ConnectionT< TargetIdentifierIndex > >( name + \"_hpc\" );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/nest_impl.h:37:26: note: in instantiation of function template specialization 'nest::ModelManager::register_connection_model' requested here\n", + " 37 | kernel().model_manager.register_connection_model< ConnectorModelT >( name );\n", + " | ^\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:696:9: note: in instantiation of function template specialization 'nest::register_connection_model' requested here\n", + " 696 | nest::register_connection_model< neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml >( name );\n", + " | ^\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:605:14: warning: unused variable 'get_t' [-Wunused-variable]\n", + " 605 | auto get_t = [t_hist_entry_ms](){ return t_hist_entry_ms; }; // do not remove, this is in case the predefined time variable ``t`` is used in the NESTML model\n", + " | ^~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:633:12: warning: unused variable 'get_t' [-Wunused-variable]\n", + " 633 | auto get_t = [__t_spike](){ return __t_spike; }; // do not remove, this is in case the predefined time variable ``t`` is used in the NESTML model\n", + " | ^~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:672:12: warning: unused variable 'get_t' [-Wunused-variable]\n", + " 672 | auto get_t = [__t_spike](){ return __t_spike; }; // do not remove, this is in case the predefined time variable ``t`` is used in the NESTML model\n", + " | ^~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:960:10: warning: unused variable 'get_t' [-Wunused-variable]\n", + " 960 | auto get_t = [t_start](){ return t_start; }; // do not remove, this is in case the predefined time variable ``t`` is used in the NESTML model\n", + " | ^~~~~\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:600:9: note: in instantiation of member function 'nest::neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml::update_internal_state_' requested here\n", + " 600 | update_internal_state_(t_lastspike_, (start->t_ + __dendritic_delay) - t_lastspike_, cp);\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_base.h:391:18: note: in instantiation of member function 'nest::neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml::send' requested here\n", + " 391 | C_[ lcid ].send( e, tid, cp );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_base.h:227:12: note: in instantiation of member function 'nest::Connector>::send_to_all' requested here\n", + " 227 | explicit Connector( const synindex syn_id )\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_model_impl.h:311:45: note: in instantiation of member function 'nest::Connector>::Connector' requested here\n", + " 311 | thread_local_connectors[ syn_id ] = new Connector< ConnectionT >( syn_id );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_model_impl.h:292:3: note: in instantiation of member function 'nest::GenericConnectorModel>::add_connection_' requested here\n", + " 292 | add_connection_( src, tgt, thread_local_connectors, syn_id, connection, actual_receptor_type );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_model.h:162:3: note: in instantiation of member function 'nest::GenericConnectorModel>::add_connection' requested here\n", + " 162 | GenericConnectorModel( const std::string name )\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/model_manager_impl.h:103:38: note: in instantiation of member function 'nest::GenericConnectorModel>::GenericConnectorModel' requested here\n", + " 103 | ConnectorModel* conn_model = new GenericConnectorModel< CompleteConnectionT >( name );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/model_manager_impl.h:67:5: note: in instantiation of function template specialization 'nest::ModelManager::register_specific_connection_model_>' requested here\n", + " 67 | register_specific_connection_model_< ConnectionT< TargetIdentifierIndex > >( name + \"_hpc\" );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/nest_impl.h:37:26: note: in instantiation of function template specialization 'nest::ModelManager::register_connection_model' requested here\n", + " 37 | kernel().model_manager.register_connection_model< ConnectorModelT >( name );\n", + " | ^\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:696:9: note: in instantiation of function template specialization 'nest::register_connection_model' requested here\n", + " 696 | nest::register_connection_model< neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml >( name );\n", + " | ^\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:508:7: warning: expression result unused [-Wunused-value]\n", + " 508 | dynamic_cast< iaf_psc_exp_neuron_nestml__with_neuromodulated_stdp_synapse_nestml& >(t);\n", + " | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_model_impl.h:316:14: note: in instantiation of member function 'nest::neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml::check_connection' requested here\n", + " 316 | connection.check_connection( src, tgt, receptor_type, get_common_properties() );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_model_impl.h:292:3: note: in instantiation of member function 'nest::GenericConnectorModel>::add_connection_' requested here\n", + " 292 | add_connection_( src, tgt, thread_local_connectors, syn_id, connection, actual_receptor_type );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/connector_model.h:162:3: note: in instantiation of member function 'nest::GenericConnectorModel>::add_connection' requested here\n", + " 162 | GenericConnectorModel( const std::string name )\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/model_manager_impl.h:103:38: note: in instantiation of member function 'nest::GenericConnectorModel>::GenericConnectorModel' requested here\n", + " 103 | ConnectorModel* conn_model = new GenericConnectorModel< CompleteConnectionT >( name );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/model_manager_impl.h:67:5: note: in instantiation of function template specialization 'nest::ModelManager::register_specific_connection_model_>' requested here\n", + " 67 | register_specific_connection_model_< ConnectionT< TargetIdentifierIndex > >( name + \"_hpc\" );\n", + " | ^\n", + "/opt/homebrew/anaconda3/envs/.venv/include/nest/nest_impl.h:37:26: note: in instantiation of function template specialization 'nest::ModelManager::register_connection_model' requested here\n", + " 37 | kernel().model_manager.register_connection_model< ConnectorModelT >( name );\n", + " | ^\n", + "/Users/alexiswisniewski/Library/Mobile Documents/com~apple~CloudDocs/Uni/Work/nestml/doc/tutorials/cart_pole_reinforcement_learning/target/neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml.h:696:9: note: in instantiation of function template specialization 'nest::register_connection_model' requested here\n", + " 696 | nest::register_connection_model< neuromodulated_stdp_synapse_nestml__with_iaf_psc_exp_neuron_nestml >( name );\n", + " | ^\n", + "7 warnings generated.\n", + "8 warnings generated.\n", + "22 warnings generated.\n", + "[100%] \u001b[32m\u001b[1mLinking CXX shared module nestml_63e9d96f65564460ad7732aa55581816_module.so\u001b[0m\n", + "[100%] Built target nestml_63e9d96f65564460ad7732aa55581816_module_module\n", + "[100%] Built target nestml_63e9d96f65564460ad7732aa55581816_module_module\n", + "\u001b[36mInstall the project...\u001b[0m\n", + "-- Install configuration: \"\"\n", + "-- Installing: /var/folders/3h/2lc1zrkd375b1l0m8zcfj6440000gn/T/nestml_target_zk0k5qqz/nestml_63e9d96f65564460ad7732aa55581816_module.so\n" + ] + } + ], "source": [ "# ... generate NESTML model code...\n", "\n", @@ -591,7 +1929,7 @@ "\n", "\n", "class SpikingAgent(Agent):\n", - " cycle_period = 40. # [ms]\n", + " cycle_period = 40. # [ms], corresponding to 2 physics steps\n", " \n", " def __init__(self, initial_state: Tuple[float,float,float,float], gamma) -> None:\n", " super().__init__(initial_state)\n", @@ -616,10 +1954,14 @@ " input_size = self.dimensions[0] * self.dimensions[1] * self.dimensions[2] * self.dimensions[3]\n", " self.input_population = nest.Create(input_layer_neuron_model_name, input_size)\n", "\n", + " self.input_sr = nest.Create(\"spike_recorder\")\n", + " nest.Connect(self.input_population, self.input_sr)\n", + " \n", " self.volume_transmitter = nest.Create(\"volume_transmitter\")\n", " nest.CopyModel(output_layer_synapse_model_name, \"stdp_dopa_nestml\",\n", - " {\"volume_transmitter\": vt}) #how does this work? we're just setting syn.n?\n", - "\n", + " {\"volume_transmitter\": self.volume_transmitter}) #how does this work? we're just setting syn.n?\n", + " \n", + " \n", " self.output_population_left = nest.Create(output_layer_neuron_model_name, 10)\n", " self.output_population_right = nest.Create(output_layer_neuron_model_name, 10)\n", " \n", @@ -649,15 +1991,16 @@ " return 1 # right\n", "\n", " def update(self, next_state: Tuple[float,float,float,float]):\n", - " box = self.get_box(next_state) \n", " \n", " # make the correct input neuron fire\n", " self.input_population.firing_rate = 0.\n", - " self.input_population[box[0], box[1], box[2], box[3]].firing_rate = 100. # XXX: value not given in Liu&Pan. Got 500 Hz as max freq from BVogler thesis. n.b. 40 ms cycle time. \n", + " self.input_population[self.get_state_neuron(next_state)].firing_rate = 100. # XXX: value not given in Liu&Pan. Got 500 Hz as max freq from BVogler thesis. n.b. 40 ms cycle time. \n", "\n", " # simulate for one cycle\n", " nest.Simulate(SpikingAgent.cycle_period)\n", - " \n", + "\n", + " spike_times = nest.GetStatus(self.input_sr, keys='events')[0]['times']\n", + " print(spike_times)\n", " # measure output layer spikes\n", " #output_layer_spike_times_left = self.output_population_spike_recorder_left.get(\"events\")[\"times\"]\n", " #output_layer_spike_times_right = self.output_population_spike_recorder_right.get(\"events\")[\"times\"]\n", @@ -706,6 +2049,47 @@ " " ] }, + { + "cell_type": "code", + "execution_count": 8, + "id": "8d89c894", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Jan 23 14:11:01 Install [Info]: \n", + " loaded module nestml_4f96132537824d3e80d969bd586bb4ca_module\n", + "\n", + "Jan 23 14:11:01 Install [Info]: \n", + " loaded module nestml_63e9d96f65564460ad7732aa55581816_module\n" + ] + }, + { + "ename": "NESTErrors.BadProperty", + "evalue": "BadProperty in SLI function Connect_g_g_D_D: No volume transmitter has been assigned to the dopamine synapse.", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mNESTErrors.BadProperty\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[8], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m sa \u001b[38;5;241m=\u001b[39m \u001b[43mSpikingAgent\u001b[49m\u001b[43m(\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m,\u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m,\u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m,\u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m0.9\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 2\u001b[0m sa\u001b[38;5;241m.\u001b[39mconstruct_neural_network()\n\u001b[1;32m 3\u001b[0m sa\u001b[38;5;241m.\u001b[39mupdate()\n", + "Cell \u001b[0;32mIn[6], line 10\u001b[0m, in \u001b[0;36mSpikingAgent.__init__\u001b[0;34m(self, initial_state, gamma)\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39m\u001b[38;5;21m__init__\u001b[39m(initial_state)\n\u001b[1;32m 9\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mgamma \u001b[38;5;241m=\u001b[39m gamma\n\u001b[0;32m---> 10\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mconstruct_neural_network\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n", + "Cell \u001b[0;32mIn[6], line 41\u001b[0m, in \u001b[0;36mSpikingAgent.construct_neural_network\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 38\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moutput_population_left \u001b[38;5;241m=\u001b[39m nest\u001b[38;5;241m.\u001b[39mCreate(output_layer_neuron_model_name, \u001b[38;5;241m10\u001b[39m)\n\u001b[1;32m 39\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moutput_population_right \u001b[38;5;241m=\u001b[39m nest\u001b[38;5;241m.\u001b[39mCreate(output_layer_neuron_model_name, \u001b[38;5;241m10\u001b[39m)\n\u001b[0;32m---> 41\u001b[0m \u001b[43mnest\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mConnect\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43minput_population\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moutput_population_left\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43msyn_spec\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m{\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43msynapse_model\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43moutput_layer_synapse_model_name\u001b[49m\u001b[43m}\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 42\u001b[0m nest\u001b[38;5;241m.\u001b[39mConnect(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39minput_population, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moutput_population_right, syn_spec\u001b[38;5;241m=\u001b[39m{\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124msynapse_model\u001b[39m\u001b[38;5;124m\"\u001b[39m: output_layer_synapse_model_name})\n\u001b[1;32m 44\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moutput_population_spike_recorder_left \u001b[38;5;241m=\u001b[39m nest\u001b[38;5;241m.\u001b[39mCreate(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mspike_recorder\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n", + "File \u001b[0;32m/opt/homebrew/anaconda3/envs/.venv/lib/python3.12/site-packages/nest/ll_api.py:216\u001b[0m, in \u001b[0;36mstack_checker..stack_checker_func\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 213\u001b[0m \u001b[38;5;129m@functools\u001b[39m\u001b[38;5;241m.\u001b[39mwraps(f)\n\u001b[1;32m 214\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21mstack_checker_func\u001b[39m(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs):\n\u001b[1;32m 215\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m get_debug():\n\u001b[0;32m--> 216\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mf\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 217\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 218\u001b[0m sr(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcount\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n", + "File \u001b[0;32m/opt/homebrew/anaconda3/envs/.venv/lib/python3.12/site-packages/nest/lib/hl_api_connections.py:289\u001b[0m, in \u001b[0;36mConnect\u001b[0;34m(pre, post, conn_spec, syn_spec, return_synapsecollection)\u001b[0m\n\u001b[1;32m 287\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m processed_syn_spec \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 288\u001b[0m sps(processed_syn_spec)\n\u001b[0;32m--> 289\u001b[0m \u001b[43msr\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mConnect\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 291\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m return_synapsecollection:\n\u001b[1;32m 292\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m GetConnections(pre, post)\n", + "File \u001b[0;32m/opt/homebrew/anaconda3/envs/.venv/lib/python3.12/site-packages/nest/ll_api.py:103\u001b[0m, in \u001b[0;36mcatching_sli_run\u001b[0;34m(cmd)\u001b[0m\n\u001b[1;32m 100\u001b[0m engine\u001b[38;5;241m.\u001b[39mrun(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mclear\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 102\u001b[0m exceptionCls \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mgetattr\u001b[39m(kernel\u001b[38;5;241m.\u001b[39mNESTErrors, errorname)\n\u001b[0;32m--> 103\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m exceptionCls(commandname, message)\n", + "\u001b[0;31mNESTErrors.BadProperty\u001b[0m: BadProperty in SLI function Connect_g_g_D_D: No volume transmitter has been assigned to the dopamine synapse." + ] + } + ], + "source": [ + "sa = SpikingAgent((0,0,0,0), 0.9)\n", + "sa.construct_neural_network()\n", + "sa.update()" + ] + }, { "cell_type": "markdown", "id": "566fa9c9",