1. Trang chủ
  2. » Luận Văn - Báo Cáo

Assignment (semester 232, duration 06 weeks) “stochastic programming and applications

22 0 0
Tài liệu được quét OCR, nội dung có thể không chính xác
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Stochastic Programming and Applications
Tác giả Nguyộn Van A, Trần Văn B, Lờ Thị C, Pham Ngoc D
Người hướng dẫn Nguyộn Van Minh Man, Nguyễn An Khương, Mai Xuõn Toan, Trần Hộng Tai, Nguyễn Tiộn Thinh
Trường học Vietnam National University, Ho Chi Minh City University of Technology
Chuyên ngành Computer Science and Engineering
Thể loại assignment
Năm xuất bản 2023-2024
Thành phố Ho Chi Minh City
Định dạng
Số trang 22
Dung lượng 2,86 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

oa Faculty of Computer Science and Engineering 1.2 Basic concepts, assumptions - Motivation Definition 1 Linear program LP with random parameters - SLP.. Hf 2 One-Stage Stochastic line

Trang 1

University of Technology Faculty of Computer Scicnce and Enginccring

BK

TP.HCM

MATHEMATICAL MODELING

(CO2011) Assignment (Semester: 232, Duration: 06 weeks)

“Stochastic Programming and Applications”

(Version 0.1, in Preparation)

Instructor(s): | Nguyén Van Minh Man, Mahidol University

Nguyễn An Khương, CSE-HCMUT Mai Xuân Toan, CSE-HCMUT Trần Héng Tai, CSE-HCMUT Nguyễn Tién Thinh, CSE-HCMUT

Student(s): Nguyén Van A — 221021 (Group CC0x - Team Oy)

Trần Văn B — 884714 (Group CÚ» - Team Oy)

Lê Thị C — 368113 (Group CCO0z - Team Oy, Leader) Pham Ngoc D — 975013 (Group CC0x - Team 0y)

Bangkok and Ho Chi Minh City, August 2023

Trang 2

oa Faculty of Computer Science and Engineering

Table of Contents

1.1 Programming? What is Stochastic Programming? Uncertainty? 2 .00.000 1 1.2 Basic concepts, assumptions - Motivation 2 0 0 ee ee ee 2

2 One-Stage Stochastic linear programming - No recourse (1-SLP) 3 2.1 APPROACH 1: use Chancec constraine and Acceptablerisk 4

2.2 APPROACH 2: for stochastic constraints T(a@) a <h(a@) Q Qui 5

3 Generic Stochastic Programming (GSP) with RECOURSE 5

4.1 Two-stage SLP Recourse model - (simple form) 0.0.0 ko 6 4.2 Two-stage SLP Recourse model - (canonical form) 2 000000000 00004 7

5 APPLICATION I: Stochastic Linear Program for Evacuation

Planning In Disaster Responses (SLP-EPDR) 10

5.3 MODEL FORMULATION To ALGORITHMIC SOLUTION 11

7.1 Soft and programming languages For Stochastic Optimization .0.00.0.0020 13 7.2 Software Requirements For Stochastic Optimization 0 00 0 00.20.00 13

10.1 Design Problems in Tclecommumicaiion HQ HH 17 10.2 The Technological level from the Statistical Viewpoint 17

Mathematical Modeling (CD2011) Assignment, Semester 2, Academic year 2023-2024 Page i/i

Trang 3

c» Faculty of Computer Science and Engineering

Abstract In the assignment of the MM course (CO2011) this semester, students will gct acquainted with a few trendy applications of stochastic optimization (SO), in particular, Stochastic Program-

ming (SP) SP and (SO) have become extremely useful for computer scientists when they formulate

optimization problems accepting unccrtainty, specifically problems in Modern Urban Management with Efficient Evacuation- Transportation, Facility Location, and Smart Logistics Team Assignment Goals: Learn concepts, idcas and methods to

a) obtaim practical cxpcricnees in modeling lincar constraints/objectives with uncertainty, b) study Two-Stage Modcl and its gencralization,

¢) use a broader class of lincar stochastic programs in various contexts, particularly study the Stochastic Lincar Program for Evacuation Planning in Disaster Responses (SLP-EPDR), a typical instance of Safe Urban Management

1 Introduction to Stochastic Programming and Optimization

We have seen several classes of optimization problems, such as lincar programming, integer pro- gramming (Icarned in the MM subject of our CSE curriculum), for which advanced theory for deterministic model cxist and cfficient numerical methods have been found

This assignment will show us how mathematical concepts for modcling optimization problems involve randomness - uncertainty Such problems arc called stochastic optimization problems

or shortly Stochastic Programming (SP) Practical problems in $ & E (science and enginccring)

originally are not modeled as stochastic or deterministic The cngincers and scientists determine whether to model the phenomenon as cither stochastic or deterministic based on the problem to

be solved In deterministic modcls, the modcl’s output is entirely determined by the parameter valucs and the initial conditions On the other hand, a stochastic model is a tool that allows for random variation in onc or more inputs over timc Randomness or uncertainty can be present in both the criterion (function) being optimized and the constraints of the problem Bricfly, SP can

be viewed as mathematical programming with random parameters (c.g., random variables, the variables whose possible values depend on the outcomes of a chance phenomenon) We begin with Generic SP and Linear SP respectively in Sections ?? and 2 !

1.1 Programming? What is Stochastic Programming? Uncertainty?

Mathematical Optimization is about decision making, mostly uscs mathematical methods Stochastic Programming (SP) is about decision making under uncertainty

View it as ‘Mathematical Programming (Optimization) with random parameters’ Stochastic linear programs arc lincar programs (i.c its objective function is lmear) im which some problem data may be considered uncertain

Recourse programs arc those in which some decisions or recourse (remake, modify) actions can be taken after uncertainty is disclosed

‘Linear SP means SLP- Stochastic linear program, whose objective function is linear

REMINDER: Each random variable possesses a specific probability distribution function The probability dis- tributions of discrete variables [as binomial or Poisson] are specified in terms of probability mass functions The probability distributions of continuous variables [as beta, exponential or Gaussian] are specified in terms of probability density functions

Mathematical Modeling (CD2011) Assignment, Semester 2, Academic year 2023-2024 Page 1/20

Trang 4

oa Faculty of Computer Science and Engineering

1.2 Basic concepts, assumptions - Motivation

Definition 1 (Linear program (LP) with random parameters - SLP )

A Stochastic lincar program (SLP) is

Minimize Z = g(x) = f(w#) = c’-2, st Aw=b, and Ta>h

with ø = (21),22, - ,#,) (decision variables),

certain real matrix A and vector b (for deterministic constraints),

and with random parameters 7, in 7 a > ñ define chance or probabilistic constraints _— IW

¢ EXAMPLE 1 (First simple motivation) We consider the following optimization

Minimize z=a,+ 22, subject to x, > 0,a2 > 0

J wy ty +42 > 7;

( 02.1 Ea > 4

where parameters w ,w2 be uniform (random) variables following distributions

Uniform(a, b), precisely w, ~ Uniform(1,4), we ~ Uniform(1/3, 1)

e When both w; = w = 1 then the two conditons becomes

wy + a2 = 4 making the red linc, and a, + x2 = 7 making the dotted bluc linc,

you obviously obtain the feasible region fully contaning the green arrow (Figure 1) How do we solve this problem if w1,w2 really are uniform (random) variables?

e What do we mean by solving this problem?

1 The wait-and-see approach: Suppose it is possible to decide about the decision variables

x = [21,29] after the observation of the random vector w = |[w).w]|? [partially representing

for data uncertainty of the problem.] Can we solve the problem without waiting?

2 Yes, we can solve the problem but no waiting, i.c we need to decide on x = [21,2] before knowing the valucs of w = [wy,w2]? We need to decide what to do about not knowing w

We suggest (a) Guess at uncertainty, and (b) Probabilistic Constraints (sec Definition 1) (a) Guess at uncertainty We will gucss few reasonable valucs for w Three (reasonable)

suggestions — cach of which tells us something about our level of ‘risk’

¢ Unbiased: Choose mean valucs for cach random parameters w

¢ Pessimistic: Choose worst case values for w

¢ Optimistic: Choose best case values for w

For instance, usc Unbiased method, look at EXAMPLE 1, uniform distributions Uniform/(a, b)

~ 5 2 clearly have mean (a + 6)/2, so @ = (=, =) Our program now becomes

2° 3 Minimize z = x) + x2

Mathematical Modeling (CD2011) Assignment, Semester 2, Academic year 2023-2024 Page 2/20

Trang 5

oa Faculty of Computer Science and Engineering

How about Pessimistic and Optimistic ways? Hf

2 One-Stage Stochastic linear programming - No recourse (1-SLP)

Definition 2 (SLP with one-stage (No recourse) : 1-SLP) Consider the following program

LP(q@) that is parameterized by the random vector a:

n

Minimize Z = g(x) — f(x) — ch - a2 = » Cj ky

j=l

s.t Ax=b, (certain constraints)

and Ta >h (stochastic constraints)

with assumptions that

Mathematical Modeling (CD2011) Assignment, Semester 2, Academic year 2023-2024 Page 3/20

Trang 6

oa Faculty of Computer Science and Engineering

1 matrix T = T(q@) and (vector) ñ — ñ(œ) express uncertainty via stochastic constraints

approach gives Probabilistic (Chance) Constraint LP

The Scenario Analysis- not perfect, but uscful, is the second approach The scenario approach assumes that there are a finite number of decisions that nature can make (outcomes of ran- domness) Each of these possible decisions is called a scenario

2.1 APPROACH 1: use Chance constraint and Acceptable risk

We can replace T x > h by probabilistic constraints P[T a > h] > p?

for some prescribed reliability level p © (.5,1), (to be determined by problem owner.)

The LP in Definition (2) above with random parameters @ = [a),a2, -| then is called

Probabilistic Constraint LP, or just 1-SLP

Risk then is taken care of explicitly, if define an

acceptable risk r, := P[Not (fT œ > h)| = PT œ < h| <S1—p then (1— ø) is maximal acceptable risk

The chance constraint 7 a2 < h implics that

the acceptable risk 1, is less than a specified maximal 1 — p © (0,1)

Definition 3 Stochastic LP or 1-SLP with Probabilistic Constraints is defined by

a random coefficients a = (a1,02, , An) in chance constraints,

and a linear objective f (ax):

NOTE: we use parameter vector œ = [a),a9, -] in gencral, and

denote w = [w),w2, - ws] specifically for states s called scenarios We treat cach scenario

w € w possibly by a combination of many random parameters a; at once in a SP

Trang 7

oa Faculty of Computer Science and Engineering

2.2 APPROACH 2: for stochastic constraints T(a) « < h(a)

Use Scenario analysis of T'(a@) « < h(a)

For every scenario (7°; h*), s=1, ,5, solve

Minimize {f(a)—c’-a@; st Aw—b, Toa <h* }

This kind of program targets a specific lincar objective while accounting for a probability function associated with various scenarios Hencc, we find an overall solution by looking at the

scenario solutions #° (s = 1, , 5)

Advantage: Each scenario problem is an LP / vs / Disadvantage: discrete distribution —> mixed-integer LP model (In general: possibly non-convex modcl)

3 Generic Stochastic Programming (GSP) with RECOURSE

We focus on modeling and Icave out details if not cssential for understanding concepts

Definition 4 (Stochastic program in two stages (gencric 2-SP problem)) The two-stage stochastic

program (2-SP) extended from Definition 2 has the form

2—SP: min g(x) with g(w)= f(x) + E,[vlx,w)] (2)

xz

where & = (11,2, an) ts the first stage decision variables,

f(x) can be linear or not, a part of the grand objective function g(a)

* The mean Q(x) := E,,[u(x.w)] of a function

v:R”xR° OR upon influences of scenarios w Q(x) is the optimal value of a certain second-stage problem

+CRP

Vectors @ = a(w) and y = y(w) are named correction, tuning or recourse decision vari-

ables, only known after the experiment e

Bricfly wc Minimize total expected costs g(a”) = f(x) + Q(x) whilc satisfying

W -y(w) =h(w)—-Tlw)- âm

Here W is called m x p recourse matrix, and we begin with simple case of m = 1,

q is the unit recourse cost vector, having the same dimension as y, and y = y(w) € R?

ELUCIDATION (On Recourse modeling issues)

e Our grand objective g(x) is built up by f(x) and Q(x) Here y is the decision vector of a second-stage LP problem, valuc y depends on the realization of (Th) := (T(w), h(w)) Re

course variables y(w) ~ corrective actions c.g usc of alternative production resources (over-

time )

¢ Quantitative risk measure: size of deviations h(w) —T(w)- «x is relevant

e Here RISK is described by expected recourse costs ()(x) of the decision x

e Modcl reformulation in fact is needed: Where do g and W come from?

Mathematical Modeling (CD2011) Assignment, Semester 2, Academic year 2023-2024 Page 5/20

Trang 8

oa Faculty of Computer Science and Engineering

Ist stage 2nd stage

Fig 2: Standard view of two-stage stochastic program

Courtesy of Maarten van der Vlerk, Univ of Groningen, NL

4 Two-Stage Stochastic linear programming (2-SLP)

We now treat the two-stage stochastic LP with recourse action

4.1 Two-stage SLP Recourse model - (simple form)

Definition 5 (Two-stage Stochastic LP With Recourse : 2-SLPWR ) The Two-stage Stochastic linear program With Recourse (2-SLPWR) or precisely with penalize corrective action generally described as

2—6LP: min c?-x+ min E,lq - yl

„cX 1(a2)CY

or in general

2—SEP: min Ele? - x + u(x,w)| (4)

œeX, 1(œ)cY with o(x,w):=q-y

subject to

Ax=b First Stage Constraints ,

T{0)- «+ W-y(w) =h(w) Second Stage Constraints

or shortly W-y=h(w)—T(w): a

¢ This SLP program specify the above 2-SP (2) to the target - a specific random grand objective function) g g(a) having :

(1) the determimislic ƒ(ø)- bọng lincar function, while accounting

(2) for a probability function v(x, w) associated with various scenarios w

4 y= y(x.w) © R”, is named recourse action variable for decision x and realization of w Recourse actions are viewed as Penalize corrective actions in SLP

The Penalize correction is expressed via the mean (Q(x) = E,,[u(x, w)| HOW to FIND IT?

Major Approaches- APPROACH 2: Scenarios analysis again

Mathematical Modeling (CD2011) Assignment, Semester 2, Academic year 2023-2024 Page 6/20

Trang 9

oa Faculty of Computer Science and Engineering

To solve system (4-4.1) mumerically, approaches arc based on a random vector @ having a finite number of possible realizations, called scenarios

Expected value @(x) obviously for a discrete distribution of w!

So we take Q = {wz} be a finite set of size S (there are a finite number of scenarios

w, ,ws € Q, with respective probability masses pz)

Since y = y(a,w) so the expectation of v(y) = v(x,w) := q-y (one cost ¢g for all y;,) is

Q(x) = E„[0(x,œ)] = » Dk ed Yk = » Đụ U(X, WE) (5)

where

e p,, is the density of scenario w;, ¢ is single unit penalty cost,

e and g yz = v(x wx) - the penalty cost of usmg y; units in correction phase,

depends on both the first-stage decision x and random scenarios w,

4.2 Two-stage SLP Recourse model - (canonical form)

We now fully characterize the system (4-4.1) in the linear case

Definition 6 (Stochastic lincar program With Recourse action (2.SLPWR) ) The canonical 2-

stage stochastic linear program with Recourse can be formulated as

where 0() :— v(x, w) is the second-stage value function, and

y = y(x,w) © R4 is a recourse action for decision x and realization of w

1 The expected recourse costs of the decision x is Q(x) := E,,[u(x,w)| by Equation (5) [pre-

ciscly expected costs of the recourse y(a), for any policy x € R”.] Hence overally we minimize

total expected costs ming cp, yer” ch 2+ Q(x)

2 We design the 2nd decision variables y(w) so that we can (tunc, modify, or) react to our original constraints (4.2) in an intelligent (or optimal) way: we call it recourse action!

3 The optimal valuc of the 2nd-stage LP is v, = v(y*), with y* = y*(x.w) is its optimal solution, here y* € R®_ The total optimal valuc is cT ‹ø* + ø0(w*) a

Mathematical Modeling (CD2011) Assignment, Semester 2, Academic year 2023-2024 Page 7/20

Trang 10

oa Faculty of Computer Science and Engineering

PROBLEM 1 [Industry- Manufacturing.] (Scc [1, Chapter 1])

Consider an industrial firm F where a manufacturcr produces n products

There are different parts (sub-assemblics) to be ordered from in total m 3rd-party supplicrs (the sites) This picture shows a transportation plan of the dustrial firm F with m = 3 from supplicrs and ø — 4 production locations (products, or warchouscs)

A unit oŸ produet ¿ requires a;; > 0 units of part 7 , where 2 = 1, n and j = 1, ,m The demand for the products is modeled as a random vector w = D = (D), Ds. - , Dn)

The second-stage problem:

For an observed valuc (a realization) d = (d),d2, - d,) of the above random demand vector

D, we can find the best production plan by solving the following stochastic lincar program (SLP)

with decision variables z = (21, 22,-++ 2n) - the number of units produced,

and other decision variables y — (0, a2. - ,„) - the number of parts left in inventory

where s; <b; (defined as pre-order cost per unit of part 7), and

“j, J =1, ,m are the numbers of parts to be ordercd before production

n

Yi = Uj a; 2, J —=1, ?m subject to ? ; » ve

( 0<z¿ Sở, 2=1, ,n; y, 20,7 =1, ,m

The whole model (of the second-stage) can be equivalently expressed as

minzy Z= ch-z—s!-y with e= (c¢; := 1; —q;) arc cost cocfficicnts

Trang 11

oa Faculty of Computer Science and Engineering

The first-stage problem:

The whole 2-SLPWR modcl is bascd on a popular rule that production > demand

Now follow distribution-bascd approach, we let Q(a) := E[Z(z.)| = E.,[x,w] denote the optimal value of problem (6) Denote

b= (bj, b2, + ,%m) built by preorder cost b; per unit of part 7 (before the demand is known)

The quantitics x; arc determined from the following optimization problem

min g(x,y.z)= bo -a+ Q(x) = bf -#+E[Z(z)] (8)

n

where Q(a) = E,,[Z] = » Øị Œ¡ z¡ 1s taken w r t the probability distribution of w = D

i=l The first part of the objective function represents the pre-ordering cost and x In contrast, the sccond part represents the expected cost of the optimal production plan (7), given by the updated ordered quantitics z, already employing random demand D = d with their densitics

ELUCIDATION

e Decision variables include vectors x,y € IR”, and also z € R”

e After the demand D is observed, the manufacturer may decide which portion of the demand

is to be satisfied so that the available numbers of parts arc not exceeded It costs additionally [; to satisfy a unit of demand for product 7, and the unit sclling price of this product is g;

e After the demand D becomes known, we detcrminc how much of cach product to make The parts not uscd are assesscd salvage valucs sj, giving vector s = (81, 82.: , 8m) >

SUMMARY

1 Problem (6)—(8) is an example of a two-stage stochastic programming problem, where

(6) is called the second-stage problem and (8) is called the first-stage problem As (6) contains

random demand D, its optimal valuc Q(a, d) is a random variable

2 The 1st-stage decisions x should be made before a realization of the random data D becomes available and hence should be independent of the random data The x variables are often referred to as here-and-now decisions

3 The second-stage decision variables z and y in (6)

arc made after observing the random data and arc functions of the data d They are referred

to as wait-and-see decisions (solution)

4 The problem (6) is feasible for every possible realization of the random data d; for example, take z =O andy = 2

Mathematical Modeling (CD2011) Assignment, Semester 2, Academic year 2023-2024 Page 9/20

Ngày đăng: 19/12/2024, 15:44