Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
  • 1.  Issue with set defination

    Posted Sat March 27, 2021 11:01 AM
    Hi,

    I am working on the scheduling problem which at one of the constraints there is an if-then statement in the outer loop something like the following:
    (for i in I)
    (for p in P)
    (for t in T)
    (for s in S):
    p<= i and
    if p==i then t!=s
    ​

    I am trying to write this as follows:

    subject to {
      	forall(i in I,p in P,s in S,t in T: p<=i) 
      	  co1:	
    		LHS <= RHS;
      	forall(i in I,p in P,s in S,t in T: t!=s) 
      	if(p==i) {	
      	  co2:
    		LHS <= RHS;;
            }
    }

    But, I am not sure it is being what I am looking for. I was wondering if, how can I define this?

    Best regards
    Abbas

    ------------------------------
    Abbas Omidi
    ------------------------------


    #DecisionOptimization


  • 2.  RE: Issue with set defination

    Posted Sun March 28, 2021 01:21 PM
    Hi

    forall(i in I,p in P,s in S,t in T)
    co1:	
    if ((p<=i-1) || ((p==i) && (t!=s)))
    LHS <= RHS;
    ​


    should work
    regards



    ------------------------------
    [Alex] [Fleischer]
    [EMEA CPLEX Optimization Technical Sales]
    [IBM]
    ------------------------------



  • 3.  RE: Issue with set defination

    Posted Mon March 29, 2021 07:36 AM
    Dear Alex,

    Thank you so much for your time and support.

    Best regards
    Abbas

    ------------------------------
    Abbas Omidi
    ------------------------------