IBM ILOG Solver User's Manual > Local Search > Minimizing Talent Wait Cost Using LNS > Problem representation: Reading the problem data |
Problem representation: Reading the problem data |
INDEX
![]() |
In this example, the problem data will be read from a file. The data to be read are the numbers of actors and scenes, the pay rate of the actors, and the filming durations of the scenes. In addition, the presence (or otherwise) of an actor in any particular scene is read. The following initial part of the program has been provided for you:
This code accepts as command line arguments first, the filename from which the problem data should be read, and second, a random seed with which to seed Solver's random number generator. Varying the seed will vary the behavior of the resulting search procedure.
Three empty arrays are created which will be filled when the data file is read. actorPay
holds the pay per unit time for each actor. sceneDuration
holds the filming duration of each scene. Finally, actorInScene
holds, for each actor, the set of scenes in which he appears.
Thereafter, the problem data are read by filling the three aforementioned arrays. The function ReadData
carries out this process, returning a true value if the data were read without error and false otherwise.
The ReadData
function is provided for you and can be simply understood from the code itself.
© Copyright IBM Corp. 1987, 2009. Legal terms. | PREVIOUS NEXT |