I’m using simul to do perfect foresight simulations and would like to have control over the initial guess of the entire sequence of endogenous variables. There appears to be a capability to do this in Dynare. I have found reference to
a flag valf_ in simul.m and also located a matlab file initvalf_.m that appear to allow me to this. But I have not been able to find any documentation that explains specifically how to set the flag in the mod file and how to format the input file. It would be very helpful if you could provide me with more information or an example that illustrates how to do this.

The easiest is to use the HISTORICAL instruction