<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Case Representation and Adaptation for Short-Term Load Forecasting at a Container Terminal</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Norman Ihle</string-name>
          <email>norman.ihle@offis.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>OFFIS, Institute for Information Technology</institution>
          ,
          <addr-line>Oldenburg</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <fpage>142</fpage>
      <lpage>151</lpage>
      <abstract>
        <p>The electricity consumption of a terminal is mainly related to the number of container movements and the weather of each day. With the introduction of electric mobility for heavy duty container carriers at a seaport container terminal short-term load forecasting gains an important part in the procurement process. This paper describes a case-based approach to the forecasting of the electricity consumption time-series of the following day based on historical consumption load curves. It mainly focuses on the case representation which is based on a daily view on the so-called sailing list that is used to plan terminal operations and the adaptation processes that are applied to the time-series after case retrieval. The evaluation of the approach shows some promising rst results.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>The introduction of electric mobility in industrial enterprises increases the
importance of energy procurement even in sections where energy procurement was
not in focus until today. Especially when some processes are changed from
conventional to electric mobility in the division of logistics, economic potentials
arise through the use of exible electricity supply contracts. One example of
such a logistic system is a seaport container terminal. Tasks like the transport
of containers from the quay crane to the bulk storage area can be automated
and electri ed. This can be achieved by using battery-electric powered engines
in the heavy-duty vehicles instead of diesel engines. In opposite to Diesel, that
can easily be stored on terminal grounds, the uctuating demand of the fuel
'electricity' has to be procured on a short-term basis. When using the electricity
exchange, the day-ahead market is the last chance to match the procured
electricity load curve with the latest demand forecast values. The forecast of a daily
load curve, a time-series with 15-minute time stamps, is referred to as short-term
load forecasting (STLF).</p>
      <p>Over time many methods for short-term load forecasting have been developed
and are now in use. Some of those methods are developed for speci c
scenarios, others follow a more general approach. Regarding the application of these
methods to the load forecast of a container terminal there is no experience
documented in the scienti c literature. Even though the more general methods can
be applied to all kind of energy consumers, there is no systematic evaluation
which method yields the best results when being applied to a single industrial
site from the logistic domain. Since the consumption of electricity at a container
terminal is subject to some special features that might not be available for other
load forecasting scenarios, e.g. the consumption relies highly on the number of
containers being handled, a solution based on Case-Based Reasoning (CBR) is
proposed. The idea is that days with similar logistic operation requirements have
similar load consumption patterns. This is due to the fact that only a few
handling equipments have a great impact on the load pro le, especially the quay
and yard cranes and the reefer container.</p>
      <p>In the following a case-based load curve forecasting approach is presented that
is based on the list of expected ship arrivals and departures. In chapter 2 the case
representation is introduced with a focus on how the data for exactly one day is
transformed and represented. Chapter 3 describes shortly how time values are
handled in regard to similarity. If a similar case is retrieved the corresponding
consumption time-series can be adapted to t it to the forecasting situation.
Two approaches for the adaptation are introduced in chapter 4. Chapter 5 then
presents the rst results of the evaluation before chapter 6 discusses some related
work. Chapter 7 closes the paper with the conclusion and an outlook on further
work.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Case Representation</title>
      <p>In seaport container terminals the number of logistic operations to be planned
is very high. Containers are continuously delivered and picked up via train,
truck or ship, the quay and yard cranes have to be assigned accordingly and
the storage areas have to be administrated. The most important source for the
operation planning is the list of ship arrivals and departures, the so called
sailing list. The list is a table that includes the most relevant information for the
expected ship arrivals and departures. The list is continuously updated with the
newest available information that the terminal receives from the ship operators
or freight companies. For example, a ship reports its departure from the
previous terminal and the expected travel time to the next terminal. Due to weather
in uences on the traveling speed and other circumstances this information can
vary throughout the route. One day before a ship arrives the expected arrival
time is pretty reliable. Figure 1 shows some examples from the sailing list of the
Container-Terminal Altenwerder (CTA) in Hamburg (Germany) from
September 2013. The data from the sailing list can be used to build up the case base
while the time-series data of the electricity consumption is stored in a dedicated
database outside of the case structure due to performance and e ciency reasons.
For simpli cation reasons one row of the sailing list will be referred to as arrival
in the following.
In a rst step data from the columns of the sailing list can be used for case
modeling using an attribute-value representation. Besides the expected arrival
and departure times of each ship, the sailing list includes information about
how many containers have to be loaded and unloaded from each ship during the
berthing time. These data together with the ship type can then be used to nd
similar days in the past. Similar in this case means that ships with a comparable
number of containers to be handled have been arriving or departing at almost
the same times of the day. The information is adopted for case modeling:
{ JSNR: Attribute CSJSNR
{ Ship type: Attribute CSType
{ Expected arrival time: Attribute CSArrival
{ Expected departure time: Attribute CSDeparture
{ Number of containers to unload: Attribute CImport
{ Number of containers to load: Attribute CExport
The JSNR is a unique identi er of each ship's berthing time. The ship type
distinguishes between a barge, a feeder ship and di erent seagoing vessels, often
represented by the code of the regular tour they are operating on. The expected
arrival and the expected departure times describe the expected berthing time,
which is stored, expressed in minutes, in an additional attribute (CSBerthing).
2.2</p>
      <sec id="sec-2-1">
        <title>Splitting the Berthing Time to Represent One Day</title>
        <p>
          Some entries in the sailing list represent a berthing that includes two or more
dates according to the calendar, e.g. the ship APL VANDA with JSNR 307896 in
Figure 1. Since the time span for the electricity consumption forecast is one day
it is necessary to build up arrivals that represent the information for exactly one
day from 00:00 to 23:59 o'clock. The available information has to be adapted to
t into a daily view of the sailing list information. To build up the daily view a
berthing that exceeds the date limit can be split up to t into multiple (virtual)
arrivals, each representing the data for exactly one date. The information for
JSNR 307896 can be split up to the following three entries:
The number of containers to be handled per ship have to split up as well to
t the new virtual arrival information. For the split up, knowledge about the
crane assignment at the seaside of the terminal can be used since the container
handling is not constant during the berthing time. Using the simulation model
presented in [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] and [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] it can be shown that the container handling numbers for
large ships (more than 250 containers to be handled) decrease over the berthing
time. After some preparation time the handling number starts at a high rate that
is decreasing over time because cranes get allocated to other quay areas due to
little space at the quay or higher priority of other arriving ships. To approximate
this observation, a weighting function is introduced to calculate the number of
containers C that is handled at each full hour hi of the berthing time. Full hours
are chosen here to approximate the distribution of the handling numbers over
the time because more exact information is not available and a break-down to 15
minute values has no further advantage. Based on the average linear handling
rate that is needed to load and unload all designated containers Ctotal of the
ship during all full hours of the berthing time hn it weights the rst hours high
and decreases linear over time:
        </p>
        <p>Chi = (1; 3</p>
        <p>0; 6
hn
1
(hi
1))</p>
        <p>Ctotal with hi = 1; :::; hn
hn
(1)
Based on this function the container numbers of a sailing list entry can be
split into handling numbers for each virtual arrival and departure. If a ship
arrives at the exact beginning of an hour, the rst full hour reserved for handling
preparations is not regarded for htotal and gets assigned a container handling
number of 0. This is also applied if the ship arrives within a full hour.
2.3</p>
      </sec>
      <sec id="sec-2-2">
        <title>Adding Additional Daily Information</title>
        <p>Having adjusted the sailing list so that all available data can be assigned to
exactly one day, daily cases can be built up. For each daily case additional
information can be added. The values for the average temperature and wind speed
of each day are of special interest because it can be shown that particularly the
temperature value has an impact on the electricity consumption. Besides the
weather information the weekday is added to the case since di erent
repeating consumption patterns can be observed in the electricity consumption load
curves of di erent days. While the di erences between the weekdays are not as
remarkable, di erences between load curves of weekdays and days on the
weekend di er even though the container terminal realizes a 24/7 operation. This
might be explained by the lesser use of the o ce building and the Sundays
driving prohibition for trucks in Germany. A special kind of weekday are holidays
at which the terminal is actually shut down as well as the day before and the
day after such a holiday. Figure 2 shows some typical load curves on di erent
days. Two attributes with daily information can be derived from the sailing list
information: the number of arrivals for a day and the overall number of
containers that have to be handled. The second value is a good indicator for the
average electricity consumption level for that day. The more containers have to
be handled the higher the average level. Additionally an attribute saves the date
value. It has the function to link to the corresponding time-series data of the
day.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Similarity for Time-Based Attributes</title>
      <p>
        When comparing two cases the arrival and the departure time of each ship plays
an important role to assess the similarity. In the sailing list the information is
available in a date-time format, the date being separated from the time by a
blank. Since the single cases represent a daily view on the terminal operations,
the date information can be disregarded: only the time information is interesting
for similarity calculations. In order to be able to use simple existing similarity
measures the time value is converted to an integer value. This value represents
the number of minutes that have passed since the start of the day. The time
value 00:00 therefore is represented by 0 and the end of the day at 23:59 by the
value of 1439. If the absolute distance between the time values of two di erent
arrival attributes is less than 60 both arrivals were not more than an hour apart
at the point in time of the day and are therefore quite similar. The similarity
decreases fast if the di erence increases. To represent this, a sigmoid similarity
function based on the distance is chosen as suggested by [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]:
simCSArrival (dCSArrival ) =
(2)
The same function can be used for the departure time as well and with slightly
di erent parameters it can also be used for the attribute CSBerthing.
      </p>
    </sec>
    <sec id="sec-4">
      <title>Adaptation</title>
      <p>The adaptation of the electricity consumption time-series related to similar cases
is twofold. Both approaches are based on data stored in the cases. The rst
adaptation approach focuses on the single values of the time series and tries to
adapt the values of each hour of one day based on the di erence in the number of
container to be handled in each hour. The second one is based on the di erences
in the weather data and is applied to the general level of all time series values
for one day.
4.1</p>
      <sec id="sec-4-1">
        <title>Hourly Container Number Comparison</title>
        <p>It can be shown that the number of containers handled in an hour has a
remarkable impact on the characteristics of the electricity consumption time series. The
higher the number of containers handled the higher the electricity consumption.
The idea behind the rst adaptation approach is to nd hourly di erences in
the number of containers handled on the day of the most similar case and the
day of the query. For this purpose the aggregated container moves per hour i are
calculated. For each arrival that is related to the day of CASEsim the container
number is split into hourly values using the weighting function discussed in
chapter 2.2. In this context not the exact daily values of the virtual arrivals are used,
but the original entries are used in order to be able to use the weighting function
properly and the hourly values are not stored. The same can be done for each
arrival related to the day of the query (QU ERY ). Having done so, the di erence
di between the container handling numbers of CASEsim and QU ERY can be
calculated for each hour. The rst approach was to use this hourly di erence
directly to apply an adaptation factor to the time series values of that speci c
hour, but the evaluation showed that this approach had the shortcoming that
it does not take into account the operations before and after the hour, but they
also have an in uence on the electricity consumption of that hour since
preparations or post-processing also have to be executed. It might also happen that the
di erence in the container handling number is subject to strong uctuations, for
example when large seagoing vessels with a huge amount of containers arrive and
depart, but the uctuation in the electricity consumption is not as high at that
point of time because of smoothing e ects that cause some delay in the change
of consumption pattern. For this reason not only di erence di in the hour i is
regarded when choosing an adaptation factor, but also di erence in the hour
before i 1 and the di erence in the hour after i + 1 are also considered. At the
moment an adaptation factor is assigned to di erent times of day depending on
the discussed di erences using a rule set. Table 1 shows an extract of the rules
as they are applied for the hour 8 (08:00 - 08:59 o'clock) of the time series. The
F actor is added to the time series values of the hour. It can be shown that the
uctuations are higher in the beginning of the day, so the adaptation factors
are higher than the ones for morning and evening hours, while the adaptation
factors for the hours in the middle of the day are rather low.
The second adaptation approach is based on the available weather information.
The highest in uence on the electricity consumption is based on the air
temperature. It can be observed that the energy consumption of the container terminal
is on average signi cantly higher in winter than it is in summer. This is mostly
due to additional heating that is required when having low temperatures and
more lighting is needed on winter days than in summer days. Since the available
temperature values are average temperatures for one day, the di erences in the
temperatures can be applied to increase or decrease the level of the electricity
consumption, but they are only supposed to be applied when the case represents
a winter day and the query a summer day or the other way around and the
temperature di erence is greater than 5 degrees Celsius, since a di erence of 5
degrees on summer days does not show a signi cant e ect on the electricity
consumption. Additionally boundaries for the adaptation were de ned. This means
that if a consumption value is already very high and the temperature based
adaptation would raise this value beyond the upper boundary, the adaptation
is not applied to avoid a forecast of values that are usually not reached under
normal operating conditions of the terminal. The same applies to very low values
and the lower boundary.
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Evaluation</title>
      <p>For the evaluation the sailing lists and the corresponding electricity
consumption time-series of the years 2010 through 2013 of the Container-Terminal
Altenwerder are used. Today, forecasts are generated by using the last week's values
as forecast values (last week approach). While these values t in some cases, they
also generate some remarkable deviation from the forecast to the metered
consumption in other cases. So besides improving the forecasting accuracy, it is also
a goal to decrease the maximum deviations in the forecast compared to the real
consumption. For the CBR approach the adapted electricity consumption
values of the most similar case are used as forecast values. Besides this forecast a
second one based on CBR is calculated by using the mean value of the adapted
time-series values of the three most similar cases instead of only the one of the
most similar case. This forecast will be referred to as CBR Top 3 approach.
The rst results of the evaluation show that the CBR approach can be
successfully applied for forecasting the energy consumption of a container terminal.
When forecasting the electricity consumption load curve for every day in June
2013, the last week approach yields an average Mean Absolute Percentage Error
(MAPE) of 12.0 while the CBR approach yields to 10.0 in average. Having a
yearly electricity consumption of more than 65000 MWh, a 2% better forecast
avoids penalty fees that have to be paid when the procured electricity load curve
does not t the actual metered one can be avoided to a great extent. With the
CBR Top 3 approach the results even yield to a mean of 8.6 which means a
further improvement on the forecast. Figure 3 shows the MAPE values for every
single day in June 2013 for the three approaches. It can be seen that on some
days the MAPE values of the three approaches are close to each other while on
some days the last week approach has very high values. On the 4th and the 8th
of June the mean absolute percentage error of the last week approach is even
higher than 30% while with the CBR Top 3 approach the highest values are
slightly above 15%. This shows that the uctuations can be decreased and the
risks of over- or under-procurement of the electricity for a day is minimized. The
Mean Squared Error (MSE) values of each day in June con rm these ndings
that can be observed when forecasting the following month as well.</p>
      <p>Over the year 2013 the monthly average MSE of the CBR Top 3 approach is
never higher than 0.07 while for the last week approach the maximum average
value is double that value. The average MAPE for the year 2013 is 8,87% for the
CBR Top 3 approach, while the currently used last-week approach has a MAPE
of 12,32% in average.</p>
    </sec>
    <sec id="sec-6">
      <title>Related Work</title>
      <p>
        In the energy consumption forecasting domain only a few works have been
published that present CBR approaches. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] present the system FUTURA to
forecast the medium-term load consumption in Peru. To adjust a calculated
starting solution, the CBR module uses the average of the retrieved similar cases
to smooth out uctuations of the starting solution. The similarity is based on
time attributes like month, weekday, and the time of day. Weather in uences
are disregarded. This adjusted solution is then adapted based with the expert
knowledge regarding the long-term trends in environmental development. It is
stated that the expert knowledge can change the load curve up to 20%
depending on the in uencing parameters. [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] presents an approach for the forecast of
power peaks in a distribution grid based on CBR methods. As attributes the
author uses weekdays, weekday-types and several weather indicators. The case
base is clustered with methods of Self-Organizing Maps (SOM) to allow for a
highly e cient retrieval. The k-nearest neighbor retrieval uses a weighted sum
of all attributes of the request and a cluster. The most similar case is then
retrieved out of the cluster with the highest similarity value. The power peak of
this most similar day is then taken as power peak for the forecast day adapted
by a factor that represents the yearly growth rate in the overall load of the grid.
In a case study it is shown that the suggested solution outperforms simple last
week value approaches and even arti cial neural networks. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] introduce a system
for very short-term load forecasting of o ce buildings based on CBR-methods.
The similarity is assessed with a focus on weather indicators like temperature,
moisture, etc. The weights of the single attributes are dynamically adjusted
regarding the current season and current weather conditions. Using a subset of
the most similar solutions a forecast for the next three hours is built up. It
includes a prognosis whether a new power peak will occur in this time horizon.
The evaluation of the system shows that it can be applied successfully. The mean
squared percentage error is stated to be around 12 to 14 percent. [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] extend this
approach to a forecast horizon of 6 hours and present an on-line implementation
of the system. They also specify the input attributes that are used. Besides the
weather indicators and the current electricity consumption they also use power
values of air conditioning and heaters currently in use and room temperatures
currently metered within the o ce building. None of the related works deal with
the daily short-term load forecasting of single industrial consumers based on
operation plans.
7
      </p>
    </sec>
    <sec id="sec-7">
      <title>Conclusion and Outlook</title>
      <p>This paper presented an approach to use CBR methods to realize a system for
short-term load forecasting for a single industrial customer, a container terminal,
and focused on the case modeling and the adaptation of the time-series. The
forecast of the electricity consumption for every quarter of an hour of the next
day is based on the logistic operation plan that is set up for the next day. This
plan includes data about expected ship arrival and departure times as well as
information about the number of containers to be handled with each ship. This
information can be used to nd days in the past with a similar operation plan.
The electricity consumption time-series of a similar day can than be adapted
based on di erences in the operations of each day and based on weather data.
The approach has some advantages when compared to other established load
forecasting methods: it is generally applicable to maritime container terminals,
the computational cost is rather low and the results are comprehensible. The
evaluations shows that the approach can be applied successfully.</p>
      <p>Further improvements might be reached by integrating information about
the container numbers that are delivered and picked up by truck or train to
approximate the number of container handles and their course more exactly.
At the moment this number is estimated because of lack of the data. For the
adaptation process a yearly factor can be introduced that will represent the
yearly average change in electricity consumption that can be observed over the
previous ve years. This is also important because in general the case-based
forecasting approach tends to underestimate the actual values when applied at
the use-case CTA, where the average yearly electricity consumption constantly
increased during the last years. It is to be investigated if a CBR-STLF-approach
for single electricity consumers based on operation plans can be generalized to
further domains than container terminals. Logistic systems can be in focus here
as well as more di erent systems like industrial production sites.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Bergmann</surname>
          </string-name>
          , R.:
          <source>Experience Management: Foundations, Development Methodology, and Internet-based Applications</source>
          . Springer-Verlag, Berlin, Heidelberg (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Grundmeier</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hahn</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ihle</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Runge</surname>
            , S., Meyer-Barlag,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>A simulation based approach to forecast a demand load curve for a container terminal using battery powered vehicles</article-title>
          .
          <source>In: Neural Networks (IJCNN)</source>
          , 2014 International Joint Conference on. pp.
          <volume>1711</volume>
          {
          <fpage>1718</fpage>
          .
          <string-name>
            <surname>IEEE</surname>
          </string-name>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Grundmeier</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ihle</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hahn</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>A discrete event-driven simulation model to analyse power consumption processes in container terminals</article-title>
          .
          <source>In: Simulation in Production and Logistics</source>
          <year>2015</year>
          . Fraunhofer IRB Verlag, Stuttgart (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Monfet</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Arkhipova</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Choiniere</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Evaluation of a case-based reasoning energy prediction tool for commercial buildings</article-title>
          .
          <source>International Conference for Enhanced Building Operations</source>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Platon</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dehkordi</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Martel</surname>
          </string-name>
          , J.:
          <article-title>Hourly prediction of a building's electricity consumption using case-based reasoning, arti cial neural networks and principal component analysis</article-title>
          .
          <source>Energy and Buildings</source>
          <volume>92</volume>
          ,
          <issue>10</issue>
          {
          <fpage>18</fpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Vilcahuaman</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Melendez</surname>
          </string-name>
          , J.:
          <article-title>Improvement of electric load forecasting reusing past instances and contextual based adaptation</article-title>
          .
          <source>In: Transmission and Distribution Conference and Exposition: Latin America</source>
          ,
          <year>2004</year>
          IEEE/PES. pp.
          <volume>271</volume>
          {
          <issue>276</issue>
          (Nov
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>Z.Y.</given-names>
          </string-name>
          :
          <article-title>Developed case-based reasoning system for short-term load forecasting</article-title>
          .
          <source>In: 2006 IEEE Power Engineering Society General Meeting</source>
          . pp.
          <volume>6</volume>
          pp.
          <source>{</source>
          (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>