function J = objRoom(u)
% J=  p_{el}\dot{Q}_{el}+ p_{hw}\dot{Q}_{hw}+ p_{ac}\dot{Q}_{ac}+k_v(\dot{m}_v^0-\dot{m}_v)+ k_T(T-T^{des})^2
%par_J   = [p_el, p_hw, p_ac, m_in0, kv, kT]';
%par_J   = [p_el, p_hw, p_ac, m_in0, kv, kT]';

p_eh    = u(1) ;
p_hw    = u(2) ;
p_ac    = u(3) ;
mv0     = u(4) ;
kv      = u(5) ;
kT      = u(6) ;

Qhw     = u(7);
Qeh     = u(8);
Qac     = u(9);
mv      = u(10);

Tdes    = u(11);
T       = u(12);

J = p_eh*Qeh + p_hw*Qhw + p_ac*Qac + kv*(mv0-mv) + kT*(T-Tdes)^2;
end