Topic
  • 2 replies
  • Latest Post - ‏2013-10-17T01:43:31Z by MaxDr
MaxDr
MaxDr
2 Posts

Pinned topic How to Write the Objective Value and Run Time to Excel?

‏2013-10-07T16:00:58Z |

Hey,

 

After running a configuration in Cplex Studio IDE, I want to write the resulting objective value and run time into an excel file. I have no problems with writing other parameters, but I am kind of stuck with these.

 

Best,

MaxDr.

 

  • AlexFleischer
    AlexFleischer
    1245 Posts

    Re: How to Write the Objective Value and Run Time to Excel?

    ‏2013-10-08T18:10:00Z  

    Hi,

     

    for the objective, if you have dvar int obj; you  need to use SheetWrite on obj

    for the run time, do int d1; and int d2; int t;  and use

    execute

    {

    d1=new Date();

    }

     

    and then later

     

    execute

    {

    d2=new Date();

    t=d2-d1,

    }

    and in the .dat you do a SheetWrite on t

     

    Regards

  • MaxDr
    MaxDr
    2 Posts

    Re: How to Write the Objective Value and Run Time to Excel?

    ‏2013-10-17T01:43:31Z  

    Hi,

     

    for the objective, if you have dvar int obj; you  need to use SheetWrite on obj

    for the run time, do int d1; and int d2; int t;  and use

    execute

    {

    d1=new Date();

    }

     

    and then later

     

    execute

    {

    d2=new Date();

    t=d2-d1,

    }

    and in the .dat you do a SheetWrite on t

     

    Regards

    Hey,

     

    Thank you very much Alex, it worked out perfectly. Just in case of dvar int obj, I needed to use dexpr int obj, and it's done!

     

    Best