Topic
  • 2 replies
  • Latest Post - ‏2013-10-01T14:37:10Z by qtbgo
qtbgo
qtbgo
128 Posts

Pinned topic units of resource change over time

‏2013-10-01T08:22:48Z |

Hi, suppose we have a type of resource , the number of it changes over time t, this can be expressed by an array  n[t in 0..T]. For example, in time 0-1, n[0] =10 (we have 10 units of resource);  time 1-2, n[1] = 9; time 2-3, n[2] = 11,...

Activities (interval variables) a[i in 1..N] in 0..T+1 will consume this resource.

I want that:

     at any time t , the number of resources consumed by activities should not exceed n[t].

How to express this constraint? I tried cumulative function, but failed.

Any help is appreciated.

 

  • rdumeur
    rdumeur
    70 Posts
    ACCEPTED ANSWER

    Re: units of resource change over time

    ‏2013-10-01T11:51:51Z  

    Dear qtbgo,

    In order to constrain the cumul function representing the varying usage of your resource, you should use the alwaysIn constraint:

    http://pic.dhe.ibm.com/infocenter/cosinfoc/v12r5/index.jsp

    you must create, for your cumul function, an alwaysIn constraint for each interval in "n".

    Did you use this constraint in your model?

    I hope this helps.

    Cheers,

  • rdumeur
    rdumeur
    70 Posts

    Re: units of resource change over time

    ‏2013-10-01T11:51:51Z  

    Dear qtbgo,

    In order to constrain the cumul function representing the varying usage of your resource, you should use the alwaysIn constraint:

    http://pic.dhe.ibm.com/infocenter/cosinfoc/v12r5/index.jsp

    you must create, for your cumul function, an alwaysIn constraint for each interval in "n".

    Did you use this constraint in your model?

    I hope this helps.

    Cheers,

  • qtbgo
    qtbgo
    128 Posts

    Re: units of resource change over time

    ‏2013-10-01T14:37:10Z  
    • rdumeur
    • ‏2013-10-01T11:51:51Z

    Dear qtbgo,

    In order to constrain the cumul function representing the varying usage of your resource, you should use the alwaysIn constraint:

    http://pic.dhe.ibm.com/infocenter/cosinfoc/v12r5/index.jsp

    you must create, for your cumul function, an alwaysIn constraint for each interval in "n".

    Did you use this constraint in your model?

    I hope this helps.

    Cheers,

    Thank you very much, rdumeur. It works.