AIMMS Tutorial for Professionals - Model Description

This file contains only one chapter of the book. For a free download of the complete book in pdf format, please visit www..com

Aimms 3.13 Copyright c 1993–2012 by Paragon Decision Technology B.V. All rights reserved.

Paragon Decision Technology B.V. Paragon Decision Technology Inc. Schipholweg 1 500 108th Avenue NE 2034 LS Haarlem Ste. # 1085 The Netherlands Bellevue, WA 98004 Tel.: +31 23 5511512 USA Fax: +31 23 5511517 Tel.: +1 425 458 4024 Fax: +1 425 458 4025

Paragon Decision Technology Pte. Ltd. Paragon Decision Technology 55 Market Street #10-00 Shanghai Representative Office Singapore 048941 Middle Huaihai Road 333 Tel.: +65 6521 2827 Shuion Plaza, Room 1206 Fax: +65 6521 3001 Shanghai China Tel.: +86 21 51160733 Fax: +86 21 5116 0555

Email: [email protected] WWW: www.aimms.com

Aimms is a registered trademark of Paragon Decision Technology B.V. IBM ILOG CPLEX and CPLEX is a registered trademark of IBM Corporation. is a registered trademark of Gurobi Optimization, Inc. KNITRO is a registered trademark of Ziena Optimization, Inc. XPRESS-MP is a registered trademark of FICO Fair Isaac Corporation. Mosek is a registered trademark of Mosek ApS. Windows and Excel are registered trademarks of Microsoft Corporation. TEX, LATEX, and AMS-LATEX are trademarks of the American Mathematical Society. Lucida is a registered trademark of Bigelow & Holmes Inc. Acrobat is a registered trademark of Adobe Systems Inc. Other brands and their products are trademarks of their respective holders.

Information in this document is subject to change without notice and does not represent a commitment on the part of Paragon Decision Technology B.V. The software described in this document is furnished under a license agreement and may only be used and copied in accordance with the terms of the agreement. The documentation may not, in whole or in part, be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form without prior consent, in writing, from Paragon Decision Technology B.V.

Paragon Decision Technology B.V. makes no representation or warranty with respect to the adequacy of this documentation or the programs which it describes for any particular purpose or with respect to its adequacy to produce any particular result. In no event shall Paragon Decision Technology B.V., its employees, its contractors or the authors of this documentation be liable for special, direct, indirect or consequential damages, losses, costs, charges, claims, demands, or claims for lost profits, fees or expenses of any nature or kind.

In addition to the foregoing, users should recognize that all complex software systems and their doc- umentation contain errors and omissions. The authors, Paragon Decision Technology B.V. and its em- ployees, and its contractors shall not be responsible under any circumstances for providing information or corrections to errors and omissions discovered at any time in this book or the software it describes, whether or not they are aware of the errors or omissions. The authors, Paragon Decision Technology B.V. and its employees, and its contractors do not recommend the use of the software described in this book for applications in which errors or omissions could threaten life, injury or significant loss.

This documentation was typeset by Paragon Decision Technology B.V. using LATEX and the Lucida font family. Chapter 3

Model Description

In this chapter you will find a description of the mathematical program corre- This chapter sponding to the problem description of the previous chapter.

3.1 Product flow

The following indices capture the dimensions of the problem, and are used Indices throughout this chapter.

Indices: l locations f factories ⊂ locations c distribution centers ⊂ locations p production lines t time periods s demand scenarios

The following product flow decision variables determine the levels of produc- Decision tion, distribution and storage. variables

Variables:

qf t total factory production [hl (hectoliter)] uf pt binary to indicate that production line is in use xfcts transport [TL (truckload)] ylts stock [hl]

Note that the production variables are identical for all demand scenarios, while the distribution and storage variables can vary for each scenario. Note also that both hectoliters and truckloads are used to measure the quantities of soft drinks. In this tutorial a truckload is defined as 12 cubic meters.

The following product flow related parameters are used in this chapter. Parameters ...

Parameters:

Dcts demand [hl] Lt actual period length [day] Chapter 3. Model Description 11

Qf p production at full operation [hl/day] Mf pt binary to indicate that production line is in maintenance Vf t binary to indicate a vacation period F drop in workforce during vacation periods (fraction)

Af pt potential production [hl] Xf number of available truckloads [TL] Y l maximum stock level [hl]

Y l minimum stock level [hl]

The parameters related to production line capacity, demand and vacations will ... and their be read from external data sources. The maintenance parameter will be deter- data source mined as part of the rolling horizon solution process.

The potential production of a production line, Af pt, is dependent on the main- Potential tenance and vacation parameters, and is defined as follows. production determination

Af pt = Lt(1 − Mf pt)(1 − F Vf t )Qf p, ∀(f,p,t)

Note that nonzero values of parameters Mf pt, F and Vf t result in the potential production, Af pt, being less than the production level at full operation Qf p.

The following stock balance constraint relates stock to previous stock, produc- Balance tion, distribution and demand. constraint

ylts = yl,t−1,s + qlt + X xflts − X xlcts − Dlts , ∀(l, t, s) f c

ylts ∈ [Y l, Y l], ∀(l, t, s)

Note that this balance constraint is used for all locations (thus both factories Domain and distribution centers), and that particular terms inside this constraint must restrictions on some occasions be interpreted as non-existent. For instance, the production term is non-existent for distribution centers, while the demand term is non- existent for factories. In Aimms you can specify a global index domain for each identifier, and the system will automatically restrict all identifier references to such an index domain.

Using the potential production parameter Af pt as defined previously, it is now Factory straightforward to determine the total weekly production at each of the facto- production ries.

qf t = X Af pt uf pt, ∀(f , t) p Chapter 3. Model Description 12

It is also straightforward to model the restriction that the number of truck- Transport loads to be moved from a factory during a particular week is limited by the limitation number of trucks available at that factory.

X xfcts ≤ Xf , ∀(f,t,s) c Note that the above planning constraint is, in practice, a simplification of the detailed transport capacity scheduling limitations. In scheduling applications the routing of vehicles, the distances to be traveled, plus the time-windows for the drivers would all be key factors in the determination of a final schedule. These factors are considered to be less important for the current one-year plan.

3.2 Mode switches

The following variable is needed to register the mode switches, Additional notation Variable:

vf pt binary to register a mode switch

The registration of mode switches seems tricky at first, but becomes straight- Mode switch forward with some additional explanation. Consider the following two inequal- registration ities.

vf pt ≥ uf pt − ufp,t−1, ∀(f,p,t)

vf pt ≥ ufp,t−1 − uf pt, ∀(f,p,t)

Whenever a production line switches from being used to not being used, or vice versa, the switch-registration variable v will be greater than or equal to unity. The penalty term in the objective discussed in the next section will ensure that this variable remains as small as possible. Thus, without a switch in the use of a production line, the variable v will be zero.

Consider a production line in use. Whenever such a line needs to be main- Effect on tained, its production drops to zero. Immediately following the maintenance maintenance week, its production is likely to restart. In this case, the change in produc- tion is not considered to be a mode switch. The definition of the potential production parameter, Af pt, in the previous section is consistent with this ob- servation. The maintenance parameter, Mf pt, is set to one when maintenance is planned, which forces the potential production parameter, Af pt, to be zero for that week. The penalty term in the objective function, however, will cause the u variable to remain at level one, thus avoiding the unwanted mode switch. A similar argument applies to maintenance while a line is not in use. Chapter 3. Model Description 13

3.3 Objective

The following parameters and variables are needed to specify the objective Additional function of the mathematical program. notation

Parameters: q Cf unit production cost [$/hl] y Cl unit stock cost [$/hl] x Cf c unit transport cost [$/TL] Cv penalty cost due to mode switch [$]

Ps demand scenario probability Variables:

rs demand scenario cost [$] z total cost [$]

The cost per single demand scenario is the sum of the production costs, the Cost per scenario-specific storage and distribution costs, plus a penalty term to reflect scenario the costs associated with mode switching.

q y x v rs = X Cf qf t + X Cl ylts + X Cf c xfcts + X C vf pt, ∀s f t lt f ct f pt

The total cost to be minimized is simply the weighted sum of the scenario Minimize total costs. cost

Minimize:

z = X Psrs s Chapter 3. Model Description 14

3.4 Model summary

The full mathematical description of the optimization model can now be sum- marized as follows.

Minimize:

z = X Psrs s

Subject to:

ylts = yl,t−1,s + qlt + X xflts − X xlcts − Dlts ∀(l, t, s) f c

qf t = X Af pt uf pt ∀(f , t) p

X xfcts ≤ Xf ∀(f,t,s) c

vf pt ≥ uf pt − ufp,t−1 ∀(f,p,t)

vf pt ≥ ufp,t−1 − uf pt ∀(f,p,t)

q y rs = X Cf qf t + X Cl ylts + f t lt

x v X Cf c xfcts + X C vf pt ∀s f ct f pt

uf pt ∈{0, 1} ∀(f,p,t)

xfcts ≥ 0 ∀(f,c,t,s)

ylts ∈ [Y l, Y l] ∀(l, t, s)

vf pt ≥ 0 ∀(f,p,t)