IM not totally convinced your 3 equations are correct, but assuming they are...

Your solver is presumably setting the demand factor to zero because this is the trivial solution to your minimisation problem, ie if demand factor=0, x12=x11, x22=x21,x32=x31 then the tarrif is exactly as before and so the squared error will be zero.

You could add a constraint to make the demand factor bigger than some trivial value (you choose) and then do the minimisation again, alternatively you could set a "budget" for the size of square error that is acceptable to you, then find the largest demand factor that keeps the errors within your budget.