sets EN Set of EH systems ENn Set of EHs connected with EH n EJ Set of EH output energy carriers EF Set of input energy carriers to EH EI Set of input energy carriers to energy converter the EH input junctions EK Set of EH energy storage systems ET Set of hours of the scheduling horizon n /s,t,u/ j Index of EH out put energy /a,b/ f Index of EH input energy carriers /c,d,e/ m /s,t,u/ i Index of iteration /f,g/ k Index of EH energy storage /h,i,j/ t Index of hour /1*24/ table etac(n,i,j) Converter efficiency for converter i to converter energy carrier j in EH n a b s.f 0.05 0.05 t.f 0.05 0.05 u.f 0.05 0.05 s.g 0.05 0.05 t.g 0.05 0.05 u.g 0.05 0.05 ; parameters eta(n) /s 0.05,t 0.05,u 0.05/ table soc(n,k,t) Maximum stored energy of ESS 1*24 s.h 5.5 t.h 5.5 u.h 5.5 s.i 5.5 t.i 5.5 u.i 5.5 s.j 5.5 t.j 5.5 u.j 5.5 ; parameter SOCmin Minimum stored energy of ESS table l(n,m,j) Energy transmission loss between EH n and EH m a b s.s 0 0 t.s 0.04 0.04 u.s 0.06 0.06 s.t 0.04 0.04 t.t 0 0 u.t 0.02 0.02 s.u 0.06 0.06 t.u 0.02 0.02 u.u 0 0 ; table alfa(n,i) Operation cost coefficients for converter f g s 0.05 0.05 t 0.05 0.05 u 0.05 0.05 ; table beta(n,i) Operation cost coefficients for converter f g s 0.1 0.1 t 0.1 0.1 u 0.1 0.1; table alfaa(n,k) Operation cost coefficients for ESS h i j s 0.05 0.05 0.05 t 0.05 0.05 0.05 u 0.05 0.05 0.05 ; table alfaaa(n,j) Operation cost coefficients for transaction a b s 0.05 0.05 t 0.05 0.05 u 0.05 0.05; table etacc(n,j,i) Conversion matrix of EH n f g s.a 0.05 0.05 t.a 0.05 0.05 u.a 0.05 0.05 s.b 0.05 0.05 t.b 0.05 0.05 u.b 0.05 0.05 ; table Pimup(n,m,j) Maximum imported energy a b s.s 0 0 t.s 8 8 u.s 8 8 s.t 8 8 t.t 0 0 u.t 8 8 s.u 8 8 t.u 8 8 u.u 0 0 ; table Pexup(n,j) Maximum exported energy a b s 8 8 t 8 8 u 8 8 ; parameters Pdisup Maximum discharged energy of ESS Pchup Maximum charged energy of ESS ; variables vfi Dispatch factor for converter unit i connected to the input pc(f,t) Imported energy carrier f from the upstream utilities ps(f,t) exported energy carrier f to the upstream utilities pch(n,k,t) Charging energy of ESS k pdis(n,k,t) discharging energy of ESS k pu(i,j) Output energy of converter i for energy carrier j pnode(n,j,t) Collected energy at collector nodes for energy carrier j pex(n,j,t) Exported energy from EH n to other EHs for energy carrier j pim(n,m,j,t) Imported energy for EH n from EH m for energy carrier j without considering the transmission loss Pnew(n,j) Renewable energy output for energy carrier j in EH n ppess(n,k,t) The operation cost of ESS k ppunit(n,i,t) The operation cost of converter i pptrade(n,j,t) The operation cost of trading energy carrier j v(n,f,t) Dispatch matrix of EH n pcc(n,f,t) Vector of input energy carriers of EH n x(n,f,t) Concatenated decision vector of EH n csoc(n,k,t) Price of stored energy in storage k cess(n,k,t) Price of charging energy of ESS k cunit1(n,i,j,t) Price of output energy of converter i for energy carrier j cnode(n,j,t) Price of output energy of the collector node for energy carrier j cl(m,j,t) Price of output energy of EH for energy carrier j ploss(n,m,j) Transmission loss for EH n importing energy from EH m E1(n) The operation cost of EH n E2(n) The transaction cost of EH n with the upstream utilities E3(n) The transaction cost of EH n with the networked EHs h(j) Constraint of the EH interconnection network for energy carrier j g(n) Constraint of the physical control scheme of EH n z(n) Set of auxiliary variable vector of the ADMM. pl(n,j,t) prew(n,j,t) punit(n,i,j,t) pcc(n,f,t) cunit(n,i,j,t) cess1(n,k,t) punitup(n,i,j) etach(n,k) pch(n,k,t) pcup(f) Eh Cc(f,t) Cs(f,t) s(n,j,k) Storage coupling element e converge threshold PLl(n) Vector of load demands of EH n ; equations obj co1 co2 co3 co4 co5 co6 co7 co8 co9 co10 co11 co12 co13 co15 co16 co17 co18 co19 co20 co21 co22 co23 co24 co25 co26 co27 co28 co29 co30 co31 co32 ; obj(n).. EH=e=sum((t,i),(ppunit(n,i,t)))+sum((t,k),ppess(n,k,t))+sum((t,j),pptrade(n,j,t)) +sum((t,f),(cc(f,t)*pc(f,t)-cs(f,t)*ps(f,t))) +sum((m,j,t),(pim(n,m,j,t)*cl(m,j,t)-pex(n,j,t)*cl(m,j,t))); co1(n,j,t) .. pl(n,j,t)=e=sum(i,etac(n,i,j))*sum(f,(v(n,f,t)*pcc(n,f,t)))+sum(k,(s(n,j,k)*(pdis(n,k,t)-pch(n,k,t))))-pex(n,j,t)+prew(n,j,t) ; co2(n,i,j,t) .. punit(n,i,j,t)=e=etac(n,i,j)*sum(f,v(n,f,t)*pcc(n,f,t)) ; co3(n,i,j,t) .. cunit1(n,i,j,t)=e=(sum(f,cc(f,t)*sign(v(n,f,t))*etac(n,i,j))); co4(i,j,n,t) ..cunit(n,i,j,t)=e=(cunit1(n,i,j,t)*punit(n,i,j,t)*ppunit(n,i,t))/(punit(n,i,j,t)+1); co5(i,n,t,j) ..ppunit(n,i,t)=e=alfa(n,i)*(punit(n,i,j,t))**2+beta(n,i)*punit(n,i,j,t); co6(j,n,t).. pnode(n,j,t)=e=sum(i,punit(n,i,j,t)); co7(j,n,t).. cnode(n,j,t)=e=sum(i,cunit(n,i,j,t)*punit(n,i,j,t))/(pnode(n,j,t)+1); co8(k,n,t).. cess1(n,k,t)=e=sum(j,s(n,j,k)*cnode(n,j,t)) ; co9(k,n,t).. csoc(n,k,t)=e=pch(n,k,t)*cess(n,k,t)/((pch(n,k,t)+soc(n,k,t-1))+soc(n,k,t-1)*csoc(n,k,t-1)+1)/((pch(n,k,t)+soc(n,k,t-1))+1); co10(k,n,t).. csoc(n,k,t)=e=csoc(n,k,t-1); co11(k,n,t).. cess1(n,k,t)=e=csoc(n,k,t); co12(k,n,t)..cess(n,k,t)=e=(pch(n,k,t)+pdis(n,k,t)*cess1(n,k,t)+ppess(n,k,t))/((pch(n,k,t)+pdis(n,k,t))+1); co13(n,k,t)..ppess(n,k,t)=e=alfaa(n,k)*(pdis(n,k,t)-pch(n,k,t))**2; co15(j,n,t)..pptrade(n,j,t)=e=alfaaa(n,j)*(pex(n,j,t)**2) ; co16(i,j,n)..0=l=etac(n,i,j); co17(i,j,n).. etac(n,i,j)=l=1; co18(f,i,n,t)..0=l=v(n,f,t); co19(f,i,n,t)..v(n,f,t)=l=1; co20(f,n,t)..sum(i,v(n,f,t))=e=1; co21(j,i,n,t)..0=l=punit(n,i,j,t); co22(j,i,n,t)..punit(n,i,j,t)=l=punitup(n,i,j); co23(f,n,t)..0=l=pc(f,t); co24(f,n,t)..pc(f,t)=l=pcup(f); co25(n,m,j,t)..0=l=pim(n,m,j,t); co26(n,m,j,t)..pim(n,m,j,t)=l=pimup(n,m,j); co27(j,t,n)..0=l=pex(n,j,t); co28(j,t,n)..pex(n,j,t)=l=pexup(n,j) ; co29(j,n,m,t)..ploss(n,m,j)=e=pim(n,m,j,t)*l(n,m,j); co30(j,n,m,t)..pim(n,m,j,t)=e=pim(n,m,j,t)-ploss(n,m,j) ; co31(n,j,t)..pl(n,j,t)=e=sum(i,etac(n,i,j))*sum(f,v(n,f,t)*pcc(n,f,t))+sum(k,s(n,j,k)*(pdis(n,k,t)-pch(n,k,t)))-pex(n,j,t)+prew(n,j,t) ; co32(n,j,t)..pex(n,j,t)=e=sum(m,pim(n,m,j,t)); model simulation/all/ ; solve simulation using DNLP minimizing EH ; display EH.l;