# Analyzing the impact of forecast errors in the planning of wine grape
harvesting operations using a multi-stage stochastic model approach

Alejandro Milani<EMAIL_ADDRESS>Alejandro Mac Cawley<EMAIL_ADDRESS>Department of
Industrial and Systems Engineering. Pontificia Universidad Católica de Chile,
Av. Vicuña Mackenna 4860, Santiago, Chile

###### Abstract

Forecasts and future beliefs play a critical role in the harvest labor hiring
planning, especially when errors in them entails fixing previous made
decisions, which can carry extra costs or losses. In this article, we study
the effect that errors in the forecast/belief can have in the wine grape
harvest planning process and the losses of the product. Errors are reflected
in the prediction of yields and in the estimation of rain transition
probabilities have on the value and losses of product. Also, using a multi-
stage stochastic optimization model we can study the effect that second stage
decisions have on the ability fix the planning decisions, reduce product
losses and generate value. In a first step, we develop a multi-stage
stochastic model which considers grape growth uncertainty given a belief in
future events. The model decisions variables are: hiring, firing and
maintaining harvest labor through periods, and also the harvested quantities
in each period and block. Once the model defines the plan for the coming
epoch, some decisions are implemented and a deviation in the forecast is
revealed and the decision maker can adjust future decisions and beliefs.
Results indicate that the effect of the errors in yield determination is not
symmetrical; underestimations of the yields have a more significant negative
effect on the objective function, while overestimation does not. Flexibility
to revise hiring decisions does not make a significant difference if the
yields are overestimated. The model significantly reduces losses of the
better-quality grapes, since they correspond to a significant proportion of
the income and account for the largest portion of income loss. Last, grapes
that have an early improvement of their quality give the decision-maker an
extra level of flexibility to adjust the harvesting plan.

###### keywords:

Harvesting planning, Multi-stage stochastic optimization , Uncertainty
modeling , Forecast Errors , OR in agriculture

††journal: arXiv

##  1 Introduction

Operations planning is an important step in any activity, as it aligns
resources in order to achieve the optimal economic value of production. This
is particularly critical in agriculture operations, where uncertainty is
always present. In fact, agricultural planners need to deal with a number of
uncertain factors, such as biological and environmental, among others; which
can generate significant variability and add complexity to the production
planning process.

To reduce the effect that variability has on the production planning, managers
seek for information and forecasting methods which aim to reduce the
uncertainty of future events. However, these models generate errors which need
to be handled as the state of nature reveals. Another way to handle
uncertainty is the possibility or flexibility to reassign after the
uncertainty reveals itself which gives a performance advantage (Avanzini et
al., 2021). Flexibility relates to the ability to re-allocate or re-distribute
resources in the most effective way, after any uncertainty has been revealed
(Chen et al., 2018). These has been modeled in stochastic programming using
second-stage recourse decisions which allow the decision maker to adjust the
system as new information is available. Flexibility is not only a desirable
characteristic, but it is quickly becoming a requirement for survival of
production-oriented companies (Arafa and ElMaraghy, 2012; Barad, 2013;
Chryssolouris et al., 2013; Patel et al., 2012; Patel, 2011; Shi and Daniels,
2003)

The effect of forecasts in planning is not new in the literature, Ziarnetzky
et al. (2018) studies the performance of the planning models, using a rolling
horizon environment using a simulation model of a scaled-down wafer fab that
considers forecast updates and one that does not. Altendorfer et al. (2016)
study the effect of long-term forecast error on the optimal planned
utilisation factor for a production system facing stochastic demand. However
in realm of agriculture, where forecast inaccuracy is known, has not been
studied.

Ferrer et al. (2008) and Arnaout and Maatouk (2010) presents a grape
harvesting optimization model which accounts for the quality degradation as
the grapes are not harvested in their optimal date. In their work, they do not
account for variability in the grape growth nor stock uncertainty. In a more
recent work by Avanzini et al. (2021), they present a multi-farm multi-period
model which consider demand, maturation, harvest, and yield risk and solves an
expected value problem. They found that considering the uncertainties produces
value compared to not doing it. However, in this case the authors did not
account for the possibility of the planner to revise its decisions as the
states of the nature reveals itself. Another way of considering the
uncertainty, is the use of a multistage stochastic optimization model (MSSOM)
(Birge and Louveaux, 2011; Pflug and Pichler, 2016) where the decision is made
for each node of a tree of events considering its history but considering
possible futures. The MSSOM approach is more complex to obtain computationally
but it prescribes a tree of decisions according to the evolution of the
uncertainty over time. The work by Ahumada et al. (2012) develops a two-stage
stochastic model in which the decisions in a first stage are planting
constraints and the costs associated with the planting decisions, such as
labor cost and availability.

In this research we will consider the planning of harvesting operations for
grapes destined to wine production, where uncertainty is given by different
rate of grape growth and their transition probabilities, affecting the yields
and the revenue. In this setting, the decision-maker needs to decide the
amount of workers to hire, its allocation and harvesting schedule, accounting
for an uncertain future grape stock. We will study the effect that forecast
accuracy’s or the decision maker beliefs have on on the economic value of
production planning, depending on the grape’s quality behavior and on the
level of flexibility to fix taken decisions, based on a multistage stochastic
optimization model. The uncertainty will be modeled by considering two main
sources: different possible grape’s yields and the allocation of transition
probabilities between them over periods. The model will also consider the
gapes quality over time so that if it is not harvested in the optimal ripeness
period the grape losses economic value (Ferrer et al., 2008). We present a
multistage stochastic optimization model which accounts for the variability in
the grape yields over time, future stock belief and the quality behavior of
the product.

The contribution of this work is threefold: first, to model the effect that
errors in the planners’ beliefs have on the quality of the harvesting plan;
second, under which conditions these mistakes have high impact on the plan and
finally, how does resource flexibility affect it. To achieve this, we will
compare the results of different schedules depending on the accuracy of the
future belief and the level of flexibility to fix decisions after uncertainty
reveals, using our MSSOM, and determine a quantitative value for flexibility
and accuracy and their impact on the economic value of production planning.
Finally, we will analyze how the quality characteristics of the grape affects
the production value under these scenarios.

The document is organized as follows. In Section 2, we present a literature
review on how uncertainty has been incorporated in production planning and how
the quality has been explored. In Section 3, we present the original
optimization model, then its modifications to add uncertainty and the two
grape’s quality behaviors considered in the analysis. Section 4 shows the main
results, for a later discussion and conclusion in Section 5.

##  2 Literature Review

Production planning under uncertainty in agricultural systems is starting to
receive increasing attention from researchers and practitioners in recent
years (Borodin et al., 2016). It has been previously studied using different
approaches such as: stochastic optimization, chance constrain, robust
optimization or dynamic optimization. Bohle et al. (2010) uses a robust
optimization approach for wine grape harvesting scheduling optimization
problem subject to several uncertainties. Moghaddam and DePuy (2011) uses a
stochastic optimization model with chance constrained optimization to
determine the optimal number of acres of hay a farm should harvest for their
own horses’ consumption, as well as how much hay to purchase and sell to
maximize the total profit of the farm. Borodin et al. (2014) presents a
stochastic optimization model for the annual harvest scheduling problem of the
farmers’ entire cereal crop production at optimum maturity, using the
meteorological conditions as the deciding factor that affects the harvest
scheduling and progress. Kennedy (1988) has a complete book in which he looks
at the applications of dynamic and stochastic dynamic programming to
agriculture and natural resources. Finally, a more recent work by Dowson et
al. (2019), presents and stochastic optimization model for a dairy farm,
however there are still not many applications of multi-stage stochastic
optimization model (MSSOM) in the agricultural sector.

In wine production planning, a more recent work by Avanzini et al. (2021)
presents a MSSOM model to plan the harvest operations of wine grapes where
uncertainty in weather conditions can affect the quality of grapes. They
consider decisions on labor allocation and harvesting schedules, bearing in
mind the uncertainty of future rain. Weather uncertainty is modeled following
a Markov Chain approach, in which rain affects the quality of grapes and labor
productivity. Climatic factors deteriorate grape quality over time and if they
are not harvested on the optimal ripeness period. Finally, they also consider
the effect in labor flexibility as the differences in ability between workers,
which impact how they will cope with the effects of rain. Ahumada and
Villalobos (2009) conclude in their review, that planning models in
agriculture very often fail to incorporate realistic stochastic issues in the
agriculture. They go further and indicate that perhaps the reason for this
lack of more realistic scenarios is the added complexity of finding solutions
for the resulting models. Despite their expressive ability in modeling various
real-life problems, multi-stage stochastic modeling has not been widely used
in practice as they are notoriously difficult to solve. There are just few
very recent examples of applications of stochastic optimization in
agriculture. In the work by Dowson et al. (2019) they formulate a stochastic
optimization model of a dairy farm, Flores and Villalobos (2020) develop a
framework to plan planting and harvesting schedules, and Avanzini et al.
(2021) plan the wine grape harvesting.

An important aspect in building a multistage stochastic model consists in
developing an approximate representation of the underlying uncertainty. A
common representation can be performed in the form of a scenario tree (Heitsch
and Romisch, 2009). The process of obtaining such reduced scenarios may vary,
but generally they are based upon variance reduction techniques (Higle, 1998;
Shapiro, 2003). Löhndorf (2016) summarizes the state of-the art of scenarios
generation of multivariate random variables for sample average approximation
in: quasi-Monte Carlo methods, methods based on probability metrics, and
moment matching. Still these techniques are based upon the premise that we
know the underlying distribution of the events, so their objective is to
define a reduced representation to make the problem tractable.

In many of the cases we do not have complete information about how the future
events distribute and we can only rely on historical data to infer the
distribution. In these cases, is relevant to determine how we use and process
the historical information to generate the future scenarios. We can find
different approaches to this: forecasting methods, clustering methods and
heuristics. In the work by Dowson et al. (2020) they present a framework where
a policy graph provides a natural means for decomposing the multistage
stochastic program into a collection of subproblems, with arcs linking these
subproblems representing the flow of information through time. This allows to
naturally account for the information update as the states of nature reveals
themselves. It also allows to solve a partially observable problem with
continuous state and control variables using a stochastic dual dynamic
programming (SDDP) approach.

The use historical data for the generation of future scenarios is not new in
the agricultural sector. Chen et al. (2004), study how the climate change
influence on the distribution of future crop yields, specifically they analyze
the effect that the variance have on production. Murynin et al. (2013), uses
image sequences of over 10 years to build and compare four yield prediction
models. The models are developed through gradual addition of complexity. The
initial model is based on linear regression using vegetation indices while the
final model is non-linear.

The impact that forecast errors have on the overall quality of the plan and
value of the objective function has been studied in the literature by
analyzing the optimal learning levels. Ziarnetzky et al. (2018) studies the
performance of the planning models, using a rolling horizon environment using
a simulation model of a scaled-down wafer fab that considers forecast updates
and one that does not. He and Powell (2018) analyzes the value of information
by maximizing an objective function represented by a nonlinear parametric
belief model, while simultaneously learning the unknown parameters, by guiding
a sequential experimentation process which is expensive. Huang et al. (2019)
determines that an accurate evaluation of the expected operational cost
associated with an allocation decision can be very expensive. They propose a
learning policy that adaptively selects the fleet allocation to learn the
underlying expected operational cost function by incorporating the value of
information. Related to production planning, Altendorfer et al. (2016) study
the effect of long-term forecast error on the optimal planned utilisation
factor for a production system facing stochastic demand. Forecast errors can
be transmitted from the researcher to the farmer by recommendations (Kolajo et
al., 1988). Thus, the choice of model and the assumptions incorporated to the
model may constitute a source of errors. In a warehouse environment study by
Sanders and Graman (2009), they found that forecast biases have a considerably
greater impact on organizational cost than forecast standard deviation.

There are a number of techniques to benchmark the value generated by using a
MSSOM approach. Huang and Ahmed (2009) proposes a simple way of measuring the
input of the decision process: the difference between the values of the
objective functions. In their work, they present the case for capacity
planning, comparing the values obtained by a multistage stochastic model with
a two-stage model. Escudero et al. (2007) proposes to compare the expected
result of using the solution of the deterministic mode (EEV); the wait and see
solution value (WS), which corresponds to the expected value of using the
optimal solution for each scenario and finally; the here-and-now solution,
which corresponds to the optimal solution value to the recursion problem (RP)
or MSSOM. With these results we can determine the EVPI = WS – RP, which
denotes the expected value of perfect information and compares here-and-now
and wait-and-see and, VSS = RP - EEV which denotes the value of the stochastic
solution and compares the here-and-now and expected values approaches.

Despite all the above, none has analyzed the relation between the quality of
the scenario generation and the flexibility of the system and how does that
relation affect the value of using a MSSOM approach. Powell (2019) points out
in his research challenges: almost no attention has been devoted to analyzing
the quality of a stochastic look-ahead model. He goes further and indicates
that there is a need more research to understand the impact of the different
types of errors that are introduced by the approximations used.

##  3 Problem Formulation

In this section, we present first a stylized version of Ferrer et al. (2008)
deterministic model. Second, we will discuss the way we add uncertainty to the
model in the form of grape yield variability and its behavior over time. After
that, we present the reformulated model as a multistage stochastic model which
considers the mentioned uncertainty. Finally we present the analysis method to
estimate the forecast accuracy’s impacts on the economic value of harvest
planning.

###  3.1 Deterministic Grape Harvesting Problem

We propose a wine grape harvesting model based on the previous work by Ferrer
et al. (2008). In this work the authors present a deterministic optimization
model which minimizes the labor and machine cost and also the quality
degradation of the grapes. For this, they introduce a quality loss function
which generates extra costs when harvesting deviates from the ideal date. The
model determines the amount of labor and machine, its assignment to each lot
and day, also the kilograms of grape to be harvested and sent to the cellar.

For our model, we assume that a farmer owns $J$ blocks that contains wine
grapes, with an initial stock $s_{j,0}$, expressed in $kilograms$. The goal of
the farmer or farm manager is to maximize the final profit of the wine grapes.
To do that, the farmer faces a decision window of $T$ periods and on each
period he/she has to make a decision regarding the the amount of work entered
and dismissed, $x_{t}$ and $y_{t}$ respectively and the quantity of labor to
allocate $z_{j,t}$, that implies a capacity of harvesting in that period and
in that block. The net labor available in period $t$ is denoted by $m_{t}$ and
$\beta$ is the productivity of the resource ($kilograms/period$). Grapes are
harvested and sent to a winery during the same period, where $K$ is the
single-period reception capacity of the winery.

The costs are mainly about labor force. There are cost of hiring $C_{e}$, of
termination $C_{f}$ and costs of keeping labor between periods $C_{k}$.
Additionally, there is the harvesting cost $C_{h}$ ($\$/kilograms$) that is a
productivity payment.

Income is generated by selling the harvested grapes at a market price, which
we denote by $b_{j}$ for the grapes of block $j$. The actual price, however,
is affected by the final quality of grapes, which depends on the specific
harvest time. We represent this by a quality factor, $q_{j,t}$, which is equal
to 1 when $t$ is the optimal period for harvesting (which depends on grape
ripeness), and decreases when $t$ differs from that optimal period. This is a
similar representation to the one used by Ferrer et al. (2008), later we
explain the specifics of this coefficients. In this way, the total net income
at any time is $\sum_{j\in J}b_{j}q_{j,t}h_{j,t}$, where $h_{j,t}$ is the
harvested amount from block $j$ in period $t$.

The basic deterministic model is the following:

$\begin{array}[]{ll}\min&\sum\limits_{j=1}^{J}\bigg{\\{}\sum\limits_{t=1}^{T}\\{(C_{h}-b_{j}q_{j,t})h_{j,t}+C_{e}x_{t}+C_{f}y_{t}+C_{k}m_{t}\\}\bigg{\\}}\\\
s.t.&\\\ &\begin{array}[]{lll}m_{t}=m_{t-1}+x_{t}-y_{t}&t=1,...,T&(d1)\\\
\sum\limits_{j=1}^{J}z_{j,t}\leq m_{t}&t=1,...,T&(d2)\\\
\sum\limits_{j=1}^{J}h_{j,t}\leq\beta m_{t}&t=1,...,T&(d3)\\\ h_{j,t}=\beta
z_{j,t}&t=1,...,T&(d4)\\\ \sum\limits_{j=1}^{J}h_{j,t}\leq K&t=1,...,T&(d5)\\\
h_{j,t}\leq S_{j,0}-\sum\limits_{l=1}^{t-1}h_{j,l}&t=1,...,T,j=1,...,J&(d6)\\\
h_{j,t}\geq 0&t=1,...,T,j=1,...,J&(d7)\\\ x_{t},y_{t},m_{t},z_{t}\geq
0,\in\mathbb{Z}_{+}&t=1,...,T&(d8)\\\ \end{array}\end{array}$

The objective function computes net income (with negative sign to be solved as
a minimization problem). Expression (d1) is the manpower balance, while
relation (d2) limits the number of allocated resources. Relation (d3) bounds
the total harvest in terms of labor capability and relation (d4) indicates
that every assigned worker produces in accordance with his/her productivity
level. Relation (d5) bounds the total harvest in terms of single-period
reception capacity as we assume that all grapes harvested in a given period
have to be processed during the period. Constraint (d6), indicates the
available stock of grapes to be harvested at a given moment, which is given by
the initial stock minus what has been already harvested. Finally, constraints
(d7) and (d8) establish the nature of the variables.

###  3.2 Uncertainty Sources

Uncertainty in the wine grape harvesting planning can arise from a number of
factors: weather conditions, harvest yield, worker or machinery productivity
or market (prices), among some of the conditions which can introduce
uncertainty into the process. In this research we will concentrate on the
uncertainty given by the amount of grapes available for harvest or yield,
defined by the stock of grapes $s_{j,t}$ at each moment $t$, and also the
weather conditions, which are represented as a transition probabilities that
directly affect the grape stock or yield.

####  3.2.1 Grape Yields

The grape yield depends directly on weather, pest and land conditions during
the productive period and these condition account for the main sources of
uncertainty which add complexity to the harvest planning process. As grapes
the harvest evolve during the harvest season, the effective available stock of
grapes can also change due to climatic conditions or errors in the forecast of
the effective yields. In the case of the uncertainty given by the climatic
conditions, the decision maker will plan taking into account these conditions,
which we will define by using scenarios $\omega$. These scenarios $\omega$
will be constructed by using a factor of the available grapes given by
$\alpha_{t}^{\omega}$, if the factor is 1 the available stock will be
unchanged, if the factor is above 1 the grape stock increases and a factor
below 1, indicates that the stock is reduced.

To model the uncertainty in yield due to climatic and errors in yield
estimation, for each possible scenario $\omega$ we model the pre-harvest grape
stock $S_{j,t}^{\omega}$ of a certain block $j$ in a given period $t$, that
will be determined by a yield factor $\alpha_{t}^{\omega}$ that changes the
current grape stock quantity, which is given by the previous stock quantity
$S_{j,t-1}^{\omega}$ minus the amount of harvested grape $h_{j,t-1}^{\omega}$:

$S_{j,t}^{\omega}=\alpha_{t}^{\omega}(S_{j,t-1}^{\omega}-h_{j,t-1}^{\omega})$

####  3.2.2 Transition Probabilities

The scenarios $\omega$ will be modeled using a tree structure and transition
probabilities to account for the variability of weather conditions over the
time horizon that the forecast is constructed. The grape stock in each
scenario will be modeled by using a transition matrix of the yield factor
$\alpha_{t}^{\omega}$. So the weather can reduce or increase the available
grapes.

We will consider only three possible yield factors $\alpha$, hence there can
be nine transition probabilities associated in order to complete the possible
flow over time (Table 1). This modeling allows us to generate a scenario tree,
in which, each node corresponds to a possible future stage of a certain
scenario (path) to have in consideration for the harvest decisions planning.
Thanks to this, the resulting solution corresponds not only to a harvest plan
but also a decision policy that allow the decision-maker to adjust the
previous decision plan after uncertainty is revealed and flexibility allows.

$\begin{array}[]{c|SSS}\alpha_{i}&{\alpha_{1}}&{\alpha_{2}}&{\alpha_{3}}\\\
\hline\cr\alpha_{1}&p_{11}&p_{12}&p_{13}\\\ \alpha_{2}&p_{21}&p_{22}&p_{23}\\\
\alpha_{3}&p_{31}&p_{32}&p_{33}\\\ \end{array}$

Table 1: Matrix of transition probabilities.

Based on the above, we estimate the probability $p_{t}^{\omega}$ of a specific
stage $\omega$ in a certain period $t$, by calculating the pitatory of the
transition probabilities that shape the path from the initial node until the
respective one. In Graph 1 we can observe the representation of the
aforementioned.

0000001212134526781213452678

Figure 1: Grape yield scenario tree

The occurrence probability $p_{t}^{\omega}$ of a certain stage $\omega$ (node)
is calculated as the pitatory of the transition probabilities associated to
its path from the initial stage. Defining $\mathbb{S}$ as the set of arcs
$\\{ij\\}$ that describe the path to node n, we have:

$p_{t}^{\omega}=\prod_{\\{ij\\}\in\mathbb{S}}p_{ij}$

###  3.3 Multi-Stage Stochastic Optimization Model

Using the previously presented yields and transition probabilities, the
multistage stochastic model that accounts for uncertainty can be modeled as
follows:

  * 1.

Sets

    * (a)

$T$: set of periods in the time horizon.

    * (b)

$J$: set of grape blocks of the vineyard.

    * (c)

$\Omega$: set of future possible stages.

  * 2.

Parameters

    * (a)

$b_{j}$: price of the grape in lot $j\in J$ ($/kilograms).

    * (b)

$C_{e,t}$: cost of hiring in period $t\in T$ ($/worker).

    * (c)

$C_{f}$: cost of firing a worker ($/worker).

    * (d)

$C_{k}$: cost of keeping labor between periods ($/worker per period).

    * (e)

$C_{h}$: cost of harvesting ($/kilograms).

    * (f)

$S_{j,0}$: initial stock in block $j$ (kilograms). $j\in J$

    * (g)

$q_{j,t}$: grape quality of the block $j\in J$, in the period $t\in T$.

    * (h)

$q_{j}^{max}$: maximum reachable grape quality of the block $j\in J$.

    * (i)

$K$: maximum reception capacity of the winery (kilograms/period).

    * (j)

$\beta$: worker productivity (kilograms/period).

    * (k)

$\alpha_{t}^{\omega}$: grape yield before harvest, at time $t\in T$ in stage
$\omega\in\Omega$ (positive real number).

    * (l)

$p_{t}^{\omega}$: probability of occurrence of the stage $\omega\in\Omega$ at
time $t\in T$. (positive real number $\in\\{0,1\\}$).

  * 3.

Variables

    * (a)

$x_{t}^{\omega}$: workers hired at time $t\in T$ in stage $\omega\in\Omega$
(workers).

    * (b)

$y_{t}^{\omega}$: workers laid off at time $t\in T$ in stage $\omega\in\Omega$
(workers).

    * (c)

$m_{t}^{\omega}$: manpower or labor force at time $t\in T$ in stage
$\omega\in\Omega$ (workers).

    * (d)

$h_{j,t}^{\omega}$: harvested quantity at $j\in J$ block in period $t\in T$ in
stage $\omega\in\Omega$ (kilograms/period).

    * (e)

$S_{j,t}^{\omega}$: stock in block $j\in J$ at period $t\in T$ in stage
$\omega\in\Omega$. (kilograms).

  * 4.

Objective Function and constraints

$\begin{array}[]{ll}\min&\sum\limits_{\omega=1}^{\Omega}\bigg{\\{}\sum\limits_{t=1}^{T}p_{t}^{\omega}\Big{(}C_{e,t}x_{t}^{\omega}+C_{f}y_{t}^{\omega}+C_{k}m_{t}^{\omega}+\sum\limits_{j=1}^{J}(C_{h}-b_{j}q_{j,t})h_{j,t}^{\omega}\Big{)}+\sum\limits_{j=1}^{J}p_{T}^{\omega}\Big{(}b_{j}q_{j}^{max}(S_{j,T}^{\omega}-h_{j,T}^{\omega})\Big{)}\bigg{\\}}\\\
s.t.&\\\
&\begin{array}[]{lll}m_{t}^{\omega}=m_{t-1}^{\omega}+x_{t}^{\omega}-y_{t}^{\omega}&\forall
t\in T,\forall\omega\in\Omega&(d1)\\\
m_{t}^{\omega}=m_{t}^{\tau},x_{t}^{\omega}=x_{t}^{\tau},y_{t}^{\omega}=y_{t}^{\tau}&\forall
t\in T,\forall\omega,\tau:\Omega^{\omega}_{[t]}=\Omega^{\tau}_{[t]}&(d2)\\\
y_{T}^{\omega}=m_{T}^{\omega}&\forall\omega\in\Omega&(d3)\\\
\sum\limits_{j=1}^{J}h_{j,t}^{\omega}\leq\beta m_{t}^{\omega}&\forall t\in
T,\forall\omega\in\Omega&(d4)\\\ h_{j,t}^{\omega}\leq S_{j,t}^{\omega}&\forall
j\in J,\forall t\in T,\forall\omega\in\Omega&(d5)\\\
\sum\limits_{j=1}^{J}h_{j,t}^{\omega}\leq K&\forall t\in
T,\forall\omega\in\Omega&(d6)\\\
S_{j,t}^{\omega}=\alpha_{t}^{\omega}(S_{j,t-1}^{\omega}-h_{j,t-1}^{\omega})&\forall
j\in J,\forall t\in T,\forall\omega\in\Omega&(d7)\\\ h_{j,t}^{\omega}\geq
0&\forall j\in J,\forall t\in T&(d8)\\\
x_{t}^{\omega},y_{t}^{\omega},m_{t}^{\omega}\geq 0,\in\mathbb{Z}_{+}&\forall
t\in T,\forall\omega\in\Omega&(d9)\\\ \end{array}\end{array}$

The objective function computes the expected net income under uncertainty,
which also considers an expected penalty for leaving unharvested grape in the
last period determined by its maximum reachable quality. Expression (d1) is
the manpower balance for each possible stage $\omega$, while (d2) correspond
to non-anticipativity constraints. (d3) guaranties to fire the remaining
harvest labor at the end of the planning. The expression (d4) bounds the total
harvest in terms of labor capability and relation, while expression (d5)
establishes that harvest is bounded by the volume available in the block.
Relation (d6) bounds the total harvest in terms of single-period reception
capacity as we assume that all grapes harvested in a given period have to be
processed during the period. Expression (d7) updates the grape stock of the
block from the previous period stock and harvested amount values and the yield
of the respective stage. Finally, relations (d8) and (d9) establish the nature
of the variables.

This allows not also make a decision plan but a harvest decision policy that
indicates the best decisions subject to the actual stage conditions and
possible future stages.

##  4 Beliefs Error Determination

Avanzini et al. (2021) studied the benefits of using a MSSOM approach when
planing grape harvesting operations, however none has analyzed the effect that
deviations in the grape yields forecast and transition probabilities beliefs,
can have on the value of using a MSSOM optimization approach. To study the
effect of such errors in the value and grape losses, in the case of grape
yields, we will suppose that the decision-maker makes decisions having
available just partial information, which is presented in the form of
historical data, tendencies, forecasts, sensorization and so on. When the
state of the nature reveals itself, the decision make will realize its error
and perform actions in order to correct them, in the form of second stage
decisions. The error in the grape yields will be defined as a difference in
the $\alpha$ factor of grape yields values that differ from the real ones.

In the case of transition probabilities, the same phenomenon occurs when the
decision-maker does not have perfect information. The believed probabilities
of the scenarios are usually different from the real ones. Thus, these kind of
error will be represented defining varied transition probabilities matrix that
have differences between the defined as the real transition probabilities
matrix.

As these two types of errors can be overestimations or subestimations of the
reality, we will take into account believed values that represent that. In the
case of grape yields, we will use smaller and greater values compared to the
defined as real ones. In the case of transition probabilities, we will
consider matrix with higher and lower probabilities values compared to the
real ones.

##  5 Analysis Methodology

To determine the effect that differences in the beliefs have on the value of
using a MSSOM approach, we will analyze the effect that they have on the
production performance and economic value, considering the grape quality
behavior and also the level of flexibility of the decision-maker to fix the
labor hiring and harvest plan.

To achieve this, we separate the analysis in four parts. The first two,
studies the impacts of beliefs in grape yields, while the last two analyze the
impacts of beliefs in transition probabilities. Each pair of analysis
considers separately two kinds of behaviors of grape quality over time: having
grapes with different quality improvement velocities, or having grapes with
different maximum reachable qualities.

For the grape growth analysis, we first run the reformulated model with the
real yields and save the harvest plan decisions, incomes, and costs. To this,
we call it the perfect information scenario ($\mathcal{PI}$). Then, we run
again the model with the believed yields and save the harvest plan decisions
defined as the believed scenario ($\mathcal{BS}$). Finally, we run the model
with the real yields but with the decision plan of the believed scenario, and
then we save the final production values defined as the real scenario
($\mathcal{RS}$). Having these results, we compare the PI values with the RS
values obtaining the economic impact of forecast accuracy.

To the previous method, we add the possibility to the decision-maker to fix
the harvest plan after a certain number of periods occur and so, uncertainty
reveals which allows the decision-maker to know the real yields values. The
number of periods passed before being able to change the schedule has the
objective to represent the level of flexibility the decision-maker has.

For the transition probabilities analysis, we execute the same algorithm but
comparing the objective function value resulting from planning based on the
believed transition probabilities, with the values obtained from the real
transition probabilities. To this, we also add the possibility to the
decision-maker to adjust the hiring and harvest decision after a certain
number of periods determined by the flexibility he/she has, knowing the real
transition probabilities values.

To compare the aforementioned solutions and determine where the value is lost
or gained, we will look into different components of the objective function:
the objective function value itself ($\mathbb{OF}$), the objective function
deficit compared to the PI scenario ($\mathbb{OFD}$), the total incomes
deficit compared to the PI scenario ($\mathbb{ID}$), the percentage impact of
unharvested grape ($\mathbb{UG}$) and average quality of harvested grape on
total incomes ($\mathbb{AQ}$). In addition to the global components, we will
analyze individually by grape block, which have different quality behaviors:
the percentage variation of harvested grape compared to the PI scenario and
the variation of revenue compared to the PI scenario. This will allow us to
determine what type of grape should the managers seek for.

1 Input: real values of yields and transition probabilities
($\alpha^{PI}_{1},\alpha^{PI}_{2},\alpha^{PI}_{3},\mathbb{P}^{PI}$);

2 Run the MSSOM;

3
$\mathcal{D}^{PI}\leftarrow(x_{1},...,x_{T},y_{1},...,y_{T},h_{1},...,h_{T})$
;

4 $\mathbb{OF}^{PI}\leftarrow$ objective function value ;

5 $\mathbb{I}^{PI}\leftarrow$ net incomes ;

6 Input: believed values of yields or transition probabilities (according to
the analysis) ;

7 Run the MSSOM;

8
$\mathcal{D}^{BS}\leftarrow(x_{1},...,x_{T},y_{1},...,y_{T},h_{1},...,h_{T})$
;

9 $\mathbb{OF}^{BS}\leftarrow$ objective function value ;

10 $\mathbb{I}^{BS}\leftarrow$ net incomes ;

11 Input: ($\alpha^{PI}_{1},\alpha^{PI}_{2},\alpha^{PI}_{3},\mathbb{P}^{PI}$),
$\mathcal{D}^{BS}$, number of periods passed $f$ before re-optimize the
decision plan;

12 While $t<=f$ do;

13 $x_{t}\leftarrow x_{t}^{BS},y_{t}\leftarrow y_{t}^{BS},h_{t}\leftarrow
h_{t}^{BS}$ ;

14 Run the MSSOM for $t>f$;

15
$\mathcal{D}^{RS}\leftarrow(x_{1}^{BS},...,x_{f}^{BS},x_{f+1},...,x_{T},y_{1}^{BS},...,y_{f}^{BS},y_{f+1},...,y_{T},h_{1}^{BS},...,h_{f}^{BS},h_{f+1},...,h_{T})$
;

16 $\mathbb{OF}^{RS}\leftarrow$ objective function value ;

17 $\mathbb{I}^{RS}\leftarrow$ net incomes ;

Calculate: $\mathbb{OFD},\mathbb{ID},\mathbb{UG},\mathbb{AQ}$

Algorithm 1 Pseudo code for optimization methodology

$\mathbb{OF}=\sum\limits_{\omega=1}^{\Omega}\bigg{\\{}\sum\limits_{t=1}^{T}p_{t}^{\omega}\Big{(}C_{e,t}x_{t}^{\omega}+C_{f}y_{t}^{\omega}+C_{k}m_{t}^{\omega}+\sum\limits_{j=1}^{J}(C_{h}-b_{j}q_{j,t})h_{j,t}^{\omega}\Big{)}+\sum\limits_{j=1}^{J}p_{T}^{\omega}\Big{(}b_{j}q_{j}^{max}(S_{j,T}^{\omega}-h_{j,T}^{\omega})\Big{)}\bigg{\\}}$
(1)

$\mathbb{OFD}=\mathbb{OF}^{PI}-\mathbb{OF}^{RS}$ (2)

$\mathbb{I}=\sum\limits_{\omega=1}^{\Omega}\sum\limits_{t=1}^{T}p_{t}^{\omega}\Big{(}\sum\limits_{j=1}^{J}(-b_{j}q_{j,t})h_{j,t}^{\omega}\Big{)}\\\
$ (3)

$\mathbb{ID}=\mathbb{I}^{PI}-\mathbb{I}^{RS}$ (4)

$\mathbb{UG}=-\mathbb{ID}/\mathbb{OFD}$ (5)

$\mathbb{H}=\sum\limits_{\omega=1}^{\Omega}\sum\limits_{t=1}^{T}p_{t}^{\omega}\sum\limits_{j=1}^{J}h_{j,t}^{\omega}$
(6)

$\mathbb{AQ}=\mathbb{I}^{RS}-\mathbb{I}^{PI}(\mathbb{H}^{RS}/\mathbb{H}^{PI})$
(7)

##  6 Model Parameters

Below are presented the base parameters used in this work, corresponding
mainly to the vineyard characteristics and planning time horizon .

Model Parameter | Notation |  | Value | Units
---|---|---|---|---
Grape price | $b_{j}$ |  | 215 | $/kilograms
Initial harvest stock | $S_{j,0}$ |  | 7,000 | kilograms
Worker productivity | $\beta$ |  | 1,600 | kilograms/period
Vineyard blocks | $n(J)$ |  | 6 | blocks
Planning time horizon | $n(T)$ |  | 6 | periods
Table 2: Model base parameters

###  6.1 Costs

We decided to determine different hiring cost in each period by using a time
dependent exponential function to represent the decreasing of labor
availability the later the model tries to hire and also the market price
increment due to the previous argument. Therefore the mentioned function is
the following:

$C_{e,t}=C_{e}(t)=100,000\cdot 1.7^{t}\quad\forall t\in T\quad(\$/worker)$

Next are presented the other costs parameters considered in the model, which
are based on Chilean grape market values.

Model Parameter | Notation |  | Value | Units
---|---|---|---|---
Cost of firing | $C_{f}$ |  | 4,000 | $/worker
Cost of keeping labor | $C_{k}$ |  | 3,500 | $/worker
Cost of harvesting | $C_{h}$ |  | 21 | $/kilograms
Table 3: Model costs parameters

###  6.2 Grape Yields

The model builds the harvest schedule considering three possible grape yield
scenario. As the decision-maker does not have perfect information of the
future, the believed grape yields almost always do not match with the real
values. To represent these value errors, we consider weights that relate the
believed rates with the real ones. These is performed by changing the
estimated value $\alpha_{t}^{\omega}$ in ten yield function.

Looking at the wine grape literature, we can determine that under optimal
weather conditions the availability of grapes will increase by twofold, hence
the value of $\alpha_{t}^{\omega}$ is 1.5; under regular weather conditions,
the availability of grapes will stay the same during the harvest season,;
finally, under bad weather conditions the availability will be 0.7 times.
These represent the volume increasing rate within a single period of time $t$,
where each period represents a hole month. Then, the real possible yields are
the same, weighted by a positive real number. When this is greater than 1,
means the belief underestimated the possible yields. By the other hand, if
this weight is less than 1 means the forecast overestimated the possible
yields. The weights we will use in these analysis are:
$\\{3,2,1.5,1.1,1,0.9,0.7,0.5\\}$

###  6.3 Transition Probability scenarios

Transition probabilities determine how the grape growth rate will vary over
periods, since they determine if yields will be increased or reduced in the
next period and by which factor ($\alpha_{i}$). These probabilities are
forecasted by the producer, as the grape yields, and can also differ from what
they were believed to be.

For our base case, we will suppose that each growth rate has equally
probability of occurrence (Scenario 4) and this are the current beliefs of the
producer. From this base scenario, the real transition probabilities can
differ, ranging from the pessimist scenario (Scenario 1) where initially the
probabilities were thought to be equi-probable and finally the growth factor
is absorbed to a value of 2. To the other extreme, the optimist scenario
(scenario 8) were again it was thought to be equi-probable, but finally the
growth factor is absorbed to a value of 1.1. Between these two extreme
scenarios there is a continuum of scenarios of different transition
probabilities which represent different levels of pessimism scenarios.

$\begin{array}[]{c|SSS}\lx@intercol\hfil\text{Scenario 1}\hfil\lx@intercol\\\
\lx@intercol\hfil\text{(Optimist)}\hfil\lx@intercol\\\
\alpha_{i}&{0.7}&{1}&{1.5}\\\ \hline\cr 0.7&$1$&$0$&$0$\\\ 1&$1$&$0$&$0$\\\
1.5&$1$&$0$&$0$\\\ \end{array}$
$\begin{array}[]{c|SSS}\lx@intercol\hfil\text{Scenario 2}\hfil\lx@intercol\\\
\lx@intercol\hfil\hfil\lx@intercol\\\ \alpha_{i}&{0.7}&{1}&{1.5}\\\ \hline\cr
0.7&$0.5$&$0.5$&$0$\\\ 1&$0.5$&$0.5$&$0$\\\ 1.5&$0.5$&$0.5$&$0$\\\
\end{array}$ $\begin{array}[]{c|SSS}\lx@intercol\hfil\text{Scenario
3}\hfil\lx@intercol\\\ \lx@intercol\hfil\hfil\lx@intercol\\\
\alpha_{i}&{0.7}&{1}&{1.5}\\\ \hline\cr 0.7&$0.6$&$0.3$&$0.1$\\\
1&$0.4$&$0.3$&$0.3$\\\ 1.5&$0.5$&$0.3$&$0.2$\\\ \end{array}$

$\begin{array}[]{c|SSS}\lx@intercol\hfil\text{Scenario 4}\hfil\lx@intercol\\\
\lx@intercol\hfil\hfil\lx@intercol\\\ \alpha_{i}&{0.7}&{1}&{1.5}\\\ \hline\cr
0.7&$0.3$&$0.6$&$0.1$\\\ 1&$0.3$&$0.4$&$0.3$\\\ 1.5&$0.3$&$0.5$&$0.2$\\\
\end{array}$ $\begin{array}[]{c|SSS}\lx@intercol\hfil\text{Scenario
5}\hfil\lx@intercol\\\ \lx@intercol\hfil\text{Base case}\hfil\lx@intercol\\\
\alpha_{i}&{0.7}&{1}&{1.5}\\\ \hline\cr
0.7&{0.}\overline{3}&{0.}\overline{3}&{0.}\overline{3}\\\
1&{0.}\overline{3}&{0.}\overline{3}&{0.}\overline{3}\\\
1.5&{0.}\overline{3}&{0.}\overline{3}&{0.}\overline{3}\\\ \end{array}$
$\begin{array}[]{c|SSS}\lx@intercol\hfil\text{Scenario 6}\hfil\lx@intercol\\\
\lx@intercol\hfil\hfil\lx@intercol\\\ \alpha_{i}&{0.7}&{1}&{1.5}\\\ \hline\cr
0.7&$0.1$&$0.3$&$0.6$\\\ 1&$0.3$&$0.3$&$0.4$\\\ 1.5&$0.2$&$0.3$&$0.5$\\\
\end{array}$

$\begin{array}[]{c|SSS}\lx@intercol\hfil\text{Scenario 7}\hfil\lx@intercol\\\
\lx@intercol\hfil\hfil\lx@intercol\\\ \alpha_{i}&{0.7}&{1}&{1.5}\\\ \hline\cr
0.7&$0$&$0.5$&$0.5$\\\ 1&$0$&$0.5$&$0.5$\\\ 1.5&$0$&$0.5$&$0.5$\\\
\end{array}$ $\begin{array}[]{c|SSS}\lx@intercol\hfil\text{Scenario
8}\hfil\lx@intercol\\\ \lx@intercol\hfil\text{(Pessimist)}\hfil\lx@intercol\\\
\alpha_{i}&{0.7}&{1}&{1.5}\\\ \hline\cr 0.7&$0$&$0$&$1$\\\ 1&$0$&$0$&$1$\\\
1.5&$0$&$0$&$1$\\\ \end{array}$

###  6.4 Grape Quality Characteristics

Gape quality has an effect on the harvest decisions as previously studies have
pointed out. To study this factor we will divide the quality aspect into two
characteristics. First, we will look at different maximum levels of quality
achievable by the grapes and how this affects the harvest decisions.In a
second aspect, we will keep the maximum quality level fixed, but we will vary
the speed in which the grape reaches the optimal quality conditions.

As we know, quality is a factor that affects the market value of the grape,
which is why it was modeled as a weight to that price whose value varies
between zero and one. The closer to one this is, the better quality grapes
are.

In line with the objectives mentioned above, for the first analysis to
simulate having different maximum reachable qualities we considered grape
blocks whose qualities all start and end in zero, but having different maximum
reachable values. Graph 2 shows a representation of this case.

$0$$1$$2$$3$$4$$5$$0$$0.1$$0.2$$0.3$$0.4$$0.5$$0.6$$0.7$$0.8$$0.9$$1$Period
$t\in T$Quality $q_{j,t}$High Maximum QualityMedium Maximum QualityLow Maximum
Quality Figure 2: Grape quality behavior: Different maximum reachable
qualities by block

Then, for the second analysis to simulate having different ripening rates of
quality we considered grape blocks whose qualities all start from zero and
finish in one, but having different improvement rate. Graph 3 shows a
representation of this case.

$0$$1$$2$$3$$4$$5$$0$$0.1$$0.2$$0.3$$0.4$$0.5$$0.6$$0.7$$0.8$$0.9$$1$Period
$t\in T$Quality $q_{j,t}$High Ripening RateMedium Ripening RateLow Ripening
Rate Figure 3: Grape quality behavior: Different ripening rates by block

##  7 Results

In this section, we will present the main results. Starting by the effect that
errors in grape yields estimation have on different evaluation metrics and
then proceed with the effect of errors in the forecast of transition
probabilities. Each analysis results will show first the outcomes from the
different maximum reachable quality case and then, the ones from the different
ripening rates of grapes case.

The selected metrics are: Objective function values, Objective function
nominal and deficit percentage, Net income, the Proportion of total incomes
increment/loss given by two different factors: The extra or less unharvested
grape compared to the perfect information scenario and the average quality of
harvested grape. These results will present the performance separately by the
three levels of flexibility considered. It will be also showed the Percentage
unharvested grape and the Loss income, distinctly for the different grape
quality behaviors. As these results are similar for the three levels of
flexibility except that the difference between the different grapes increases,
we will present just the corresponding to flexibility level 2.

These results will let us compare, analyze and thus, identify the economic and
production performance impacts of the harvest plans as results of the forecast
accuracy.

###  7.1 Grape Yields Analysis

####  7.1.1 Different Maximum Reachable Quality Case

Figure 4 show the change in the objective function value under different grape
yields errors, for three levels of flexibility to modify the labor hiring
schedule. We can observe that the effect of the errors in yield determination
are not symmetrical; underestimations of the yields have a more significant,
even negative effect in the objective function, while overestimation does not
have such a significant effect. Flexibility can significantly affect the
objective value, as is increased which means the decision-maker has the
possibility to fix its decisions in an earlier period, the objective function
change is smaller, so is less affected by errors in the beliefs. If yields are
underestimated, flexibility plays an important role since the objective value
is reduced exponentially as the error is increased and as the flexibility is
increased, this effect is ameliorated.

$-2.5$$-2$$-1.5$$-1$$-0.5$$0$$\cdot 10^{8}$0.50.70.911.11.523Yields value
error weightObjective function value ($)PIFlex 1Flex 2Flex 3 Figure 4:
Objective function differences in value for grape yields errors and
flexibility levels

Figures 5 and 6 show the percentage reduction, with respect to the plan with
the original belief (No error), in the objective value and income. The
reduction in the objective function, as a percentage of the original plan, is
much larger when the yields are overestimated with up to a 200% loss in the
value when the yields are 50% of what it was expected. In the case when the
yields are underestimated, when the underestimated level is in the 100%, the
loss in the objective value can range from 36% to 77.9%. If we observe the
income, as expected, when the yields are overestimated they are reduced and
when they are underestimated, they are increased compared to the original
plan. However, neither the reduction or increase in income is proportional to
the percentage reduction or increment. When yields are lowered by 50% the
incomes are only reduced by 17%. In the case when yields are underestimated by
100%, the income is incremented between 18% to 83%.

Flexibility, defined as the ability to revise the hiring decisions, does not
make a significant difference in either the objective function or profits if
the yields are overestimated. However, when the yields are underestimated
flexibility plays an important role in reducing the effect over the objective
value and the income. Having the ability to immediately re-plan in the second
period can reduce the objective function and income by 36% and 25%
respectively, when the yields are underestimated by 100%. If flexibility is
reduced by allowing only to re-plan in the fourth period, the objective
function and income is now reduced by 77.9% and 83.68% respectively, when the
yields are underestimated by 100%.

$0$$50$$100$$150$$200$$250$0.50.70.911.11.523Yields value error
weightReduction in objective functionfrom original plan (%)Flex 1Flex 2Flex 3
Figure 5: Percentage reduction in objective function from original plan (No
error in the beliefs) by flexibility level.
$-20$$0$$20$$40$$60$$80$$100$0.50.70.911.11.523Yields value error
weightReduction in income fromoriginal plan (%)Flex 1Flex 2Flex 3 Figure 6:
Percentage reduction in income from original plan (No error in the beliefs) by
flexibility level.

In Figure 7 we can observe how the income increment/loss is distributed
between unharvested and sub-optimally harvested grapes, compared to the case
in which there was no error in the beliefs, for different levels of errors in
the beliefs. We can observe that in the case when the yields are
underestimated, the main source of income losses comes from the increasing
levels of unharvested grape. In the other hand, overestimating these rates
implicate an increment of harvested grape and also a higher average quality of
it, which means more profits per unit. This compensates part of what is lost
by the over-hiring labor.

0.5 0.7 0.9 1.0 1.1 1.5 2.0 3.0 $-100$$-50$$0$$50$$100$Yield error (times
believed rates)Percentage distribution ofincrement/loss in income
(%)Unharvested grapeSuboptimal harvest quality Figure 7: Distribution of
income increment/loss between unharvested and sub-optimally harvested grapes.

Figures 8 and 9 present the results for three distinct blocks with different
maximum reachable quality of grapes for flexibility two. We can observe that
in the case of an underestimation scenario, the model privileges the most
premium grape (high maximum quality) trying to leave unharvested the less
amount as possible, while the worst grape suffers high percentage of loses in
the face of variability. If we look at the effect on income, we can notice
that even though there is a lower level of losses of the better quality
grapes, since they correspond to a significant proportion of the incomes, they
account for the largest portion of the income loss. Hence the decision-maker
must prioritize the premium blocks allocating labor to these blocks as much as
the firm can.

$-50$$0$$50$$100$0.50.70.911.11.523Yield error (times believed
rates)Unharvested grape (%)High Maximum QualityMedium Maximum QualityLow
Maximum Quality Figure 8: Percentage unharvested grape by maximum reachable
quality. $0$$0.5$$1$$1.5$$\cdot 10^{8}$0.50.70.911.11.523Yield error (times
believed rates)Unrealized income ($)High Maximum QualityMedium Maximum
QualityLow Maximum Quality Figure 9: Unrealized income by maximum reachable
quality.

####  7.1.2 Different Ripening Rates of Quality Case

In the figure 10 we present the aggregate performance of harvest plans which
deals with grapes with different ripening rates under the three different
levels of flexibility considered. Here can observe that the mentioned
flexibility to fix the harvest labor plan has similar impacts on the objective
function. Having the possibility to fix the decisions immediately after, in
the second period, manages to reduce the losses in about 40%.

$-3$$-2$$-1$$0$$\cdot 10^{9}$0.50.70.911.11.523Yield error (times believed
rates)Objective function value ($)PI Flex 1Flex 2Flex 3 Figure 10: Objective
function differences in value for grape yields errors and flexibility levels.

We can observe in figure 11, similar impacts on net incomes the fact of under
and over estimating grape yields with different ripening rates of grape. About
60% of net income losses can be avoided if investment on improving flexibility
are made. In the next figure, we can notice that additional unharvested grape
is the main source of income losses, while when rates are overestimated, the
extra incomes sources are more equally generated by both factors.

$-20$$0$$20$$40$$60$$80$$100$0.50.70.911.11.523Yield error (times believed
rates)Reduction in income fromoriginal plan (%)Flex 1Flex 2Flex 3 Figure 11:
Percentage reduction in income from original plan (No error in the beliefs)
for different flexibility levels. 0.5 0.7 0.9 1.0 1.1 1.5 2.0 3.0
$-100$$-50$$0$$50$$100$Yield error (times believed rates)Percentage
distribution ofincrement/loss in income (%)Subopt. harvest qualityUnharvested
grape Figure 12: Distribution of income increment/loss between unharvested and
sub-optimally harvested grapes.

In the following graphs we can observe a very important behavior of each
quality behavior. The results show that grapes that have an early improvement
of their quality gives the decision-maker an extra level of flexibility to
adjust the harvesting plan. As this kind of grape reaches its optimal quality
early and stay in that condition for more periods, the planner is able to
start its harvest if necessary. This is evidenced in the lower amount of
unharvested grape as the error increases. In the other hand, we can see that
grapes which have a late quality improvement limits the flexibility of the
decision-maker to extend the harvest period due to the quality does not make
it profitable. These results are almost the same for the other two levels of
flexibility an so, we presented just the corresponding to flexibility level 2.

$-20$$0$$20$$40$$60$$80$$100$0.50.70.911.11.523Yield error (times believed
rates)Unharvested grape (%)High Ripening RateMedium Ripening RateLow Ripening
Rate Figure 13: Percentage unharvested grape for different ripening rates of
grapes. $0$$0.5$$1$$1.5$$2$$2.5$$\cdot 10^{9}$0.50.70.911.11.523Yield error
(times believed rates)Unrealized income ($)High Ripening RateMedium Ripening
RateLow Ripening Rate Figure 14: Unrealized income for different ripening
rates of grapes.

###  7.2 Transition Probabilities Analysis

####  7.2.1 Different Maximum Reachable Quality Case

In this analysis we can observe a more linear behavior in comparison with the
grape yield analysis. Despite this, the following graphs still evidence an
asymmetric performance between overestimating the probabilities of good
scenarios and underestimating them. Underestimating the probabilities of good
scenarios can cost five times in comparison to overestimate them.

$-2.5$$-2$$-1.5$$-1$$-0.5$$0$$\cdot 10^{7}$12345678ScenariosObjective function
value ($)PIFlex 1Flex 2Flex 3 Figure 15: Objective function value for
different scenarios and flexibility levels.

In the graphs 16 and 19 we can notice that flexibility has less impact on
global results than in the previous analysis. The reduction of deficit could
reach just about a 15%. In addition, we can observe that the less flexibility
you have, the less impact has the improvement of flexibility to be able to fix
the schedule one period before. A very important result that we can observe
here, is the fact that flexibility makes no difference when bad scenarios
probabilities are underestimated (left side of the graphs).

$0$$10$$20$$30$$40$$50$12345678ScenarioReduction in objective functionfrom
original plan (%)Flex 1Flex 2Flex 3 Figure 16: Percentage reduction in
objective function from original plan (No error in the beliefs) for different
scenarios and flexibility levels.
$-10$$0$$10$$20$$30$12345678ScenarioReduction in income fromoriginal plan
(%)Flex 1Flex 2Flex 3 Figure 17: Percentage reduction in income from original
plan (No error in the beliefs) for different scenarios and flexibility levels.

The next histogram shows, as in the previous analysis, the percentage
implication on total incomes by two different factors: The extra or less
unharvested grape compared to the perfect information scenario that means a
variation on total incomes and penalty for leaving this amount unharvested,
and the average quality of harvested grape that impacts on the revenues. We
can observe similar results when yields are underestimated, the main source of
income losses come from the increasing levels of unharvested grape too. But,
overestimating these rates does not implicate the same as before, the main
source of loss compensation is the increment of harvested grape. These results
are almost the same for the other two levels of flexibility an so, we
presented just the corresponding to flexibility level 2.

1 2 3 4 5 6 7 8 $-100$$-50$$0$$50$$100$ScenarioPercentage distribution
ofincrement/loss in income (%)Unharvested grapeSuboptimal harvest quality
Figure 18: Distribution of income increment/loss between unharvested and sub-
optimally harvested grapes for different scenarios.

In the graphs 19 and 20 we present the main results separately by grapes with
different maximum reachable quality for flexibility two, affected by the level
of beliefs pessimism. In these, we observe similar outcomes. The most premium
grape is prioritized as opposed to the lower quality grapes. Even so, it also
happens that the extra unharvested premium quality grape composes the mayor
part of the income losses.

$-20$$-10$$0$$10$$20$$30$12345678ScenarioUnharvested grape (%)High Maximum
QualityMedium Maximum QualityLow Maximum Quality Figure 19: Percentage
unharvested grape for different scenarios and maximum reachable quality.
$0$$0.5$$1$$1.5$$2$$2.5$$\cdot 10^{6}$12345678ScenarioUnrealized income
($)High Maximum QualityMedium Maximum QualityLow Maximum Quality Figure 20:
Unrealized income for different scenarios and maximum reachable quality.

####  7.2.2 Different ripening rates of grapes

In the following graph (21) we can observe that, in this case, flexibility
makes no difference when bad scenarios have more occurrence probability than
expected. On the other hand, flexibility plays again an important role when
good scenarios probabilities are sub-estimated.

$-1.2$$-1$$-0.8$$-0.6$$-0.4$$-0.2$$0$$\cdot 10^{8}$12345678ScenarioObjective
function value ($)PIFlex 1Flex 2Flex 3 Figure 21: Objective function value for
different scenarios and flexibility levels.
$0$$50$$100$$150$12345678ScenarioReduction in objective functionfrom original
plan (%)Flex 1Flex 2Flex 3 Figure 22: Percentage reduction in objective
function from original plan (No error in the beliefs) for different scenarios
and flexibility levels.

We can observe in figure 23 a similar behavior in comparison with the previous
analysis. The main source of income losses when good scenarios probabilities
are underestimated corresponds to the increment of unharvested grape. By the
other hand, when good rate scenarios are overestimated, the compensating extra
income is composed more equally between the increment of harvested grape and
the better average quality of it. These results are almost the same for the
other two levels of flexibility an so, we presented just the corresponding to
flexibility level 2.

1 2 3 4 5 6 7 8 $-100$$-50$$0$$50$$100$ScenarioPercentage distribution
ofincrement/loss in income (%)Unharvested grapeSuboptimal harvest quality
Figure 23: Distribution of income increment/loss between unharvested and sub-
optimally harvested grapes for different scenarios.

These two last graphs show the results regarding to the grape performance
separately by the ripening rates of grape, for flexibility two. High ripening
rate correspond to grapes which its quality improves earlier, then medium
ripening rate improves linearly and last, low ripening rate grape quality
improves lately. Here, we can observe again that grapes which have a late
improvement limit the decision-maker to adjust the harvest schedule according
to its flexibility. We can notice this in low ripening rate blocks, where the
unharvested amount and the loss income are higher than the others.

$-20$$0$$20$$40$$60$$80$$100$12345678ScenarioUnharvested grape (%)High
Ripening RateMedium Ripening RateLow Ripening Rate Figure 24: Percentage
unharvested grape scenarios and ripening rates of grapes. $0$$1$$2$$3$$\cdot
10^{7}$12345678ScenarioUnrealized income ($)High Ripening RateMedium Ripening
RateLow Ripening Rate Figure 25: Unrealized income for different scenarios and
ripening rates of grapes.

##  8 Discussion and Conclusions

In this research, we first develop a multistage optimization model, based on
the one proposed by Ferrer et al. (2008) and differing from the one that
Avanzini et al. (2021) present, since it considers the uncertainty in the
yields and the transition probabilities. Using this model, we study the effect
that errors in beliefs have on the value of using a Multistage Stochastic
Optimization approach. Finally, we also analyze the effect that the quality
and flexibility the resources have when errors in beliefs occur. From these
findings, we can determine conditions under which acting to reduce the errors
in future events will pay off, and conditions under which there is not much
value to gain.

Results show that errors in grape-yield estimation have a significant impact
on value and wine grape losses, evidencing that it is not symmetrical when
yields are over- or under-estimated. Reductions in value can be up to 77.9%
and 232% when the yields are over- or under-estimated by 100%, respectively.
They also show that an important part of these value losses comes from the
reduction in net incomes, which can go up to 98% of the potential amount.

When yields are underestimated, flexibility or the ability to modify the
decisions once the state of the nature reveals itself—for example, the process
of adjusting the labor assignment—plays an important role. A high level of
flexibility enables reducing the loss in value from the 77.9% to just 36%.

This effect is mainly attributable to the reduction of net income losses,
which can decrease from 98% to 40% as flexibility increases. This occurs
because the loss in value is lightly compensated with an increment in the
income, due to the available grapes. However, since there it is not enough
labor to harvest the grapes, a significant amount is left unharvested and
hence loss. If we look at how the model reacts in light of quality, it
generally favors the harvest of high-quality grapes over low quality, but the
unrealized income is greater for the high-quality grapes, due to their greater
value.

On the other hand, when yields are overestimated, results show that
flexibility does not play a significant role in ameliorating the value loss.
This is because the adjustment of labor cannot compensate for the reduction in
the amount of available grapes to harvest. However, the harvest of grapes that
would been unharvested under normal conditions, as well as the increment of
high-quality grapes being harvested on their optimal dates due to labor
availability, offset some of the value loss.

Looking at the different quality of grape in the contexts of under- and over-
estimation of yields, the model tries to reduce comparatively the amount of
unharvested high-quality grapes compared to those of low quality. Only when
the yields decrease by 50% is the percentage of high-quality grapes larger. If
we compare value or unrealized gains from underestimated yields, most of the
value loss comes from the high-quality grapes (due to their higher kg value)
rather than those of low quality. However, in absolute terms, overestimated
yields do not result in significant value loss.

For the same flexibility level, we analyzed the effect that the ripening rate
has on the amount of unharvested grapes and on the unrealized gains when
mistakes occur in the determination of the yields. When the ripening rate is
low, grapes mature very close to their optimal date, and the yields are
underestimated. The amount of unharvested grapes—hence, the unrealized
gains—are largest, with insufficient labor to process them all. This amount
decreases when the ripening rate is high with is a more ample window of time
for harvesting the ripe grapes. This same effect occurs for the three levels
of flexibility, and it increases as flexibility decreases.

We analyze the effect that errors in determining the transition probabilities
have on the value of the plan. When the decision-maker is optimistic (the
transition probabilities absorb the low yields), the value decreases
significantly, with loss in value in the range of 50% for the most optimistic
scenario. When the decision-maker is pessimistic (the transition probabilities
absorb the high yields), we see less reduction in value, compared to the
optimistic scenario, which can go between 15% and 30% when we approach the
extreme cases.

If we look at the effect of flexibility on the value under different scenarios
of transition-probability errors, results show that decision-maker optimism
has no effect on reducing value loss. In pessimistic scenarios, flexibility
ameliorates value loss by 15%, due to workers’ ability to adjust productivity
and reduce the amount of unharvested grapes.

For the case of the optimistic scenario, the reduction in value due to the
change in the transition probabilities is attributable to high labor cost for
the level of grape yields. Although reducing the unharvested grapes and
harvesting them on dates closer to their optimal date produces some value, the
reduction in yields and labor costs overcomes this value increment. In the
pessimistic scenario, the value loss and unrealized gain results from the
amount of unharvested grapes due to the lack of labor.

The maximum reachable quality of the grape also makes an important difference
when errors in transition probabilities occur. When the decision-maker’s level
of pessimism is high, the better average quality of the harvested grape
lightly compensates for the value loss from the unharvested grape due to lack
of labor. In these cases, the model prioritizes harvesting the high-quality
grapes, leaving more low-quality grape unharvested. High-quality grapes still
represent the greater part of harvest value.

If we analyze the effect that the ripening rates have on value when the
scenario is optimistic, the excess available labor leaves less grape
unharvested. When the decision-maker is too pessimistic, grapes with a low
ripening rate are more difficult to harvest, with the smaller window available
for harvesting on optimal dates preventing their harvest starting earlier.

###  8.1 Managerial Insights

According to our results, a manager facing the possibility that his beliefs
can be incorrect or inaccurate would likely hire labor in excess of what
planning recommended. This would allow him to face a potential underestimation
of yields without incurring high-cost hiring at the last minute, forcing the
leaving of unharvested grape due to lack of labor. This same behavior appears
in other industries (e.g., airlines, where adding robustness to the flight
crew pairs solutions by also adding ground time between the incoming and
outgoing flights) (Ehrgott and Ryan, 2002; Yen and Birge, 2006; Weide et al.,
2010; Dunbar et al., 2012).

Errors regarding yield estimation seem to have a larger effect on value than
making the same mistakes in transition probabilities. Thus, facing the
decision of where to invest in producing more reliable information, the
decision should aim toward accuracy in determining grape yields.

Flexibility adds significant value to the planning process, as Avanzini et al.
(2021) indicate. So, if possible, the manager should try to induce flexibility
into the plan, making possible the adjusting of the plan as the states of
nature appear. This could occur by directly relating the payments of the
workers to productivity and reducing hiring and lay-off costs. Finally,
achieving a higher level of flexibility can occur if the decision-maker has a
buffer for harvesting capacity by hiring extra workers.

Regarding the maximum achievable quality of the grapes, the harvesting plan
should prioritize higher-quality grapes since these determine most of the
income and net utilities of production. Also, a situation with a lack of
available labor calls for adapting the harvest plan to leave as little high-
quality grape unharvested as possible. Small increments of unharvested premium
grape can cause higher income losses than low-quality grape produces.

In the case of ripening rates, the preferred possibility is to plant varieties
that have high ripening rates and wider optimal harvest windows. This
increases the flexibility of the decision-maker to adjust the harvest plan by
starting the harvesting earlier than expected when reduced labor is available.
Likewise, avoiding varieties with low ripening rates maintains the decision-
maker’s flexibility to modify the harvest plan.

Finally, the results this work obtains show that the effects of errors in
beliefs on the planning value behave asymmetrically. This indicates that using
regular optimization techniques to solve the problem at hand is not the best
method. A better mechanism to handle errors in beliefs could be the use of a
robust optimization approach (Ben-Tal et al., 2009) or a conditional value at
risk (Rockafellar and Uryasev, 2002), which minimizes losses under worst-case
scenarios or average expected costs considering them all, a more accurate
approach to results more robust against uncertainty.

###  8.2 Future Research

This research focuses on analyzing the errors regarding yields and transition
probability matrix beliefs. The agricultural realm includes many other errors
in beliefs, such as: labor productivity levels, quality level of grapes,
probability of adverse climatic events (e.g., rain). Further research that
studies the effects of these errors would be a great contribution to the
winery industry and agriculture in general.

Transition probabilities and scenarios were considered as discrete events.
This work could go even further if continuous distribution functions were
associated with the yields. Also, the same could apply to the change of
quality through periods, or ripening rates behavior. This would enable
implementing a distributionally robust optimization model approach, and a
closer representation to the real distribution could offer more useful
managerial insights.

Our results indicate that the use of a labor buffer to act as a reserve, in
cases of underestimating the harvested stock, is a desirable feature. The use
of a robust optimization approach or a conditional value at risk helps by
defining optimal buffer levels.

Finally, studying the effects of using different types of machine-learning
schemes in improving the precision and accuracy of updating would reduce the
gap between the believed values and the real ones. Since the quality and
amount of information directly relates to the quality of the forecasts,
studying the use and value of sensor applications on agricultural industries
to collect better and larger amounts of information to support decision-making
would be desirable.

## References

  * Ahumada and Villalobos (2009) Ahumada, O., Villalobos, J.R., 2009\.  Application of planning models in the agri-food supply chain: A review.  European journal of Operational research 196, 1–20.
  * Ahumada et al. (2012) Ahumada, O., Villalobos, J.R., Mason, A.N., 2012.  Tactical planning of the production and distribution of fresh agricultural products under uncertainty.  Agricultural Systems 112, 17–26.
  * Altendorfer et al. (2016) Altendorfer, K., Felberbauer, T., Jodlbauer, H., 2016.  Effects of forecast errors on optimal utilisation in aggregate production planning with stochastic customer demand.  International Journal of Production Research 54, 3718–3735.
  * Arafa and ElMaraghy (2012) Arafa, A., ElMaraghy, W., 2012\.  Quantifying the effect of enterprise strategic flexibility, in: Enabling Manufacturing Competitiveness and Economic Sustainability. Springer, pp. 99–104.
  * Arnaout and Maatouk (2010) Arnaout, J.P.M., Maatouk, M., 2010\.  Optimization of quality and operational costs through improved scheduling of harvest operations.  International Transactions in operational research 17, 595–605.
  * Avanzini et al. (2021) Avanzini, E.L., Mac Cawley, A.F., Vera, J.R., Maturana, S., 2021\.  Comparing an expected value with a multistage stochastic optimization approach for the case of wine grape harvesting operations with quality degradation.  International Transactions in Operational Research .
  * Barad (2013) Barad, M., 2013.  Flexibility development–a personal retrospective.  International Journal of Production Research 51, 6803–6816.
  * Ben-Tal et al. (2009) Ben-Tal, A., El Ghaoui, L., Nemirovski, A., 2009.  Robust optimization.  Princeton University Press.
  * Birge and Louveaux (2011) Birge, J.R., Louveaux, F., 2011\.  Multistage stochastic programs, in: Introduction to stochastic programming. Springer, pp. 265–287.
  * Bohle et al. (2010) Bohle, C., Maturana, S., Vera, J., 2010.  A robust optimization approach to wine grape harvesting scheduling.  European Journal of Operational Research 200, 245–252.
  * Borodin et al. (2014) Borodin, V., Bourtembourg, J., Hnaien, F., Labadie, N., 2014\.  A quality risk management problem: case of annual crop harvest scheduling.  International journal of production research 52, 2682–2695.
  * Borodin et al. (2016) Borodin, V., Bourtembourg, J., Hnaien, F., Labadie, N., 2016\.  Handling uncertainty in agricultural supply chain management: A state of the art.  European Journal of Operational Research 254, 348–359.
  * Chen et al. (2004) Chen, C.C., McCarl, B.A., Schimmelpfennig, D.E., 2004.  Yield variability as influenced by climate: A statistical investigation.  Climatic Change 66, 239–261.
  * Chen et al. (2018) Chen, X., Kouvelis, P., Biazaran, M., 2018.  Value of operational flexibility in co-production systems with yield and demand uncertainty.  International Journal of Production Research 56, 491–507.
  * Chryssolouris et al. (2013) Chryssolouris, G., Efthymiou, K., Papakostas, N., Mourtzis, D., Pagoropoulos, A., 2013.  Flexibility and complexity: is it a trade-off?  International Journal of Production Research 51, 6788–6802.
  * Dowson et al. (2020) Dowson, O., Morton, D.P., Pagnoncelli, B.K., 2020.  Partially observable multistage stochastic programming.  Operations Research Letters 48, 505–512.
  * Dowson et al. (2019) Dowson, O., Philpott, A., Mason, A., Downward, A., 2019\.  A multi-stage stochastic optimization model of a pastoral dairy farm.  European Journal of Operational Research 274, 1077–1089.
  * Dunbar et al. (2012) Dunbar, M., Froyland, G., Wu, C.L., 2012.  Robust airline schedule planning: Minimizing propagated delay in an integrated routing and crewing framework.  Transportation Science 46, 204–216.
  * Ehrgott and Ryan (2002) Ehrgott, M., Ryan, D.M., 2002\.  Constructing robust crew schedules with bicriteria optimization.  Journal of multi-criteria decision analysis 11, 139–150.
  * Escudero et al. (2007) Escudero, L.F., Garín, A., Merino, M., Pérez, G., 2007\.  The value of the stochastic solution in multistage problems.  Top 15, 48–64.
  * Ferrer et al. (2008) Ferrer, J.C., Mac Cawley, A., Maturana, S., Toloza, S., Vera, J., 2008.  An optimization approach for scheduling wine grape harvest operations.  International Journal of Production Economics 112, 985–999.
  * Flores and Villalobos (2020) Flores, H., Villalobos, J.R., 2020\.  A stochastic planning framework for the discovery of complementary, agricultural systems.  European Journal of Operational Research 280, 707–729.
  * He and Powell (2018) He, X., Powell, W.B., 2018.  Optimal learning for stochastic optimization with nonlinear parametric belief models.  SIAM Journal on Optimization 28, 2327–2359.
  * Heitsch and Romisch (2009) Heitsch, H., Romisch, W., 2009\.  Scenario tree modeling for multistage stochastic programs.  Mathematical Programming 118, 371–406.
  * Higle (1998) Higle, J.L., 1998.  Variance reduction and objective function evaluation in stochastic linear programs.  INFORMS Journal on Computing 10, 236–247.
  * Huang and Ahmed (2009) Huang, K., Ahmed, S., 2009.  The value of multistage stochastic programming in capacity planning under uncertainty.  Operations Research 57, 893–904.
  * Huang et al. (2019) Huang, Y., Zhao, L., Powell, W.B., Tong, Y., Ryzhov, I.O., 2019.  Optimal learning for urban delivery fleet allocation.  Transportation Science 53, 623–641.
  * Kennedy (1988) Kennedy, J.O., 1988.  Principles of dynamic optimization in resource management.  Agricultural Economics 2, 57–72.
  * Kolajo et al. (1988) Kolajo, E.F., Martin Jr, N.R., Hanson, G.D., 1988.  Forecast errors and farm firm growth.  Journal of Agricultural Economics Research 40\.
  * Löhndorf (2016) Löhndorf, N., 2016.  An empirical analysis of scenario generation methods for stochastic optimization.  European Journal of Operational Research 255, 121–132.
  * Moghaddam and DePuy (2011) Moghaddam, K.S., DePuy, G.W., 2011\.  Farm management optimization using chance constrained programming method.  Computers and Electronics in Agriculture 77, 229–237.
  * Murynin et al. (2013) Murynin, A., Gorokhovskiy, K., Bondur, V., Ignatiev, V., 2013\.  Analysis of large long-term remote sensing image sequence for agricultural yield forecasting, in: Proceeding of the 4th International Workshop on Image Mining. Theory and Applications. IMTA-4, p. 48.
  * Patel (2011) Patel, P.C., 2011.  Role of manufacturing flexibility in managing duality of formalization and environmental uncertainty in emerging firms.  Journal of Operations Management 29, 143–162.
  * Patel et al. (2012) Patel, P.C., Terjesen, S., Li, D., 2012.  Enhancing effects of manufacturing flexibility through operational absorptive capacity and operational ambidexterity.  Journal of Operations Management 30, 201–220.
  * Pflug and Pichler (2016) Pflug, G.C., Pichler, A., 2016\.  From empirical observations to tree models for stochastic optimization: convergence properties.  SIAM Journal on Optimization 26, 1715–1740.
  * Powell (2019) Powell, W.B., 2019.  A unified framework for stochastic optimization.  European Journal of Operational Research 275, 795–821.
  * Rockafellar and Uryasev (2002) Rockafellar, R.T., Uryasev, S., 2002\.  Conditional value-at-risk for general loss distributions.  Journal of banking & finance 26, 1443–1471.
  * Sanders and Graman (2009) Sanders, N.R., Graman, G.A., 2009\.  Quantifying costs of forecast errors: A case study of the warehouse environment.  Omega 37, 116–125.
  * Shapiro (2003) Shapiro, A., 2003.  Monte carlo sampling methods.  Handbooks in operations research and management science 10, 353–425.
  * Shi and Daniels (2003) Shi, D., Daniels, R.L., 2003\.  A survey of manufacturing flexibility: Implications for e-business flexibility.  IBM Systems Journal 42, 414–427.
  * Weide et al. (2010) Weide, O., Ryan, D., Ehrgott, M., 2010.  An iterative approach to robust and integrated aircraft routing and crew scheduling.  Computers & Operations Research 37, 833–844.
  * Yen and Birge (2006) Yen, J.W., Birge, J.R., 2006\.  A stochastic programming approach to the airline crew scheduling problem.  Transportation Science 40, 3–14.
  * Ziarnetzky et al. (2018) Ziarnetzky, T., Mönch, L., Uzsoy, R., 2018.  Rolling horizon, multi-product production planning with chance constraints and forecast evolution for wafer fabs.  International Journal of Production Research 56, 6112–6134.