Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Writing to a DB with no solution

    Posted 03/04/13 09:57 AM

    Originally posted by: SystemAdmin


    Is it possible to use post-processing functions like dbUpdate/dbExecute before solving a problem ?
    I would like to publish comments regarding successive steps of a OPL-script programm ( within a main() ): reading data, generating first LP, updating data, etc....

    I cannot use dbupdate or dbexecute directly in the "main", and if I try to call a ".dat file" before any solution exists an error pops up (eventhough I am not using any element of the solution for that type of publication).

    Thanks
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Writing to a DB with no solution

    Posted 03/04/13 12:09 PM
    Hi,

    to do that what you can do is do a fake solve,a solve that does nothing but lets you call postprocess.

    Let me give you an example:

    .mod

    int a[i in 1..3]=2*i;
     
    subject to
    {
      
    }
     
    main
    {
     thisOplModel.generate();
     cplex.solve();
     thisOplModel.postProcess(); 
    }
    


    .dat

    SheetConnection sheet("oilSheet.xls");
    a to SheetWrite(sheet,"RESULT!A2:A4");
    

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Writing to a DB with no solution

    Posted 03/08/13 04:34 PM

    Originally posted by: SystemAdmin


    Thanks !
    #DecisionOptimization
    #OPLusingCPLEXOptimizer