



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Consider the following AMPL models. In each case: a. Indicate hether or not the given model is a linear model as it is stated and b. If it is not a linear model as stated either show how to formulate an equivalent linear model (with no approximations) or state that no linear formulation is possible. Do not forget to answer both part a. and part b.
i. We are trying to forecast future demand from historical demand. Our model of demand includes an initial level and a rate of growth -- both of which we are trying to estimate.
param T; /* The number of past quarters of demand data / param Demand{1..T}; / The demand in quarter 1, 2, …, T */
var InitialLevel; /* The initial level of demand in quarter 0 for our forecast This could be negative as we are using it to fit the rest of the data */
var GrowthRate; /* The change in demand from quarter to quarter. This could be negative as we might be selling buggy whips */
var Estimate{1..T}; /* This variable is a convenience. It is simply the demand we estimate in each quarter given the values of the InitialLevel and GrowthRate */
/* We measure the quality of the forecast based on how well it fits historical data as estimated by the sum of the absolute differences between the forecast and actual demand in quarters 1, 2, …T / minimize TotalError: sum{t = 1..T} (Estimate[t] - Demand[t])(Estimate[t]-Demand[t]);
s.t. DefineEstimate {t in 1..T}: Estimate[t] = InitialLevel + GrowthRate*t;
Part a: Is this a linear model as it is given?
Part b. If it is not written as a linear model, can it be expressed as a linear model? If so, show how to express it as a linear model.
s.t. ImposeTrailerFillbyCube{dc in DCS, pool in POOLS}: MaxFillTime[dc, pool]sum{prd in PRODUCTS} Cube[prd]Flow[prd, dc, pool]
= CubicCapacityCubeOut[dc, pool]UseEdge[dc, pool];
s.t. DefineUseEdge{prd in PRODUCTS, dc in DCS, pool in POOLS}: Flow[prd, dc, pool] <= (sum{store in STORES} Demand[prd, store])*UseEdge[dc, pool];
s.t. WeightOrCube{dc in DCS, pool in POOLS}: WeighOut[dc, pool] + CubeOut[dc, pool] = 1;
Part a: Is this an integer linear model as it is given?
Part b. If it is not written as an integer linear model, can it be expressed as an integer linear model? If so, show how to express it as an integer linear model.
Question 4-61 on page 198 of Moore et al.
Indicate whether each of the following questions is true or false.
a. In solving an integer programming problem, Solver and CPLEX employ genetic algorithms
b. In solving an integer programming problem, Solver and CPLEX employ the simplex method.
c. The set of optimal solutions to an integer program describes a convex set.
d. The function f(x) = x^2 (that's x*x) is a convex function
e. The function f(x,y) = x^2 + y^2 (that's xx + yy) a convex function
f. All polynomials are convex functions.
g. If a real valued function f is a convex function then the function g(x) = -f(x) is a convex function