function output = myfunction(Knew,M_,oo_,options_)

oo_.endo_simul(strmatch('k',M_.endo_names,'exact'),1)=Knew;

oo_ = perfect_foresight_solver_core(M_,options_,oo_);
if ~oo_.deterministic_simulation.status
    output=NaN(1,2);
else
    C1 = oo_.endo_simul(find(strcmp('c',M_.endo_names)),1);
    N1 = oo_.endo_simul(find(strcmp('n',M_.endo_names)),1);
    output = [C1, N1];
end


