mathematical-optimization - CPLEX OPL 中的多期生产批量模型
问题描述
我是一名最后一年的学生,也是 CPLEX OPL 编程语言的新手。我一直在研究一家饮料公司的批量产品模型。我考虑了一个基于 GLSP 的小桶模型,每个宏观周期都有基于设置变化的灵活的微观周期。
该模型假设一个具有 3 条生产线和 3 个混合罐的 2 阶段工艺。我未能将以下项目表示为 CPLEX 代码。
- 每个宏观周期中的一组微观周期
- 从产品i到产品j的转换
- 从 MS Excel 中读取一组字符串数据。
我在模型中引用的学术论文可在此处找到模型的学术论文
有没有人可以帮我将论文中的数学翻译成 CPLEX OPL?
以下是我迄今为止声明模型变量和参数的代码
/*********************************************
* OPL 12.5 Model
* Author: HENRY
* Creation Date: Mar 9, 2019 at 7:30:27 PM
*********************************************/
//Model Parameters
int M = 4;
int F = 4;
int T = 5;
int N = 15;
int J = 4;
{int} micro_periods = {1,2,3};
{int} periods = {1,2,3,4,5};
tuple micro_period {
int micro1;
int micro2;
int micro3;
}
micro_period St[periods] = ...;//set of microperiods in period t
{string}machnes = {"line1","line2","line3"};
{string} lambda_j = ...;//set of lines that can produce item j
{string} alpha_m = ...;//set of items that can be produced on line m
{string} beta_m = ...;//set of liquid flavours that can be produced on tank m
{string} gamma_ml = ...;//set of items that can be produced on line m and need liquid flavour l
//ranges in the model
range products = 1..J;
range machines = 1..M;
range flavours = 1..F;
//range periods = 0..T-1;
//range micro_periods = 1..N; //total number of setups
tuple itm {
string line1;
string line2;
string line3;
}
//itm lambda_j[products] = ...;
tuple flvr {
string O;
string A;
string F;
string P;
}
//flvr beta_m[machines] = ...;
tuple lin {
string MA;
string MO;
string MF;
string PP;
}
//lin alpha_m[machines] = ...;
tuple gamma {
string line;
string flavor;
}
//gamma gamma_ml[machines][flavours] = ...;//revist this one
//Data Variables
float djt[products][periods] = ...;
float hj[products] = ...;
float gj[products] = ...;
float aIImj[machines][products] = ...;
float KIm[machines] = ...;//total capacity of tank m
float KIImt[machines][periods] = ...;//total available time
float rjl[products][flavours] = ...;
float qIm[machines] = ...;
float Ipj[products] = ...;//initial inventory of item j
float Imj[products] = ...;//inital back order of item j
//boolean yIml0[machines][flavours] = ...;
//boolean yIImj0[machines][products] = ...;
tuple flvr_edge {
int k;
int l;
}
tuple prdt_edge {
int i;
int j;
}
//sets in the model
setof(flvr_edge)flvrs = {<k,l> | k,l in flavours : k!=l};
float sIkl[flvrs] = ...;
float bIkl[flvrs] = ...;
setof(prdt_edge) prdts = {<i,j> | i,j in products: i!=j};
float sIIij[prdts] = ...;
float bIIij[prdts] = ...;
//Decision variables
dvar float+ Ipjt[products][periods];
dvar float+ Imjt[products][periods];
dvar float+ xIImjs[machines][products][micro_periods];
dvar float+ vIIms[machines][micro_periods];
dvar boolean yImls[machines][flavours][micro_periods];
dvar boolean yIImjs[machines][products][micro_periods];
dvar boolean zImkls[machines][flvrs][micro_periods];
dvar boolean zIImijs[machines][prdts][micro_periods];
解决方案
您将在 中找到许多 OPL 示例[InstallDir]/opl/examples/opl
。有关 OPL 的介绍可在https://www.ibm.com/support/knowledgecenter/SSSA5P_12.9.0/ilog.odms.ide.help/OPL_Studio/opllanguser/topics/opl_languser_shortTour.html获得。
推荐阅读
- bluez - BlueZ:更改本地存储目录
- angular - 交互对象键 *ngFor
- gradle - gradle 偶尔会超时从 JitPack 获取 jar
- hl7-fhir - 患者对 FHIR 的兴趣
- c# - WPF Program C# - 在页面之间使用导航时出错
- javascript - 仅获取和查看特定的 pdf 页面
- postgresql - 在 Azure 数据工厂中执行 PostgreSql 存储过程
- mern - 我正在尝试在 Heroku 上部署我的 MERN 堆栈应用程序,但出现以下错误
- terraform - Terraform local-exec 如何在 Concourse 上工作?
- html - 垂直显示 div 行问题