Topic
  • 3 replies
  • Latest Post - ‏2010-09-13T11:34:34Z by FredericDelhoume
hidedeep2008
hidedeep2008
1 Post

Pinned topic how to convert .mod file in OPL CPLEX to .MPS or .LP format

‏2010-09-13T09:40:59Z |
Now I have already .mod file in OPL CPLEX, how can I get .MPS or .LP format from .mod file?
Updated on 2010-09-13T11:34:34Z at 2010-09-13T11:34:34Z by FredericDelhoume
  • AlexFleischer
    AlexFleischer
    329 Posts

    Re: how to convert .mod file in OPL CPLEX to .MPS or .LP format

    ‏2010-09-13T09:53:59Z  
    Hi,

    after your model you add

    
    main 
    { thisOplModel.generate(); cplex.exportModel(
    "f.lp"); cplex.exportModel(
    "f.mps"); 
    }
    


    I hope this will help you

    Alex
  • FredericDelhoume
    FredericDelhoume
    17 Posts

    Re: how to convert .mod file in OPL CPLEX to .MPS or .LP format

    ‏2010-09-13T11:34:33Z  
    Hi,

    after your model you add

    <pre class="jive-pre"> main { thisOplModel.generate(); cplex.exportModel( "f.lp"); cplex.exportModel( "f.mps"); } </pre>

    I hope this will help you

    Alex
    You can also use a setting file (.ops) along with your runconfig.
    There is a dedicated setting to generate CPLEX readable files, in
    Language/Run/Export format.
  • FredericDelhoume
    FredericDelhoume
    17 Posts

    Re: how to convert .mod file in OPL CPLEX to .MPS or .LP format

    ‏2010-09-13T11:34:34Z  
    Hi,

    after your model you add

    <pre class="jive-pre"> main { thisOplModel.generate(); cplex.exportModel( "f.lp"); cplex.exportModel( "f.mps"); } </pre>

    I hope this will help you

    Alex
    You can also use a setting file (.ops) along with your runconfig.
    There is a dedicated setting to generate CPLEX readable files, in
    Language/Run/Export format.