A user has noted that it would be useful to add a parameter that accounts for leakage when government funds are invested in infrastructure due to corruption or other frictions. This parameter would scale the I_g amount so that only a percentage of it goes into the stock of K_g.
The simplest approach is to model this as complete dead weight loss -- so the resources lots due to leakage just disappear. One could model it as a transfer (e.g., a government official pocketing part of the investment) but it may be hard to assign this resource to a particular class of agents.