• No results found

Distributionally Robust Optimization with ROME (part 2)

N/A
N/A
Protected

Academic year: 2021

Share "Distributionally Robust Optimization with ROME (part 2)"

Copied!
42
0
0

Loading.... (view fulltext now)

Full text

(1)

Distributionally Robust Optimization

with ROME (part 2)

Joel Goh Melvyn Sim

Department of Decision Sciences NUS Business School, Singapore

18 Jun 2009 NUS Business School

(2)

Outline

Introduction

Basic Structure of a ROME Program ROME Features

Example 1: Simple Test

(3)

Outline

Introduction

Basic Structure of a ROME Program

ROME Features

Example 1: Simple Test

(4)

What is ROME?

• ROME: Robust Optimization Made Easy

• Algebraic modeling language in the MATLAB environment for modeling Robust Optimization (RO) problems

• Primarily designed for RO problems within the DRO framework • ROAM Design Goals

• Environment for rapid prototyping of new RO ideas • Ease the transition from theory to practice

(5)

What ROME is NOT

• ROME is NOT a solver engine

• ROME calls 3rd party solvers to do actual solving (e.g. CPLEX, MOSEK, SDPT3)

• ROME serves as an intermediary to translate an uncertain optimization program from a mathematically intuitive form into a solver-understandable form

• ROME is NOT a large-scale solver platform

• ROME can handle medium-sized problems reasonably well, and some large problems

(6)

Why ROME?

• RO programs, especially with more complex decision rules (e.g. BDLDR), can be extremely complex, typically involving the following steps

• Constructing robust counterparts

• Finding deflected components (non-anticipative) • Constructing robust bounds

• Fortunately, most of these steps are mechanical in nature

(7)

Outline

Introduction

Basic Structure of a ROME Program ROME Features

Example 1: Simple Test

(8)

Ingredients of a Robust Optimization Program

• Uncertainties: Methods to input distributional properties • Variables: Deterministic variables, recourse variables • Arithmetic operations on Uncertainties, Variables • Conic Constraints

• Objective

(9)

The ROME Environment

• The ROME environment is started by a call toroam begin

• Sets up internal ROAM structures (invisible)

• A model in ROAM is created by a call toroam model

• Returns a handle which you can use to access model data, or call model member functions

• Input uncertainties, variables, constraints, and objective • Call solve to complete the model and run solver. • Can access optimization results after solve

• roam endclears the ROME environment and frees memory in ROAM structures

(10)

Variables and Uncertainties

• Declared with thenewvarkeyword with different options

• <nothing>: deterministic variables • uncertain: uncertainties

• linearrule>: LDR recourse variables

• Can set distributional properties on uncertainty variables • Can be construted with various sizes

(11)
(12)

Operators

• Most of MATLAB’s arithmetic operators have been overloaded to work with declared ROME variables

• Addition / Subtraction

• Array and Matrix Multiplication

• Subscripted Reference and Assignment (e.g.A(1, 2)) • Array shape manipulation commands (size,reshape)

• Idea: whatever you can do with MATLAB matrices, you should be able to do with ROME variables

(13)

Constraints and Objective

• Constraints

• Declared using therome constraintfunction

• Accepts ROME expressions containing a single inequality or equalities (examples later)

• For LDR variables, constraints will be translated into the Robust Counterpart

automatically • Objective

• One objective per model

(14)

Getting Optimization Results

• After callingsolve,

• Get values of variables usingeval

(15)
(16)

Outline

Introduction

Basic Structure of a ROME Program

ROME Features Example 1: Simple Test

(17)

Why Use ROME?

• Uncertainty description

• LDRs as primitives variables in ROAM • Non-anticipative requirements

• In-built support for BDLDRs • Numerical analysis of results

(18)

Uncertainty Description

• Can set distributional properties of uncertainties • Stored in ROAM’s memory and invoked when necessary

• e.g. Robust Counterpart for inequalities on LDRs • e.g. Robust Bounds

(19)

LDRs as Primitive Objects

• LDRs are declared and manipulated directly

• Much more mathematically meaningful

• Don’t have to worry about internal structure of LDR or worry about how to write the robust counterpart

(20)

Non-anticipative Requirements

• In ROME, you can make variables with a prescribed dependency pattern on the uncertainties

• e.g. z˜where theithcomponent depends on the firsticomponents of uncertainty

(21)

In-built-support for BDLDRs

• As we saw before, BDLDRs improved over LDRs, but were terribly complicated, especially for the non-anticipative case. Recall the steps involved:

1. Form and solve the two sub-problems

2. Remove “unnecessary” inequality constraints

3. Make the BDLDR and construct robust bounds

4. Solve the final problem

• Design Concept: while the BDLDR is complex, it’s just another decision rule, you shouldn’t have to change your model to use the BDLDR

(22)

Numerical Analysis of Results (I)

• For deterministic optimization software packages this is trivial • Recall that recourse decisions arefunctionsof uncertainties • Most general setting in ROME: deflected variable

ˆ

x(z) =˜ x0+Xz˜+P y0+Yz˜−

• evalfunction returns an object, which encodes these parameters. • Uselinearpart anddeflectedpartfunctions

(23)

Numerical Analysis of Results (II)

• ROME also includes a “prettyprint” functionality to aid debugging and prototyping of small problems, e.g.

• Instantiate solution of uncertainty values usinginsert • Use as a prescriptive tool or for Monte-Carlo simulation

(24)

Outline

Introduction

Basic Structure of a ROME Program

ROME Features

Example 1: Simple Test

(25)

Recall Motivating Problem for BDLDR

min y(·) supP∈F EP(|y(˜z)−z˜|) 0≤y(˜z)≤1 y∈ Y(1,1,{1}) m min y(·),u(·),v(·) supP∈F EP(u(˜z) +v(˜z)) s.t. u(˜z)−v(˜z) =y(˜z)−z˜ 0≤y(˜z)≤1 u(˜z), v(˜z)≥0 y, u, v∈ Y(1,1,{1})

(26)

ROME Code for Simple Example (I)

(27)

ROME Code for Simple Example (II)

min

y(·),u(·),v(·) supP∈F

EP(u(˜z) +v(˜z))

(28)

Solution

ˆ ysol(˜z) = z˜+ ˜z−−(1−z)˜ + = z˜+−(1−z)˜+ =    ˜ z if0≤z˜≤1 0 ifz˜≤0 1 ifz˜≥1

(29)

Outline

Introduction

Basic Structure of a ROME Program

ROME Features

Example 1: Simple Test

(30)

Robust Inventory Model

• Model a distribution-free, multi-period, inventory control problem with service constraints.

• Demand is exogenous, with unknown, but partially characterized distribution in a familyF, defined by:

• Covariance Matrix: Temporal demand correlation can be modeled by a non-diagonal covariance matrix.

• Mean: Assume fixed mean (for simplicity). • Support: Maximum demand in each period.

• Backorders allowed, but in some applications, a penalty cost might not be a good model for stockouts.

(31)

Model Parameters

Parameters

Num Periods : T ∈N Order Cost : c∈ <T Holding Cost : h∈ <T Min Fill Rate : β∈ <T Max Order Qty : xM AX ∈ <T Uncertainties

Demand : z˜∈ <T Decisions

(32)

Robust Fill Rate Constraint

Fill Rate= Expected Sales

Expected Demand ≥β • Using our notation, the robust (worst-case) version:

inf

P∈F

EP(min{z˜t, yt−1(z) +˜ xt(z)˜})≥βtµt

• Apply inventory balance equation and re-arrange:

supEP yt(z)˜−

(33)

Model Formulation

• Family of uncertainties: F= n P: EP(z˜) =µ,EP z˜˜z 0 =Σ+µµ0,P 0≤z˜≤zM AX= 1o

• Robust Inventory Model with Fill Rate constraints:

min x(·),y(·) supP∈F EP c0x(z˜) +h0(y(z˜))+ s.t. sup P∈F EP y(z˜) − ≤(I−diag(β))µ Dy(z˜)−x(z˜) =−˜z 0≤x(z˜)≤xM AX x ∈ L(1, T,[t−1]) ∀t∈[T] D=        1 0 0 . . . 0 −1 1 0 . . . 0 0 −1 1 . . . 0 . . . . . . . . . . .. . . . 0 0 0 . . . 1       

(34)

Model Transformed into DRO Framework

• After linearizing piecewise-linear terms,

min x(·),y(·),r(·),s(·) supP∈F EP c0x(z) +˜ h0r(z)˜ s.t. sup P∈F EP(s(z))˜ ≤(I−diag(β))µ r(z)˜ ≥y(z)˜ s(z)˜ ≥ −y(z)˜ r(z)˜ ,s(z)˜ ≥0 Dy(z)˜ −x(z) =˜ −z˜ 0≤x(z)˜ ≤xM AX xt∈ L(1, T,[t−1]) ∀t∈[T] rt, st, yt∈ L(1, T,[t]) ∀t∈[T]

(35)
(36)

ROME Code for Inventory Problem (cont.)

F=      P: P 0≤z˜≤zM AX = 1 EP(z˜) =µ, EP z˜z˜ 0 =Σ+µµ0     

(37)

ROME Code for Inventory Problem (cont.)

min x(·),y(·),r(·),s(·) supP∈F EP c 0 x(z˜) +h0r(z˜) s.t. sup P∈F EP(s(z˜))≤(I−diag(β))µ Dy(z˜)−x(z˜) =−z˜ r(z˜)≥y(z˜) s(z˜)≥ −y(z˜) 0≤x(z˜)≤xM AX

(38)

Numerical Example (I)

• Use a covariance matrix which represents temporal autocorrelation of demand,Σ=σL(α)L(α)0 L(α) =        1 0 0 . . . 0 α 1 0 . . . 0 α α 1 . . . 0 .. . ... ... . .. ... α α α . . . 1        • (zM AX, β) = (100,0.5)

(39)

Numerical Example (II)

• (zM AX, β) = (200,0.5)

(40)
(41)

Outline

Introduction

Basic Structure of a ROME Program

ROME Features

Example 1: Simple Test

(42)

Summary

• We have seen how ROME can be used to model Distributionally Robust Optimization problems

• ROME contains some components common to most modeling languages, and unique features for Robust Optimization

References

Related documents

Through a field trip from the first year of an Environmental Science degree, the new field trip will serve to improve student transition into their Environmental Science degree

Learning sequence Ideas from literature Learning supports Principles of; • Design theory • Design practice • Design cognition • Reflective practice Assessment tasks

The questions of levels 5 (synthesis) and 6 (evaluation) should refer to synthesizing and evaluating the experience lived by team members while doing their project activities.

I like to acknowledge individual variations in learning style and so if you would like to eliminate the 10% grading for small group participation , you may opt in writing, no

Therefore, akin to a previous study which revealed how formal employ- ees in formal jobs in Estonia, Latvia, Lithuania and Poland accepting an undeclared ( ‘ envelope ’ ) wage

Linear correlations were obtained between calculated lipophilicity and retention factors obtained by use of methanol and methanol–phosphate buffer mobile phases but not for

In Experiment 1, children (ages 7 – 11) completed tasks to assess their adherence to 3 operational patterns prevalent in arith- metic: (a) the strategy of performing all

The subtests included in the NEPSY–II Memory and Learning domain are List Memory, Memory for Designs, Memory for Faces, Memory for Names, Narrative Memory, Sentence Repetition, and