Decision Optimization

Decision Optimization

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

 View Only
  • 1.  writeln()

    Posted Thu May 22, 2008 02:40 PM

    Originally posted by: SystemAdmin


    [shadi said:]

    hi

    how i can write directly to a text file and not to a cosole  (commandline)???

    thank you




    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: writeln()

    Posted Thu May 22, 2008 03:12 PM

    Originally posted by: SystemAdmin


    [shadi said:]

    hi,

    i solve this problem by using the folloing:

      var f = new IloOplOutputFile();
          f.open("output.txt");
        f.writeln(.....);

    Kshieboun Shadi


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: writeln()

    Posted Thu May 22, 2008 03:43 PM

    Originally posted by: SystemAdmin


    [alain.chabrier said:]

    Indeed, there are to goody classes in script for this.

    Documentation example is :
    execute {
      var f = new IloOplOutputFile();
      f.open("output.txt");
      if (f.isOpen) writeln("f is open");
      else writeln("f is closed");
      f.writeln("Hello World");
      f.close();
      if (f.isOpen) writeln("f is open");
      else writeln("f is closed");
    }
    #DecisionOptimization
    #OPLusingCPOptimizer