Topic
  • 2 replies
  • Latest Post - ‏2013-09-17T09:58:11Z by jonsonleou
jonsonleou
jonsonleou
3 Posts

Pinned topic How to write dvar interval results with data tuple into database?

‏2013-09-15T14:45:07Z |

HI,

I studying flow-shop scheduling problem but meet a question again,
how to save the result contained meaningful activityinfo tuple to ms sql-server DB,
I have tried the oil database example worked, unfortunately the decision variable is float type,

In here, hope someone can provide similar example to referred code for me,

Thank you in sincerely,

Jonson/Taipei

  • AlexFleischer
    AlexFleischer
    115 Posts
    ACCEPTED ANSWER

    Re: How to write dvar interval results with data tuple into database?

    ‏2013-09-17T08:33:27Z  

    Hi,

     

    what you may do is turn the itvs dvar interval into a tuple set

     

    tuple result
    {
      int m;
      int j;
      int s;
      int e;
    }  

    {result} R={<m,j,startOf(itvs[j][m]),endOf(itvs[j][m])>  | j in Jobs, m in Mchs};
     

     

    And then with standard DBUpdate you write R in the database

     

    regards

  • AlexFleischer
    AlexFleischer
    115 Posts

    Re: How to write dvar interval results with data tuple into database?

    ‏2013-09-17T08:33:27Z  

    Hi,

     

    what you may do is turn the itvs dvar interval into a tuple set

     

    tuple result
    {
      int m;
      int j;
      int s;
      int e;
    }  

    {result} R={<m,j,startOf(itvs[j][m]),endOf(itvs[j][m])>  | j in Jobs, m in Mchs};
     

     

    And then with standard DBUpdate you write R in the database

     

    regards

  • jonsonleou
    jonsonleou
    3 Posts

    Re: How to write dvar interval results with data tuple into database?

    ‏2013-09-17T09:58:11Z  

    Hi,

     

    what you may do is turn the itvs dvar interval into a tuple set

     

    tuple result
    {
      int m;
      int j;
      int s;
      int e;
    }  

    {result} R={<m,j,startOf(itvs[j][m]),endOf(itvs[j][m])>  | j in Jobs, m in Mchs};
     

     

    And then with standard DBUpdate you write R in the database

     

    regards

    Hi Alex:

     

    Wonderful, the scrip did work,

    Thank your kindly replay,

     

    Best regards,