Topic
  • 4 replies
  • Latest Post - ‏2013-02-05T08:12:16Z by SystemAdmin
SystemAdmin
SystemAdmin
1883 Posts

Pinned topic Main script (Column Generation) og DB read / Write

‏2013-01-30T11:54:38Z |
Dear all, I have a question on the use of Column Generation and DB read / write in OPL, I hope you can help me with.

I have two models for the same problem, a compact and a decomposed (Column Generation) model. Data I/O is defined in a common .dat file in which both input and output SQL is defined and read/write from the same db.

The compact model reads, calculates and writes seemlessly.

The decomposed model reads, calculates master, subproblems, goes back and forth a few times before finding a solution, but it then fails to execute the write steps of the .dat file. What am I missing ?

I'm thinking that the main control structure changes the execution somehow or the shift from master to sub problem changes the behaviour somehow ? I've based my code on examples of CG and DB I/O, but cant see any issues based on those.

Looking forward for your reply!

Christian
Updated on 2013-02-05T08:12:16Z at 2013-02-05T08:12:16Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1883 Posts

    Re: Main script (Column Generation) og DB read / Write

    ‏2013-01-30T13:20:06Z  
    Christian,

    Could you please share the error and the main script code.
    As a fast thought, do you initialize all output variables in the main script?

    regards,
    Zahar
  • SystemAdmin
    SystemAdmin
    1883 Posts

    Re: Main script (Column Generation) og DB read / Write

    ‏2013-02-04T09:04:58Z  
    Christian,

    Could you please share the error and the main script code.
    As a fast thought, do you initialize all output variables in the main script?

    regards,
    Zahar
    Hi Zahar,

    I've attached the main scipt.

    Theres no error code, everything runs throug,h the output part of the code just doesnt get executed.

    When stepping through the code in the debugger the variables get set, so I should think so.

    Thanks for your help!

    Christian
  • SystemAdmin
    SystemAdmin
    1883 Posts

    Re: Main script (Column Generation) og DB read / Write

    ‏2013-02-04T17:10:53Z  
    Hi Zahar,

    I've attached the main scipt.

    Theres no error code, everything runs throug,h the output part of the code just doesnt get executed.

    When stepping through the code in the debugger the variables get set, so I should think so.

    Thanks for your help!

    Christian
    Try to copy the output data directly to thisOplModel:

    thisOplModel.bunkerPlans.add(subOpl.bunkerPlanV);

    and so on, whatever your output data is.

    Regards,
    Zahar
  • SystemAdmin
    SystemAdmin
    1883 Posts

    Re: Main script (Column Generation) og DB read / Write

    ‏2013-02-05T08:12:16Z  
    Try to copy the output data directly to thisOplModel:

    thisOplModel.bunkerPlans.add(subOpl.bunkerPlanV);

    and so on, whatever your output data is.

    Regards,
    Zahar
    Thanks, that helped ;)