Lecture2-IE122

Lecture2-IE122 - IE 122 Lecture 2 IE122-Lecture 2 What is...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
IE 122 Lecture 2 IE122-Lecture 2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
What is Ampl? A modeling language that helps us to develop and apply mathematical programming models. Can solve linear, nonlinear, integer, mixed integer models. Can write any piece of code that you can write in C, C++ in ampl: can create loops, generate random numbers, check logical conditions, fill arrays, … IE122-Lecture 2
Background image of page 2
Downloading and Installing Ampl: Go to www.ampl.com Click Download the Student Edition AMPL student is full-featured but limited to 300 variables and 300 objectives plus constraints. From “ Ampl Quick starts” number 2: Download amplcml.zip to wherever you want to work. Not to download ampl in each class, I suggest download it to your H drive , not Desktop. Extract the zip file. You will get a folder named “ amplcml ” . You will see example files under MODEL folder. Also, you may need to look at frequently asked questions in www.ampl.com . Very helpful while writing the code. IE122-Lecture 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
First Ampl program: Defining the Model: To define Variables var name_of_variable ; var x1; var x2; To define Objective maximize (or minimize) obj_name: objective-function; maximize profit: 2*x1+x2; minimize cost: x1+3*x2; To define Constraints subject to name_of_constraint : constraint_function; subject to capacity: x1+x2<=30; IE122-Lecture 2
Background image of page 4
A mill can produce two semi-finished products: bands and coils. The band production rate is 200 tons/hour, while coil production rate is 140 tons/hour. The company obtains $25 per ton band, and $30 per ton coil. Also, there is a maximum level for each item to be produced. Bands can be produced up to 6,000 tons and coils up to 4,000 tons. If 40 hours of production is available then, how many tons of
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 22

Lecture2-IE122 - IE 122 Lecture 2 IE122-Lecture 2 What is...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online