Decision Optimization

Decision Optimization

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

 View Only
  • 1.  OPLRUN -DE

    Posted Tue July 28, 2009 02:15 AM

    Originally posted by: SystemAdmin


    [Boon said:]

    Hello,

    I have a batch file that runs oplrun -de. I use this command just for the fact that it will produce a .dat data file for me. (My model used the data from Access database.)

    "oplrun -de" will first produce the .dat file and then solve the model. What should I do if all I want is just the .dat data file. The model runs 10 minutes or so. I am not interested in the model. just look for the .dat file.

    I appreciate your help.

    Thanks,
    Boon

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: OPLRUN -DE

    Posted Tue August 04, 2009 05:39 PM

    Originally posted by: SystemAdmin


    [afleischer said:]

    If all you want to do is generate this .dat, what you can do is write a new .mod with a main in which you generate your model wih the original .mod and the Access database .dat and then on your model you call the method printExternalData

    Your new .mod will look like



    main {
      var source = new IloOplModelSource("basicmodel.mod");
      var cplex = new IloCplex();
      var def = new IloOplModelDefinition(source);
      var opl = new IloOplModel(def,cplex);
      var data = new IloOplDataSource("basicmodel.dat");
      opl.addDataSource(data);
      opl.generate();
      var f=new IloOplOutputFile("export.dat");
      f.writeln(opl.printExternalData());
      f.close();
    }




    Alex

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: OPLRUN -DE

    Posted Mon August 10, 2009 08:26 PM

    Originally posted by: SystemAdmin


    [Boon said:]

    Awesome!

    Thanks a lot Alex.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer