Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

File "Null" Not found

  • 1.  File "Null" Not found

    Posted 10/28/10 12:29 AM

    Originally posted by: CynthiaLi


    I built an OPL project with two model files and one data file. The main model file contains the model for the master problem, and a main{} scripting block to iteratively solve the master problem and the subproblem which is defined in another model file. The data file is for the master model.
    However, when I run the project, there is an error called "File 'Null' Not Found", and it points at "main". What is the meaning of the error? Where may I go wrong?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: File "Null" Not found

    Posted 10/28/10 03:37 AM

    Originally posted by: FredericDelhoume


    Can you explain (or show) your project structure along with the model ?
    It is likely that you cannot access one of the referenced files, certainly because
    it is not in searched path.
    A screen dump of the project structure and exact error will help understanding what happens.

    Thanks,
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: File "Null" Not found

    Posted 10/28/10 10:17 AM

    Originally posted by: CynthiaLi


    Thanks for your reply. I attached the snapshot.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: File "Null" Not found

    Posted 10/28/10 11:04 AM

    Originally posted by: FredericDelhoume


    Thanks,

    May I ask for contents of the Scripting log ?
    You may also add regular traces or use the integrated script debugger to get the location of the
    problem, as OPL currently seem to be unable to determine it (this why it defaults to main location).

    You can set a breakpoint using double click in left margin in editor at first scripting line, then use stepping to see where exactly it triggers the error.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: File "Null" Not found

    Posted 10/28/10 11:26 AM

    Originally posted by: CynthiaLi


    The Scripting log shows:
    Solve First Stage Problem.
    theta: 0
    x: 0 0
    Optimal Value:0
    // Script execution failed with status -2
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: File "Null" Not found

    Posted 10/28/10 11:32 AM

    Originally posted by: FredericDelhoume


    This log says that code we wee in your screendump does not trigger the error, we can see line 79 beeing executed once.
    So please show the rest of your main code, as error is certainly in hidden part.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 7.  Re: File "Null" Not found

    Posted 10/28/10 11:43 AM

    Originally posted by: CynthiaLi


    I guess there may be something wrong with the definition of one of my var within main location.
    Here is what I am trying to do:
    I defined a tuple in my first optimization model. Then in the main block, I want to add data into this tuple. The tuple OCut is defined as follows:
    tuple OCut {
    key int id;
    float SmallE;
    float BigEVarX;
    }

    The difficult part is the last component.
    I want to define a numerical array Big[n] to save the calculated results, then add the data in the tuple data :
    FirstData.OCuts.add(FirstData.OCuts.size,Small,Big);

    How shall I define the numerical array Big[n] and set every component to be zero first?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 8.  Re: File "Null" Not found

    Posted 10/28/10 11:49 AM

    Originally posted by: FredericDelhoume


    I am no expert in modeling so I will let other ask.
    Are you sure your problem (null file) is related to this ?
    Looks like something different to me.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 9.  Re: File "Null" Not found

    Posted 10/28/10 01:17 PM

    Originally posted by: CynthiaLi


    This is another snapshot.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 10.  Re: File "Null" Not found

    Posted 10/28/10 01:45 PM

    Originally posted by: SystemAdmin


    Hi,

    I would declare the array Big by script (+var Big = new Array();+)
    and initialize it when you have data for Big with something like:
    Big[i] = calculatedResult;

    main {
    http://...
    var Big = new Array();
    http://...
    for (var i=0;i<n;i++) {
    your model instantiation and solve block
    Big[i] = calculatedResult;
    FirstData.OCuts.add(FirstData.OCuts.size,Small,Big[i]);
    ...
    }
    }

    Hope this helps.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 11.  Re: File "Null" Not found

    Posted 10/28/10 08:19 PM

    Originally posted by: CynthiaLi


    Thanks for your help. I guess it works since the message of error changed.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 12.  Re: File "Null" Not found

    Posted 10/29/10 10:32 AM

    Originally posted by: FredericDelhoume


    Your initial error was probably happening at line 99 form error2.png screen dump
    Big[p] = new IloOplDataSource(Bigp]);

    this is because IloOplDataSource only accepts files as constructor argument.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer