# How to get Quality for every Node of network

#1

Hi,

in the CCW1206 (contamination_simulation) is it possible to have Sensor in every locations ? I want to have Quality for every Node of network.

``````% Sensor locations
sensor_id = {'all junction'}; % which command shoulde I use?
sensor_index = G.getNodeIndex(sensor_id);
``````

thanks

#2

Hi,

Try setting

``````sensor_id = G.getNodeNameID
``````

demetris

#3

HI @demetrios , thanks a lot! What if I want to inject contaminant to special node in each senarion? it could be possible?
I mean, instead of choosing the source randomly In each scenario, a node be a source of the network.
That is, the number of scenarios is equal to the number of nodes in the network
And in each scenario, one of the network nodes is selected as the source

% Randomize injection

G.setMSXSources(node_id(inj_sc(i,1)), ‘AsIII’, ‘Setpoint’, inj_sc(i,2), ‘AS3PAT’); % Specify Arsenite injection source