...
Run.groovy
Logic: understand its structureDefine the dimensions hierarchies
Define the spaces
Define the scopes inside each space
Define the variables inside each scope
Define the criteria inside each scope
The easiest way is to write the description space by space following the graphical description. The binding to the data is done through scopes: inputs and outputs of the Optimization Engine are model tables named after the space and scopes to which they pertain (e.g. Problem_ByProduct_All contains the data for the scope All in the space ByProduct).
Understanding the underlying concepts is important. Page Main Concepts for Optimization Problems is the reference.
...