Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Error in IloOplInputFile ()

    Posted 06/08/10 02:47 PM

    Originally posted by: UDOPS


    This code is in the documentation, but when I put it into an empty .mod test file, it generates an error. The other sample for IloOplOutputFile () works fine. What is wrong with the sample?

    execute {
    var f = new IloOplInputFile();
    f.open("output.txt");
    if (f.isOpen) {
    writeln("f is open");
    var s;
    while (!f.eof) {
    s=f.readline();
    writeln(s);
    }
    f.close();
    } else {
    writeln("f is closed");
    }
    if (f.isOpen) writeln("f is open");
    else writeln("f is closed");
    }
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Error in IloOplInputFile ()

    Posted 06/08/10 03:27 PM

    Originally posted by: UDOPS


    I found it. The example requires that the file exist first, and you have to create it manually before testing the code.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer