private void restrictDepamandsFromSourceToTargetNodes() throws IloException {
		Demand demand;
		Node node;
		IloLinearNumExpr flow;
		for (int i = 0; i < nodes.length; i++) {
			node = nodes[i];

			for (int k = 0; k < demands.length; k++) {
				flow = cplex.linearNumExpr();
				// soma custos saindo do vertice
				for (Arc arc : node.out) {
					flow.addTerm(1, x[k][arc.id]);
				}
				// subtrai custos entrando no vertice
				for (Arc arc : node.in) {
					flow.addTerm(-1, x[k][arc.id]);
				}

				demand = demands[k];
				if(node.id == demand.sDemand) {
					cplex.addEq(flow, demand.demand);
				} else if(node.id == demand.tDemand){
					cplex.addEq(flow, -demand.demand);
				} else {
					cplex.addEq(flow, 0);
				}
			}
		}
	}