function [] = Reset_Precooling(x0,d,h)

hyCase = h.Activedocument;
sol=hyCase.Solver;
f = hyCase.Flowsheet;

sol.CanSolve = 0 ;

%Reset optimization variables

% Inputs

f.MaterialStreams.Item('C3-2').MolarFlowValue = x0(1) ; 
f.MaterialStreams.Item('C3-14').MolarFlowValue = x0(2) ;   
f.MaterialStreams.Item('C3-33').PressureValue = x0(3) ;  
f.MaterialStreams.Item('C3-3').PressureValue = x0(4) ;  
f.MaterialStreams.Item('C3-7').PressureValue = x0(5) ; 
f.MaterialStreams.Item('C3-11').PressureValue = x0(6) ; 

% Disturbances

f.MaterialStreams.Item('MR1a').PressureValue = d(1);
f.MaterialStreams.Item('MR1a').MolarFlowValue = d(2);
f.MaterialStreams.Item('MR1a').TemperatureValue = d(3);
f.MaterialStreams.Item('C2').MolarFlowValue = d(4);
f.MaterialStreams.Item('C3').MolarFlowValue = d(5);
f.MaterialStreams.Item('N2').MolarFlowValue = d(6);
f.MaterialStreams.Item('MR2').PressureValue = d(7);
f.MaterialStreams.Item('NG Feed').PressureValue = d(8);
f.MaterialStreams.Item('NG Feed').MolarFlowValue = d(9);
f.MaterialStreams.Item('C3-1').TemperatureValue = d(10) ;
f.MaterialStreams.Item('NG Feed').TemperatureValue = d(10);
f.MaterialStreams.Item('MR7').TemperatureValue = d(10);
sol.CanSolve = 1 ;