Optimization 有什么优化算法可以解决这个问题吗?

Optimization 有什么优化算法可以解决这个问题吗?,optimization,Optimization,我正在努力解决这个问题: 关于优惠 - There are 3 offers with 3 costs. C = [10,20,30] - And 3 quotas (availability of the offers). Q = [5,10,15] 关于人的信息 - There is a matrix of 5 people with profits calculated for each offer. P = [[10,20,50],[20,60,10],[30,50,15],[

我正在努力解决这个问题:

关于优惠

- There are 3 offers with 3 costs. C = [10,20,30]

- And 3 quotas (availability of the offers). Q = [5,10,15]
关于人的信息

- There is a matrix of 5 people with profits calculated for each offer.

  P = [[10,20,50],[20,60,10],[30,50,15],[60,40,50],[10,25,50]]

问题

我们最多可以分发价值10美元的5个优惠、价值20美元的10个优惠和价值30美元的15个优惠我只需要为一个人分配一个报价。我的总预算是700美元。我需要以我获得最大利润的方式向员工分配报价


**有什么优化算法可以用来解决这个问题吗?

是的,你可以用整数规划来解决这个问题

例如使用。有一个供学术使用的免费版本,请参阅。该文件可在网上查阅

用OPL(CPLEX附带的建模语言)编写的优化问题可能如下所示:range offers=1..3

range people = 1..5;
int C[offers] = [10,20,30];
int Q[offers] = [5,10,15];
int P[people][offers] = [[10,20,50],[20,60,10],[30,50,15],[60,40,50],[10,25,50]];

int budget = 700;

dvar boolean assign[p in people][o in offers];  // 1 if offer o is assigned to person p
dvar int+ quantity[p in people][o in offers];   // how much of offer o is shipped to person p
dexpr int profit = sum(p in people, o in offers) quantity[p][o] * P[p][o];

// Maximize the profit
maximize profit;

subject to {
  // Assign at most one offer to each person
  forall (p in people)
    sum(o in offers) assign[p][o] <= 1;
  // Respect the quota
  forall (o in offers)
    sum(p in people) quantity[p][o] <= Q[o];
  // Respect the budget limit
  sum(o in offers) C[o] * sum(p in people) quantity[p][o] <= budget;
  // The quantity can only be >0 if the "assign" variable is 1.
  forall(o in offers, p in people)
    quantity[p][o] <= C[o] * assign[p][o];
}

// Dump the results. This would not be necessary if you solved the problem
// in the IDE that ships with CPLEX.
execute {
  for (var p in people) {
    for (var o in offers) {
      if (quantity[p][o] > 0) {
        writeln("Ship " + quantity[p][o] + " of offer " + o + " to " + p);
      }
    }
  }
  writeln("Total profit: " + profit);
}
range-people=1..5;
INTC[offers]=[10,20,30];
int Q[报价]=[5,10,15];
INTP[people][offers]=[10,20,50]、[20,60,10]、[30,50,15]、[60,40,50]、[10,25,50];
国际预算=700;
dvar布尔赋值[p在人员中][o在报价中];//1如果报价o分配给人员p
dvar int+数量[p以人计算][o以报价计算];//有多少报价o被发送给了p
dexpr int PROFICT=总人数(人数为p,报价为o)数量[p][o]*p[p][o];
//利润最大化
利润最大化;
服从{
//每人最多分配一份报价
forall(人中p)

报价中的金额分配[p][o]非常感谢。我感谢您的贡献。