anchor.diff:    try
       oraSession.connectString := aConnectString;
       oraSession.Open;
  +
       initStops(oraSession);
       initTimeTable(oraSession);
       initChargerTypes(oraSession);
  
positive.code:             begin // Chargers can be edited
                marker.addOptionString(sojnContextMenu, 'true');
                marker.addOptionString(sojnContextmenuInheritItems, 'false');
                marker.addOptionStructure(sojnContextmenuItems, '[{"text": "Edit charge location","index": '+stop.chargeID.ToString+', "tag":"'+tagEditChargeLocation+'"}]');
              end;
  
              AddObject(marker, marker.jsonNewObject);
  
negative.code:   isNew: Boolean;
    socChart: TChart;
    t: TDateTime;
    tableExists: boolean;
  const
    SocChartID = 'santosSoc';
  begin
    zero := SantosTimeToDateTime('00:00', fBaseDay);
    tableName := aTablePrefix + 'EBUS_INDIC_DAT' + cINDIC_DAT_TYPE_BLOCK +
                 fCurrentBusBlock.ToString.PadLeft(2,'0') + cINDIC_DAT_BLOCK_SOC;
  
    tableExists := MyOraLib.tableExists(aSession, tableName);
  
    TMonitor.Enter(aScenario.Charts);
    try
      isNew := not aScenario.Charts.TryGetValue(SocChartID, socChart);
    finally
      TMonitor.Exit(aScenario.Charts);
    end;
  
    if isNew and tableExists then
    begin
      socChart := TChartLines.Create(aScenario, 'Santos' , SocChartID, 'State of Charge',
                   'State of Charge', True, 'line',
                TChartAxis.Create('Time (hour of day)', 'lightBlue', 'Time', 'h'{, True, 0, 36*60*60}),
                [ TChartAxis.Create('State of Charge (%)', 'lightBlue', 'Dimensionless', '%'{, True, 0, 100})]);
    end;
  
    if Assigned(socChart) then
    begin
      TMonitor.enter(socChart);
      try
         // Clear
        if not isNew then
          socChart.reset;
  
        if tableExists then
        begin
          query := TOraQuery.Create(nil);
          try
            query.Session := aSession;
            query.SQL.Text := 'SELECT X,Y,LPAD(TRIM(TIME), 5, ''0'') as TIME ' +
                              'FROM ' + tableName + ' ORDER BY TIME ASC';
            query.Open;
              while not Query.Eof do
              begin
                t := SantosTimeToDateTime(Query.FieldByName('TIME').AsString, fBaseDay);
                minOfDay := MinutesBetween(zero, t) *60;
                (socChart as TChartLines).AddValue(
                  minOfDay,
                  [Query.FieldByName('Y').AsFloat/100]
                );
                Query.Next;
              end;
  
          finally
            query.Free;
          end;
  
          if isNew then
            aScenario.addChart(socChart);
        end;
      finally
        TMonitor.Exit(socChart);
      end;
    end;
  end;
  
  procedure TSantosProject.ReadChartChargerTotalPower(aSession: TOraSession; aScenario: TScenario;
    const aTablePrefix: string; aCharger: Integer);
  var
    zero, t: TDateTime;
    minOfDay: Integer;
    query: TOraQuery;
    tableName: String;
    isNew, tableExists: Boolean;
    chgTotalPowerChart: TChart;
    chartID: string;
  const
    ChgPwrChartID = 'santosChgPwr';
  begin
    zero := SantosTimeToDateTime('00:00', fBaseDay);
    tableName := aTablePrefix + 'EBUS_INDIC_DAT' + cINDIC_DAT_TYPE_GRID + aCharger.ToString.PadLeft(2,'0') + cINDIC_DAT_GRID_TOTALPOWER;
  
    tableExists := MyOraLib.TableExists(aSession, tableName);
  
    chartID := ChgPwrChartID + aCharger.ToString;
  
    TMonitor.Enter(aScenario.Charts);
    try
      isNew := not aScenario.Charts.TryGetValue(chartID, chgTotalPowerChart);
    finally
      TMonitor.Exit(aScenario.Charts);
    end;
  
    if isNew and tableExists then
    begin
      chgTotalPowerChart := TChartLines.Create(aScenario, 'Santos' , chartID, 'Charge Location ' + aCharger.ToString + ' Total Power',
                    'Charge Location ' + aCharger.ToString + ' Total Power', True, 'line',
                TChartAxis.Create('Time (hour of day)', 'lightBlue', 'Time', 'h'),
                [ TChartAxis.Create('Total Power (-)', 'lightBlue', 'Dimensionless', '-')]);
    end;
  
    if Assigned(chgTotalPowerChart) then
    begin
      TMonitor.enter(chgTotalPowerChart);
      try
         // Clear
        if not isNew then
          chgTotalPowerChart.reset;
  
        if tableExists then
        begin
          query := TOraQuery.Create(nil);
          try
            query.Session := aSession;
            query.SQL.Text := 'SELECT LPAD(TRIM(X), 5, ''0'') as TIME,Y ' +
                              'FROM ' + tableName + ' ORDER BY TIME ASC';
            query.Open;
              while not Query.Eof do
              begin
                t := SantosTimeToDateTime(Query.FieldByName('TIME').AsString,fBaseDay);
                minOfDay := MinutesBetween(zero, t) *60;
                (chgTotalPowerChart as TChartLines).AddValue(
                  minOfDay,
                  [Query.FieldByName('Y').AsFloat]
                );
                Query.Next;
              end;
  
          finally
            query.Free;
          end;
        end;
  
        if isNew then
          aScenario.addChart(chgTotalPowerChart);
      finally
        TMonitor.Exit(chgTotalPowerChart);
      end;
    end;
  end;
  
  function TSantosProject.ReadScenario(const aID: string): TScenario;
  var
    dbScenario: TUSDBScenario;
    oraSession: TOraSession;
    tablePrefix: string;
    santosLayer: TSantosLayer;
  begin
    Result := inherited; // TUSStuff
    if Assigned(Result) then
    begin
      TMonitor.Enter(fSantosLayers);
      try
        if not fSantosLayers.TryGetValue(Result, santosLayer) then
        begin
          // Scenario found, add to it
          oraSession := TOraSession.Create(nil);
          try
            oraSession.ConnectString := (self as TMCProject).controlInterface.DataSource;
            oraSession.Open;
  
            tablePrefix := (Result as TUSScenario).Tableprefix;
  //          GetScenarioTablePrefix(oraSession,  aID);
            ReadChartBlockSoC(oraSession, Result, tablePrefix);
            ReadChartChargerTotalPower(oraSession, Result, tablePrefix, 2); // TODO
          finally
            oraSession.Free;
          end;
  
          santosLayer := TSantosLayer.Create(Result, fCurrentBusBlock, fBaseDay[0], fBaseDay[1], fBaseDay[2], 'Santos', 'Santos'+fCurrentBusBlock.ToString,
            'Bus block '+fCurrentBusBlock.ToString, 'Bus block '+fCurrentBusBlock.ToString+' stops',
            (self as TMCProject).controlInterface.DataSource, tablePrefix, fIMB3Connection.Publish('EBUS_CHARGELOCATION'));
  
          Result.AddLayer(santosLayer);
          fSantosLayers.Add(Result, santosLayer);
        end;
      finally
        System.TMonitor.Exit(fSantosLayers);
      end;
    end;
  end;
  
  