/** * Creates a new endstate-safe schedule from the given schedule. (last state copied as deep copy, all others shallow copies) * @param schedToMakeSafeCopyFrom the schedule to copy */ public AssetSchedule(AssetSchedule oldSchedule) { AssetSchedule newAssetSched = DeepCopy.Copy <AssetSchedule>(oldSchedule); InitialState = newAssetSched.InitialState; Events = newAssetSched.Events; }
/** * Creates a new assetSchedule from and old assetSchedule and a new Event shared pointer * @param oldSchedule the old schedule to base this schedule off of * @param newEvent the new event to add to the schedule */ public AssetSchedule(AssetSchedule oldSchedule, Event newEvent) { AssetSchedule newAssetSched = DeepCopy.Copy <AssetSchedule>(oldSchedule); InitialState = newAssetSched.InitialState; Events = newAssetSched.Events; Events.Push(newEvent); }