【发布时间】:2020-02-14 08:32:29
【问题描述】:
我想检索 CPLEX OPL 中决策变量的降低成本。 但是,dvar 索引是元组,并且 cplex 无法遍历元组以打印降低的成本。元组是不可能的,还是有办法的? 例如有一个决策变量如下:
dvar float+ Production[ProductionLocations][TimePeriods];
tuple timeperiod {
string TimePeriodID;
string TimePeriodName;
float CurrencyRate;
float Rank;
string ActivePeriod;
}
{timeperiod} TimePeriods = ...;
tuple productionlocation {
string ProductID;
string ProductName;
string LocationID;
string LocationName;
}
{productionlocation} ProductionLocations = ...;
提前致谢。
【问题讨论】: