function[f_nlp,g_nlp] = nlp16(x,y)

if size(x,2) > 93
     y = x(94:128);         %   NLP com integralidade relaxada
end

% * * * exemplo 16 - Daichendt e Grossmann(1994) - Trocadores de Calor * * *

Fh=[15 3 8 9 5]';
Fc=[8 15 8 4 6]';
TINh=[500 460 440 350 350]';
TINc=[300 340 340 380 460]';
TOUTh=[340 400 400 310 320]';
TOUTc=[340 360 400 460 560]';
TINhu=580;
TINcu=300;
TOUThu=580;
TOUTcu=320;
CHU=125;
CCU=10;
EMAT=1;
C=300;
h=1.6;
U=(2/h)^(-1);
CF=900;
alfa=10^3;
n=5;



%  * * *  Variaveis binarias * * *

Y1=zeros(5);
Y2=zeros(5);
Y3=zeros(5);
Y4=zeros(5);
Y5=zeros(5);
Y6=zeros(5);
Y7=zeros(5);
Y1(1,5)=y(1);
Y2(1,4)=y(2);
Y3(1,4)=y(3);
Y3(2,4)=y(4);
Y4(1,3)=y(5);
Y4(1,4)=y(6);
Y4(2,3)=y(7);
Y4(2,4)=y(8);
Y4(3,3)=y(9);
Y4(3,4)=y(10);
Y5(1,2)=y(11);
Y5(1,3)=y(12);
Y5(2,2)=y(13);
Y5(3,2)=y(14);
Y6(1,2)=y(15);
Y6(1,3)=y(16);
Y6(4,2)=y(17);
Y6(4,3)=y(18);
Y6(5,2)=y(19);
Y6(5,3)=y(20);
Y7(1,1)=y(21);
Y7(2,1)=y(22);
Y7(3,1)=y(23);
Y7(4,1)=y(24);
Y7(5,1)=y(25);
Yh=y(26:30);
Yc=y(31:35);


%     * * * Variaveis continuas  * * *

DT1=zeros(5);
DT2=zeros(5);
DT3=zeros(5);
DT4=zeros(5);
DT5=zeros(5);
DT6=zeros(5);
DT7=zeros(5);
DT8=zeros(5);
DT1(1,5)=x(1);
DT2(1,5)=x(2);
DT2(1,4)=x(3);
DT3(1,4)=x(4);
DT3(2,4)=x(5);
DT4(1,4)=x(6);
DT4(2,4)=x(7);
DT4(1,3)=x(8);
DT4(2,3)=x(9);
DT4(3,3)=x(10);
DT4(3,4)=x(11);
DT5(1,3)=x(12);
DT5(1,4)=x(13);
DT5(2,3)=x(14);
DT5(2,4)=x(15);
DT5(3,3)=x(16);
DT5(3,4)=x(17);
DT5(1,2)=x(18);
DT5(2,2)=x(19);
DT5(3,2)=x(20);
DT6(1,2)=x(21);
DT6(1,3)=x(22);
DT6(2,2)=x(23);
DT6(3,2)=x(24);
DT6(4,2)=x(25);
DT6(4,3)=x(26);
DT6(5,2)=x(27);
DT6(5,3)=x(28);
DT7(1,2)=x(29);
DT7(1,3)=x(30);
DT7(4,2)=x(31);
DT7(4,3)=x(32);
DT7(5,2)=x(33);
DT7(5,3)=x(34);
DT7(1,1)=x(35);
DT7(2,1)=x(36);
DT7(3,1)=x(37);
DT7(4,1)=x(38);
DT7(5,1)=x(39);
DT8(1,1)=x(40);
DT8(2,1)=x(41);
DT8(3,1)=x(42);
DT8(4,1)=x(43);
DT8(5,1)=x(44);
DTh=x(45:49);
DTc=x(50:54);

Q1=zeros(5,4);
Q2=zeros(5,4);
Q3=zeros(5,4);
Q4=zeros(5,4);
Q5=zeros(5,4);
Q6=zeros(5,4);
Q7=zeros(5,4);
Q4(1,4)=x(55);
Q4(2,4)=x(56);
Q6(1,3)=x(57);
Q6(4,3)=x(58);

Th=zeros(5,8);
Th(:,1)=TINh;
Th(1,2)=x(59);
Th(1,3)=x(60);
Th(1,4)=x(61);
Th(1,5)=x(62);
Th(1,6)=x(63);
Th(1,7)=x(64);
Th(1,8)=x(65);
Th(2,3)=x(66);
Th(2,4)=x(67);
Th(2,5)=x(68);
Th(2,6)=x(69);
Th(2,7)=x(70);
Th(2,8)=x(71);
Th(3,4)=x(72);
Th(3,5)=x(73);
Th(3,6)=x(74);
Th(3,7)=x(75);
Th(3,8)=x(76);
Th(4,6)=x(77);
Th(4,7)=x(78);
Th(4,8)=x(79);
Th(5,6)=x(80);
Th(5,7)=x(81);
Th(5,8)=x(82);

Tc=zeros(5,8);
Tc(:,8)=TINc;
Tc(1,1)=x(83);
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
g_nlp(129)=DTh(1)-TOUThu+Tc(1,1)-alfa*(1-Yh(1));
g_nlp(130)=DTh(2)-TOUThu+Tc(2,1)-alfa*(1-Yh(2));
g_nlp(131)=DTh(3)-TOUThu+Tc(3,1)-alfa*(1-Yh(3));
g_nlp(132)=DTh(4)-TOUThu+Tc(4,1)-alfa*(1-Yh(4));
g_nlp(133)=DTh(5)-TOUThu+Tc(5,1)-alfa*(1-Yh(5));
g_nlp(134)=EMAT-DT1(1,5);
g_nlp(135)=EMAT-DT2(1,4);
g_nlp(136)=EMAT-DT3(1,4);
g_nlp(137)=EMAT-DT3(2,4);
g_nlp(138)=EMAT-DT4(1,3);
g_nlp(139)=EMAT-DT4(1,4);
g_nlp(140)=EMAT-DT4(2,3);
g_nlp(141)=EMAT-DT4(2,4);
g_nlp(142)=EMAT-DT4(3,3);
g_nlp(143)=EMAT-DT4(3,4);
g_nlp(144)=EMAT-DT5(1,2);
g_nlp(145)=EMAT-DT5(1,3);
g_nlp(146)=EMAT-DT5(2,2);
g_nlp(147)=EMAT-DT5(3,2);
g_nlp(148)=EMAT-DT6(1,2);
g_nlp(149)=EMAT-DT6(1,3);
g_nlp(150)=EMAT-DT6(4,2);
g_nlp(151)=EMAT-DT6(4,3);
g_nlp(152)=EMAT-DT6(5,2);
g_nlp(153)=EMAT-DT6(5,3);
g_nlp(154)=EMAT-DT7(1,1);
g_nlp(155)=EMAT-DT7(2,1);
g_nlp(156)=EMAT-DT7(3,1);
g_nlp(157)=EMAT-DT7(4,1);
g_nlp(158)=EMAT-DT7(5,1);
