Conditional sum in constraint

I solved the problem by simply changing the definition of BRANCH from

BRANCH = [(Int32(BrancheS[l].line), Int32(BrancheS[l].from), Int32(BrancheS[l].to)) for l=1:length(LINES)]

in to

BRANCH = [(BrancheS[l].line, BrancheS[l].from, BrancheS[l].to) for l=1:length(LINES)]