refineryset - p #Decision Variables # var Purchases{j in...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
# refineryset.mod - From Part 4 of "Recitation 2: Continuing with AMPL" # set MINREGION; # regions from which a minimum amount must be purchased set MAXREGION; # regions for which at most a maximum amount can be purchased set REGIONS:= MINREGION union MAXREGION; # of regions from which crude oil was purchased set PROD; # of end products s param buy_min {MINREGION}>=0; # lower limit on crude oil purchased param buy_max {MAXREGION}>=0; # upper limit on crude oil purchased param cost{REGIONS}>=0; # crude oil costs by region p param sell_min {PROD}>=0; # lower bound on end products sold param sell_max {PROD}>=0; # upper bound on end products sold param amt {PROD,REGIONS}>=0; # amount of product extracted per ton of crude oil; p param average_buy>=0; #min amount of crude oil bought from regions with lb and ub;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: p #Decision Variables # var Purchases{j in REGIONS}>=0; v #Objective function # minimize Total_cost: sum{j in REGIONS} cost[j]*Purchases[j]; m #Constraints # #Minimum and maximum production requirements subject to Market {i in PROD}: sell_min[i]<=sum{j in REGIONS} amt[i,j]*Purchases[j]<=sell_max[i]; s #Minimum purchasing requirements subject to Purchase_min {j in MINREGION}: Purchases[j]>=buy_min[j]; s #Maximum purchasing requirements subject to Purchase_max {j in MAXREGION}: Purchases[j]<=buy_max[j]; s #Minimum amount of crude purchased from regions with both requirments subject to Limited_regions: sum{j in MINREGION inter MAXREGION} Purchases[j]>=average_buy;...
View Full Document

Ask a homework question - tutors are online