Pseudocode for RPC method `ComputeTopologyForecast`:
```python
  # Setting to configure the ratio between requested forecast and amount of historical data to be used for the forecast.
  # E.g., if forecast window is 1 week, compute forecast based on 10 weeks of historical data.
  FORECAST_TO_HISTORY_RATIO = 10

  history_window_seconds = FORECAST_TO_HISTORY_RATIO * request.forecast_window_seconds

  forecast_reply = ForecastTopologyCapacityReply()

  topology = context_client.GetTopology(topology_id)
  for link_id in topology.link_ids:
    link = context_client.GetLink(link_id)

    used_capacity_history_gbps = monitoring_client.GetKPIValue(link_id, KPI.LinkUsedCapacity, window=history_window_seconds)
    forecast_used_capacity_gbps = compute_forecast(used_capacity_history_gbps, forecast_window_seconds)

    forecast_reply.link_capacities.append(ForecastLinkCapacityReply(
      link_id=link_id,
      total_capacity_gbps=link.total_capacity_gbps,
      current_used_capacity_gbps=link.used_capacity_gbps,
      forecast_used_capacity_gbps=forecast_used_capacity_gbps
    ))

  return forecast_reply
```

## PathComp Impact
After retrieving the topology, if the service has a duration constraint configured, the PathComp component should interrogate the Forecaster and request a topology forecast according to the requested duration of the service. The computed link capacity forecast should be used as link capacity in path computations.

```
  link_capacities : Dict[str, float] = dict() # link_uuid => available_capacity_gbps
  service_duration = get_service_duration(request.service)
  if service_duration is None:
    topology = context_client.GetTopologyDetails(topology_id)
    for link in topology.links:
      link_capacities[link.link_id.uuid] = link.available_capacity_gbps
  else:
    forecast_request = ForecastTopology(
      topology_id = TopologyId(service.context_id, admin),
      forecast_window_seconds = service.duration
    )
    forecast_reply = forecaster_client.ComputeTopologyForecast(forecast_request)
    for link_capacity in forecast_reply.link_capacities:
      total_capacity_gbps = link_capacity.total_capacity_gbps
      forecast_used_capacity_gbps = link_capacity.forecast_used_capacity_gbps
      forecast_available_capacity_gbps = total_capacity_gbps - forecast_used_capacity_gbps
      link_capacities[link_capacity.link_id.uuid] = forecast_available_capacity_gbps

  # Continue path computation passing link_capacities to the path comp algorithms.
```