public void createConstraints(Model m){
		//Inventory balance
		inventory= new QBnBconstr[psize][tsize];
		for (int p = 0; p < psize; p++) {
			for (int t = 0; t < tsize; t++) {
				if(t==0){
					QBnBLinExp le= new QBnBLinExp();
					le.addTerm(1, Q[p][t]);
					le.addTerm(-1, I[p][t]);
					inventory[p][t]= new QBnBconstr(le, 0, D[p][t]-inInv[p], "inv"+p+","+t,m);
					m.addConst(inventory[p][t]);
				}
				else{
					QBnBLinExp le= new QBnBLinExp();
					le.addTerm(1, Q[p][t]);
					le.addTerm(-1, I[p][t]);
					le.addTerm(1, I[p][t-1]);
					inventory[p][t]= new QBnBconstr(le, 0, D[p][t], "D"+p+","+t, m);
					m.addConst(inventory[p][t]);
				}
			}
		}
		
		//Capacity of inventory
		invcapacity= new QBnBconstr[tsize];
		for (int t = 0; t < tsize; t++) {
			QBnBLinExp le= new QBnBLinExp();
			for (int p = 0; p < psize; p++) {
				le.addTerm(V[p], I[p][t]);
			}
			invcapacity[t]= new QBnBconstr(le, 1, K, "K"+t, m);
			m.addConst(invcapacity[t]);
		}
		
		//production
		production= new QBnBconstr[psize];
		for (int p = 0; p < psize; p++) {
			QBnBLinExp le= new QBnBLinExp();
			
			for (int t = 0; t < tsize; t++) {
				le.addTerm(1, Y[p][t]);
			}
			production[p]= new QBnBconstr(le, 1, N[p], "N"+p, m);
			m.addConst(production[p]);
		}
		
		productionRel= new QBnBconstr[psize][tsize];
		
		for (int p = 0; p < psize; p++) {
			for (int t = 0; t < tsize; t++) {
				QBnBLinExp le= new QBnBLinExp();
				le.addTerm(1, Q[p][t]);
				le.addTerm(-M[p], Y[p][t]);
				productionRel[p][t]= new QBnBconstr(le, 1, 0, "pR"+p+","+t, m);
				m.addConst(productionRel[p][t]);
			}
		}
		
	}