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

sol.CanSolve = 0 ;

% Disturbances: Feed conditions and cooling temperature
f.MaterialStreams.Item('MR4').TemperatureValue = d0(1) ; 
f.MaterialStreams.Item('NG1').TemperatureValue = d0(1) ; % Assume MR and NG are cooled to the same temperature
f.MaterialStreams.Item('NG1').PressureValue = d0(2) ; 
f.MaterialStreams.Item('NG1').MolarFlowValue = d0(3) ; 

% Inputs

f.MaterialStreams.Item('MR1').TemperatureValue = x0_full(1) ; % Temperature guess for recycle (C)
f.MaterialStreams.Item('MR5').TemperatureValue = x0_full(2) ; % Temperature of hot MR after HX (C)
f.MaterialStreams.Item('MR7').PressureValue = x0_full(3) ; % Pressure after MR turbine (kPa)
f.MaterialStreams.Item('MR9').PressureValue = x0_full(4) ; % Pressure before compressor (kPa)
f.Operations.Item('K-100').CompressorSpeedValue = x0_full(5) ; % Compressor speed (NB! Hz, not rpm)

%MR composition. Each of these four streams (C1-C4) are reference streams,
%the molar flow rate given (in kmol/s) will translate directly into a molar
%fraction in the refrigerant stream itself)
f.MaterialStreams.Item('C1').MolarFlowValue = x0_full(6) ; 
f.MaterialStreams.Item('C2').MolarFlowValue = x0_full(7) ; 
f.MaterialStreams.Item('C3').MolarFlowValue = x0_full(8) ; 
f.MaterialStreams.Item('C4').MolarFlowValue = x0_full(9) ; 

f.MaterialStreams.Item('MR1').MolarFlowValue = x0_full(10) ;

f.Operations.Item('RCY-1').IsIgnored = 0 ;
sol.CanSolve = 1 ;