Thermodynamic analysis of miscibility gap due to ordering in ternary systems