12.07.2015 Views

ILOG OPL Development Studio Language Reference Manual

ILOG OPL Development Studio Language Reference Manual

ILOG OPL Development Studio Language Reference Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Filtering with constraintsIn addition to applying constraints to decision variables, you can also create constraints onformal parameters to filter aggregates, like this:Filtering with constraints// The cities where we are doing business{string} cities={"Paris","Berlin","Washington","Rio"};{string} EuropeanMainCapitals = {"London","Paris","Berlin","Madrid","Roma"};// Should we expand business in this city ?dvar boolean x[cities];// We want to expand business in Europemaximize sum(c in cities: c in EuropeanMainCapitals) x[c];subject to{// We can expand business in 2 citiessum(c in cities) x[c]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!