CapBudg: Getting Started

10
CapBudg: Getting Started TABLES NPV (4) ! Net Present Value of investment Cost (4) ! Investment required DATA NPV(1) = 16, 22, 12, 8 Cost(1) = 5, 7, 4, 3 VARIABLES x(4) CONSTRAINTS Yield: SUM(i=1:4) NPV(i)*x(i) $ Budget: SUM(i=1:4) Cost(i)*x(i) < 14 BOUNDS x(i=1:4) .BV.

description

CapBudg: Getting Started. TABLES NPV (4) ! Net Present Value of investment Cost (4) ! Investment required DATA NPV(1) = 16, 22, 12, 8 Cost(1) = 5, 7, 4, 3 VARIABLES x(4) CONSTRAINTS Yield: SUM(i=1:4) NPV(i)*x(i) $ Budget: SUM(i=1:4) Cost(i)*x(i) < 14 BOUNDS x(i=1:4) .BV. - PowerPoint PPT Presentation

Transcript of CapBudg: Getting Started

Page 1: CapBudg: Getting Started

CapBudg: Getting Started TABLES

NPV (4) ! Net Present Value of investment Cost (4) ! Investment required

DATA NPV(1) = 16, 22, 12, 8 Cost(1) = 5, 7, 4, 3

VARIABLES x(4) CONSTRAINTS Yield: SUM(i=1:4) NPV(i)*x(i) $ Budget: SUM(i=1:4) Cost(i)*x(i) < 14 BOUNDS x(i=1:4) .BV.

Page 2: CapBudg: Getting Started

Other Constraints

Cannot invest in more than two projects MaxProjects: SUM(i=1:4)x(i) < 2

If we invest in project 2, we must invest in project 1 If2Then1: x(2) < x(1)

If we invest in project 3, we cannot invest in project 4 If3ThenNot4: x(3) + x(4) < 1

If we invest in two projects, we must invest in project 1 IfTwoThen1: SUM(i=2:4) x(i) < 1

Page 3: CapBudg: Getting Started

Dish Wash: Fixed Charge

3 Kinds of DishwashersLimited amounts of

Steel Labor

If we make a product there’s a minimum quantity we can make economically

Otherwise, we don’t make the productMaximize Profit

Page 4: CapBudg: Getting Started

The Parameters (Tables)

LET NProd = 3 ! Number of productsTABLES P(NProd) ! Unit profit ST(NProd) ! Steel used per unit STAVL ! Steel available HR(NProd) ! Hours used per unit HRAVL ! Hours available UB(NProd) ! Upper bound on x - calculated LB(NProd) ! Lower bound on x

Page 5: CapBudg: Getting Started

The Model ASSIGN UB(p=1:NProd) = min(STAVL/ST(p), HRAVL/HR(p)) VARIABLES x(NProd) ! Amount of product made mkx(NProd) ! 1 if any product made CONSTRAINTS Profit: SUM(p=1:NProd) P(p)*x(p) $ SteelMax: SUM(p=1:NProd) ST(p)*x(p) < STAVL HoursMax: SUM(p=1:NProd) HR(p)*x(p) < HRAVL UBx(p=1:NProd): x(p) < UB(p)*mkx(p) LBx(p=1:NProd): x(p) > LB(p)*mkx(p) BOUNDS mkx(p=1:NProd) .BV.

Page 6: CapBudg: Getting Started

The Data

DATA P = 25, 27, 35 ST = 10, 13, 17 STAVL = 90 HR = 7, 5, 5 HRAVL = 40 LB = 2, 2.5, 2

Page 7: CapBudg: Getting Started

Ambulance 2: Set Covering

6 citiesTravel times between Minimum number of ambulances so

that one is within 20 minutes of every city

Page 8: CapBudg: Getting Started

Parameters (TABLES)

LET NTown = 6 ! No. towns LET TimeLimit = 20 ! Max time allowed to reach any

town

TABLES TIME(NTown,NTown) ! Time taken between each pair of

towns SERVE(NTown,NTown) ! 1 if time within limit, 0

otherwise

Page 9: CapBudg: Getting Started

The Model ASSIGN SERVE(s=1:NTown,t=1:NTown) = &

if (TIME(s,t) <= TimeLimit, 1, 0) VARIABLES open(NTown) ! 1 if ambulance at town; 0 if not CONSTRAINTS MinAmb: & Minimise number ambulances SUM(t=1:NTown) open(t) $ Serve(s=1:NTown): & Serve each town SUM(t=1:NTown) SERVE(s,t) * open(t) > 1 BOUNDS

open(t=1:NTown) .bv.

Page 10: CapBudg: Getting Started

The Data

DATATIME(1,1) = 0,15,25,35,35,25TIME(2,1) = 15, 0,30,40,25,15TIME(3,1) = 25,30, 0,20,30,25TIME(4,1) = 35,40,20, 0,20,30TIME(5,1) = 35,25,35,20, 0,19TIME(6,1) = 25,15,25,30,19, 0