Example about ampl questions PDF

Title Example about ampl questions
Course Foundations of operations research
Institution Politecnico di Milano
Pages 2
File Size 52.9 KB
File Type PDF
Total Downloads 84
Total Views 147

Summary

some example questions to practice ampl part...


Description

AMPL - questions tommaso schettini December 2018

1

exercise 1

Write the definition in the ampl modelling language of the following: • a set I of all the integers between 1 and 5. • a binary variable xi,j with i ∈ I, j ∈ I . • a parameter bi with i ∈ I. Then using the defined variables and parameters write in the AMPL modelling language the following constraint: X

bi xi,j ≤ 0

∀j ∈ I

i∈I

1.1

solution

set I := 1..5; var x{I,I}, binary; param b{I}; s.t. c1 {j in J}: sum{i in I} (b[i] x[i,j])...


Similar Free PDFs