Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Finding Uniqueness

    Posted 09/26/08 12:40 AM

    Originally posted by: SystemAdmin


    [alan_a said:]

    I have a cplex allocation problem.
    One of my constraints is that I'm allocating tuples of y to tuples of x.
    Each y is unique, there can be up to n y values in each x.

    There is a concept of grouping of y such that (and forgive the javascript):

    {string} bx = ...;
    tuple y{
        string bx;
        some other stuff
    }
    -snip-
    {y} bset[bx];
    execute{
        for (var b in bx){
            for (var g in y){
                if (g.bx == b) bset[b].add(g);
            }
        }
    }


    Now my allocation requires that for each x allocation, the members of {y} in bset be unique.
    Or to put it another way:


    bx = {"A", "B"}
    bset[bx] = [{"AA", "BB", "CC"}, {"DD", "EE", "FF"}

    now every y with y.bx == "A" that is allocated to a particular x, must be either AA or BB or CC.
    they may not mix.


    I'm struggling to represent this.
    My first attempt was sort of like this

    forall(gt in y, g in y : (g != gt) && (g.bx == gt.bx))){
    forall (u in x){
    sum(<g, u> in my_dexpr) used[<g, u>] == 0 || sum(<gt, u> in my_dexpr) used[<gt, u>] == 0;
    }
    }

    where used[<y, x>] is obviously the target here.



    it sent the number of constraints and variables stratospheric.
    it's obviously wrong.
    anyone have any hints as to how to do this better?

    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: Finding Uniqueness

    Posted 09/30/08 07:25 PM

    Originally posted by: SystemAdmin


    [alan_a said:]

    Well it's not much of a change, but this seems to do the job a lot more efficiently.

    forall (<gt, ..> in y, <gt1, ..> in y :
    (gt != gt1) && (gt.bx == gt1.bx))){
    used[<gt, ..>] == 0 || used[<gt1, ..>] == 0;
    }


    I still can't help thinking there has to be a better way though.
    #DecisionOptimization
    #MathematicalProgramming-General