Decision Optimization

 View Only
  • 1.  OPL models on the cloud

    Posted Mon April 12, 2021 03:18 PM

    Hello,

    I have fallowed the tutorial "Solving OPL models on the cloud" and successfully run some basic projects using Watson Machine Learning, from my local computer.

    Now I am trying to run a more complex project that uses a .dat file to get some data from an external file (csv or excel). However SheetConnection is not working and I am getting the error message "Failed (Error during generation …. Data parsing error:syntax error, …)"

    The model works just fine on CPLEX OPL Studio but now we need a more powerful machine, so we are trying to solve it on cloud. Is there a function like ShettConnection that allows us to connect the data with the project running on the cloud?

    Thank you in advance.

    Alexandra



    ------------------------------
    Alexandra Nascimento Baptista
    ------------------------------

    #DecisionOptimization


  • 2.  RE: OPL models on the cloud

    Posted Tue April 13, 2021 03:37 AM
    Hi,

    in the CPLEX IDE you may generate a .dat file out of your excel / csv input

    See IDE and OPL > CPLEX Studio IDE > IDE Reference > Processes and Procedures > Generating output files in documentation

    You can also do that in scripting : printExternalData in the class IloOplModel


    This will generate a .dat that you can use with WML in the IDE or with oplrunwml

    regards


    ------------------------------
    [Alex] [Fleischer]
    [EMEA CPLEX Optimization Technical Sales]
    [IBM]
    ------------------------------



  • 3.  RE: OPL models on the cloud

    Posted Thu April 15, 2021 04:11 AM

    Hello,
    Thanks for the answer.

    Now I can export external data in a model to an output file .dat, but for that I need to run the model, as explained in

    https://www.ibm.com/docs/en/icos/20.1.0?topic=files-exporting-external-data

    That works just fine when the .csv file has a few data and I can run it using Watson Machine Learning, from my local computer. My problem is that the amount of data of the model that I want to run is very big, so I get an "out of memory error" when I try to create the .dat file, when I run it in ILOG CPLEX Optimization Studio.

    Is there another way to do it?
    Thanks again.

    Alexandra



    ------------------------------
    Alexandra Nascimento Baptista
    ------------------------------



  • 4.  RE: OPL models on the cloud

    Posted Thu April 15, 2021 01:13 PM
    Edited by System Fri January 20, 2023 04:12 PM
    Hi,

    you could try to do that with oplrun command line.

    oplrun -de exp.dat mod.mod dat.dat​




    generates exp.dat


    ------------------------------
    [Alex] [Fleischer]
    [EMEA CPLEX Optimization Technical Sales]
    [IBM]
    ------------------------------