/* * test_set_delay_extrema.sli * * This file is part of NEST. * * Copyright (C) 2004 The NEST Initiative * * NEST is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * NEST is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with NEST. If not, see <http://www.gnu.org/licenses/>. * */ /* BeginDocumentation Name: testsuite::test_set_delay_extrema - sli script to test if min_ and max_delay can be set by the user correctly Synopsis: (test_set_delay_extrema) run -> compare output with comments in file FirstVersion: July 2004 Author: Diesmann SeeAlso: testsuite::test_iaf_1to2, testsuite::test_iaf_psp, testsuite::test_iaf_dc_aligned_delay */ /unittest (6335) require /unittest using /smalldelay 0.5 def % small connection delay used in network /bigdelay 1.0 def % big connection delay used in netwokr /simtime 1.0 def % simulation time /AlignedImpact { /h Set % argument: computation step size in ms ResetKernel 0 << /resolution h >> SetStatus /static_synapse << % settings not required but respected: /min_delay h % smallest delay expected by user /max_delay bigdelay 2 mul % biggest delay expected by user >> SetDefaults /iaf_neuron Create /neuron1 Set neuron1 << /I_e 1450.0 >> SetStatus /iaf_neuron Create /neuron2 Set neuron1 neuron2 100.0 smalldelay Connect neuron2 neuron1 100.0 bigdelay Connect simtime Simulate } def 0.1 AlignedImpact {0 [[/max_delay /min_delay]] get [bigdelay 2 mul h] eq } assert_or_die