function cost = sTAC(x, aux)
sc = aux.sc;
i_com = length(sc.com.x);
i_gco = length(sc.gco.x);
i_val = length(sc.val.x);
i_vap = length(sc.vap.x);
i_ihx = length(sc.ihx.x);
com = x(1:i_com);
gco = x(i_com+1:i_com+i_gco);
val = x(i_com+i_gco+1:i_com+i_gco+i_val);
vap = x(i_com+i_gco+i_val+1:i_com+i_gco+i_val+i_vap);
ihx = x(i_com+i_gco+i_val+i_vap+1:end);

Avap = vap(end-1)*sc.vap.x(end-1);
Agco = gco(end)*sc.gco.x(end);
Aihx = ihx(end)*sc.ihx.x(end);

%C0 = 185*3*sc.gco.x(end)/(sc.com.x(1)*sc.val.x(2)); % Same cost
%C0 = 260*3*sc.gco.x(end)/(sc.com.x(1)*sc.val.x(2)); % Same total area
C0 = 877*3*sc.gco.x(end)/(sc.com.x(1)*sc.val.x(2)); % Same DTmin 

n = 0.65;

cost = com(1)*val(2) + C0*(Avap^n+Agco^n+Aihx^n)/(3*sc.gco.x(end));
