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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Preprocessing dataYou can preprocess data before the optimization model is created by using <strong>ILOG</strong>Script/JavaScript syntax encapsulated in execute blocks.<strong>OPL</strong> provides script integration with the modeling language. All declared model elementsare available for scripting via their name.The functionality available for an element depends on its type. All elements can be read, butmodifications are possible only for primitive types (int, float, string) and primitiveitems of arrays and tuples. See the intro to the <strong>Reference</strong> <strong>Manual</strong> of <strong>ILOG</strong> Script Extensionsfor <strong>OPL</strong> about these limitations.You can change the domain boundaries for decision variables, as well as their priority, in thepreprocessing phase.You can also use preprocessing to change CPLEX or CP Optimizer parameter settings (seeChanging option values in the <strong>Language</strong> User’s <strong>Manual</strong>).Elements of a range or constraint type are immutable.Example:int n = ...;range R = 1..n;int A[R] = ...execute {for(r in R) {if ( A[r]

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

Saved successfully!

Ooh no, something went wrong!