@Override
  public PrepareContractionHierarchies doWork() {
    checkGraph();
    if (prepareEncoder == null) throw new IllegalStateException("No vehicle encoder set.");

    if (prepareWeighting == null) throw new IllegalStateException("No weight calculation set.");

    allSW.start();
    super.doWork();

    initFromGraph();
    if (!prepareEdges()) return this;

    if (!prepareNodes()) return this;

    contractNodes();
    return this;
  }