diff --git a/hbp_nrp_music_interface/hbp_nrp_music_interface/launch/MUSICLauncher.py b/hbp_nrp_music_interface/hbp_nrp_music_interface/launch/MUSICLauncher.py index 3d040743395724f486abdb406cce3a6fa394b28c..be10adfea14d706bc45a8b8968684c0e1e0ce6e0 100644 --- a/hbp_nrp_music_interface/hbp_nrp_music_interface/launch/MUSICLauncher.py +++ b/hbp_nrp_music_interface/hbp_nrp_music_interface/launch/MUSICLauncher.py @@ -20,7 +20,7 @@ class MUSICLauncher(object): requested brain processes. """ - def __init__(self, exd_file, bibi_file, env_file, exp_path, server_host, sim_id): + def __init__(self, exd_file, bibi_file, env_file, exp_path, server_host, sim_id, timeout): """ Store all experiment configuration parameters so that they can be propagated to the remote hosts. @@ -31,6 +31,7 @@ class MUSICLauncher(object): :param exp_path Absolute path to the base dir of the experiment files. :param server_host Target Gazebo/brain process host (e.g. local or lugano) :param sim_id The id of the simulation/experiment to be launched. + :param timeout The default simulation timeout (time initially allocated). """ self._exd_file = exd_file @@ -39,6 +40,7 @@ class MUSICLauncher(object): self._exp_path = exp_path self._server_host = server_host self._sim_id = sim_id + self._timeout = timeout self.cle_server = None self._config = None @@ -68,6 +70,7 @@ class MUSICLauncher(object): '--experiment-path={}'.format(self._exp_path), '--gzserver-host={}'.format(self._server_host), '--sim-id={}'.format(self._sim_id), + '--timeout={}'.format(str(self._timeout).replace(' ', '_')), '--music'], 1) self._config.add_application('BRAIN', brain_launcher, diff --git a/hbp_nrp_music_xml/hbp_nrp_music_xml/pynn/xml_factory.py b/hbp_nrp_music_xml/hbp_nrp_music_xml/pynn/xml_factory.py index 9a60ebb31086409aaf62973128d9d55a3566d638..d22778ea5fc4571c2fbdc086472e354b11fa6411 100644 --- a/hbp_nrp_music_xml/hbp_nrp_music_xml/pynn/xml_factory.py +++ b/hbp_nrp_music_xml/hbp_nrp_music_xml/pynn/xml_factory.py @@ -173,6 +173,8 @@ class XmlFactory(object): population_slice = create_selector(xml_synapse) connection_rule = xml_synapse.type synaptic_target = self._get_synaptic_target_population(xml_synapse) + if hasattr(synaptic_target, 'mask'): # prevent duplicate slicing + population_slice = None self.connector_factory.create_and_connect_synapse(proxy, port_name, connection_rule,