FICO Xpress Optimization Examples Repository
 FICO Optimization Community FICO Xpress Optimization Home

Overview of Mosel examples for 'Business Optimization' book

Description

List of FICO Xpress Mosel implementations of examples discussed in the book 'J. Kallrath: Business Optimization Using Mathematical Programming - An Introduction with Case Studies and Solutions in Various Algebraic Modeling Languages' (2nd edition, Springer, Cham, 2021, DOI 10.1007/978-3-030-73237-0).

List of provided model files

(Examples marked with * are newly introduced in the 2nd edition, all other models have been converted from the mp-model versions that were provided with the 1st edition of the book in 1997.)
absval.mos absval2.mos, absval2a.mos bench101.mos bench102.mos Filename Description Section Modeling absolute value terms (linearization) 6.5 * Modeling absolute value as general constraints 6.5 Parkbench production planning problem (solution to Exercise 10.1) 10.9 Parkbench production planning problem, MIP problem (solution to Exercise 10.2) 10.9 Ore blending problem 2.7.1 * Boat renting problem (solution for Exercise 3.3) 1.4.1, 3.7 * Multi-period Boat renting problem 1.6 Dual of the Boat renting problem (solution for Exercise 3.3) 3.7 Brewery production planning (data files: brewery.xlsx, brewdata.dat) 8.3 Generalized assignment problem (solution for Exercise 7.3) 7.10 Small knapsack problem 7.1.1 Bus crew scheduling 7.8.4 Calves and pigs problem 3.3.1 Carton production scheduling problem (data file: carton.dat) 10.3 * Minimal perimeter convex hull for two triangles 10.3 * Contract allocation problem with semi-continuous variables 10.2.1 Feasibility puzzle problem (solution for Exercise 6.5) 6.11 Data envelopment analysis (solution for Exercise 5.2) 5.3 Dual problem for a small LP (solution for Exercise 3.1b) 3.5.1 * Dynamic computation of big-M coefficients for production planning 14.1.2.1 * Production planning problem formulation using indicator constraints 14.1.2.1 * Evolutionary algorithm for supply management 14.1.3.3 Choosing investment projects (solution for Exercise 7.5) 7.10 Flowshop scheduling problem (solution for Exercise 7.7) 7.10 * Fractional programming example 11.1 Generalized assignment problem (solution for Exercise 7.2) 7.10 * Lexicographic Goal Programming 5.4.3 * Lagrange relaxation applied to the GAP 14.1.3.3 Multi-period, multi-site production planning, LP model (solution for Exercise 5.1) 5.3 Multi-period, multi-site production planning, MIP model (solution for Exercise 6.7) 6.11 * Production scheduling problem with SOS formulation (solution for Exercise 6.9) 6.11 Multi-knapsack problem (solution for Exercise 7.4) 7.10 Network flow problem (solution for Exercise 4.3) 4.7 Generic formulation of network flow problem (Exercise 4.3) 4.7 * Newsvendor problem: 2-stage stochastic programming 11.3.2.1 Net present value problem (solution for Exercise 6.8) 6.11 * Optimal breakpoints for piecewise linear approximation 14.2.3 * Multi-stage stochastic portfolio investment model 11.3.2.5 Primal problem for a small LP (solution for Exercise 3.1a) 3.7 Simple production planning example 2.5.2 Project scheduling case study 10.2.3 Linearized quadratic programming example 11.4 * Quadratic programming example solved as NLP 11.4 Set covering problem (solution for Exercise 7.6) 7.10 Simple LP problem (solution for Exercise 2.2) 2.13 Simple LP problem (solution for Exercise 2.3) 2.13 Lifting slabs (solution for Exercise 6.6) 6.11 Sludge production planning example illustrating recursion 11.2.1 * Recursion example solved as NLP 11.2.1 * (solution for Exercise 6.4) 6.11 Trimloss problem LP formulation (solution for Exercise 4.1) 4.1.1 Trimloss problem MIP formulation (solution for Exercise 4.2) 4.1.2 * Trimloss problem formulated as a MINLP problem 13.3 * Alternative NLP solver choice for trimloss problem 13.3 Traveling salesman problem (solution for Exercise 7.1) 7.10 * Vehicle routing - heating oil delivery problem 7.2.3 * (solution for Exercise 2.1) 2.13 Yield management, financial modeling 8.4.2

Source Files

Data Files

brewdata.dat

! Data file for brewery.mos
NALES: 4
NLAGER: 3
NP: 3
ND: 15
NC: 20
NT: 5
NB: 4
CTBP: [(1 1) 1.55 0.81 2.13 1.23 (2 1) 0.51 3.18 0.97 2.15 (3 1) 0.9 0.65 0.51 2.08]
CTPD: [(1 1 1) 3.05 1.18 1.7 (1 2 1) 1.32 2.56 0.63 (1 3 1) 2.8 2.3 2.5 (1 4 1) 2.43
2.67 1.31 (1 5 1) 0.64 3.03 1.5 (1 6 1) 1.94 2.04 0.92 (1 7 1) 2.48 1.21 2.29
(1 8 1) 2.56 1.88 2.02 (1 9 1) 3.23 0.74 0.87 (1 10 1) 0.6 1.71 2.86 (1 11
1) 2.78 2.62 0.5 (1 12 1) 0.57 0.8 0.62 (1 13 1) 1.8 3.23 1.27 (1 14 1) 2.5
2.2 3.02 (1 15 1) 0.68 1.24 1.31 (2 1 1) 1.35 1.03 1.12 (2 2 1) 1.05 1.26
0.93 (2 3 1) 1.31 1.22 1.25 (2 4 1) 1.24 1.28 1.05 (2 5 1) 0.93 1.34 1.08
(2 6 1) 1.16 1.17 0.98 (2 7 1) 1.25 1.03 1.22 (2 8 1) 1.26 1.15 1.17 (2 9
1) 1.38 0.95 0.97 (2 10 1) 0.93 1.12 1.31 (2 11 1) 1.3 1.27 0.91 (2 12 1) 0.92
0.96 0.93 (2 13 1) 1.13 1.38 1.04 (2 14 1) 1.25 1.2 1.34 (2 15 1) 0.94 1.04
1.05 (3 1 1) 7.1 2.4 3.71 (3 2 1) 2.75 5.86 1.02 (3 3 1) 6.48 5.21 5.72 (3
4 1) 5.55 6.14 2.74 (3 5 1) 1.05 7.04 3.22 (3 6 1) 4.3 4.55 1.75 (3 7 1) 5.68
2.48 5.19 (3 8 1) 5.86 4.17 4.51 (3 9 1) 7.57 1.3 1.62 (3 10 1) 0.93 3.72
6.62 (3 11 1) 6.43 6.03 0.68 (3 12 1) 0.86 1.44 0.99 (3 13 1) 3.95 7.55 2.64
(3 14 1) 5.72 4.98 7.03 (3 15 1) 1.15 2.54 2.72 (4 1 1) 5.47 2 2.97 (4 2 1) 2.26
4.55 0.98 (4 3 1) 5.01 4.08 4.45 (4 4 1) 4.33 4.76 2.25 (4 5 1) 1 5.43 2.6
(4 6 1) 3.4 3.59 1.52 (4 7 1) 4.42 2.06 4.06 (4 8 1) 4.55 3.31 3.56 (4 9 1) 5.81
1.19 1.43 (4 10 1) 0.92 2.98 5.11 (4 11 1) 4.97 4.68 0.73 (4 12 1) 0.87 1.29
0.96 (4 13 1) 3.14 5.8 2.18 (4 14 1) 4.45 3.9 5.42 (4 15 1) 1.08 2.1 2.24
(5 1 1) 7.11 2.55 3.82 (5 2 1) 2.89 5.91 1.21 (5 3 1) 6.51 5.28 5.77 (5 4
1) 5.61 6.18 2.87 (5 5 1) 1.23 7.06 3.34 (5 6 1) 4.39 4.64 1.92 (5 7 1) 5.73
2.63 5.25 (5 8 1) 5.91 4.27 4.6 (5 9 1) 7.57 1.48 1.79 (5 10 1) 1.12 3.83
6.65 (5 11 1) 6.46 6.08 0.88 (5 12 1) 1.05 1.62 1.18 (5 13 1) 4.05 7.55 2.78
(5 14 1) 5.77 5.05 7.05 (5 15 1) 1.33 2.68 2.86]
RL: [(1) 1 1 1 2 2 2 2 3 3 4 4 4 5 5 5 5 6 6 7 7]
RC: [(1) 1 2 4 1 3 4 5 2 5 1 4 5 1 3 4 5 2 4 1 5]
CB: [(1 1) 1000 1000 (2 1) 1500 1000 (3 1) 2000 1500 (4 1) 500 1500]
CP: [(1 1) 300 0 200 200 0 (2 1) 500 550 0 600 600 (3 1) 800 750 800 0 750]
IBL: [(1 1) 1 1 0 0 (2 1) 0 1 1 1 (3 1) 1 0 1 1 (4 1) 1 1 1 0 (5 1) 0 0 0 0 (6 1) 0
0 0 0 (7 1) 0 0 0 0]
DEMAND: [(1 2) 11 (1 4) 5 (1 7) 14 (1 8) 13 (1 11) 6 (1 12) 5 (1 14) 5 (2 4) 12 (2 9) 12
(2 11) 13 (2 14) 12 (2 15) 7 (3 2) 13 (3 4) 7 (3 8) 10 (3 9) 11 (3 14) 14
(4 4) 9 (4 7) 7 (4 8) 7 (4 10) 10 (4 12) 10 (4 13) 8 (5 2) 7 (5 4) 9 (5 9) 8
(6 4) 13 (6 6) 10 (6 8) 9 (6 11) 14 (6 13) 12 (7 1) 10 (7 2) 12 (7 3) 11 (7
5) 15 (7 10) 12 (7 11) 10 (7 13) 8 (7 15) 9 (8 1) 9 (8 5) 6 (8 7) 5 (8 14) 8
(9 1) 9 (9 2) 8 (9 3) 15 (9 4) 9 (9 6) 12 (9 8) 15 (9 9) 10 (9 13) 10 (9 14) 11
(9 15) 5 (10 1) 7 (10 7) 14 (11 3) 8 (11 9) 6 (11 11) 11 (11 15) 7 (12 2) 10
(12 7) 11 (12 10) 6 (13 2) 11 (13 4) 9 (13 9) 14 (13 15) 13 (14 2) 12 (14
4) 8 (14 5) 8 (14 6) 11 (14 13) 8 (15 1) 13 (15 4) 5 (15 8) 11 (15 14) 13
(16 4) 9 (16 7) 7 (16 12) 14 (17 3) 5 (17 5) 13 (17 6) 9 (17 8) 13 (17 9) 13
(17 12) 13 (18 3) 10 (18 4) 11 (18 5) 5 (18 6) 6 (18 7) 6 (18 10) 13 (18 14) 7
(19 8) 10 (19 11) 7 (20 3) 15 (20 6) 9 (20 8) 5 (20 13) 11]
BL: [(1) 100 150 200 100]
PL: [(1) 50 100 150]
PU: [(1) 500 1500 2500]
BU: [(1) 1000 1000 1000 1000 1500 1500 1500]