lingo例题讲解1

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

MODEL: ! Assembly line balancing model; ! This model involves assigning tasks to stations
in an assembly line so bottlenecks are avoided. Ideally, each station would be assigned an equal amount of work.; SETS: ! The set of tasks to be assigned are A through K, and each task has a time to complete, T; TASK/ A B C D E F G H I J K/: T; ! Some predecessor,successor pairings must be observed(e.g. A must be done before B, B before C, etc.); PRED( TASK, TASK)/ A,B B,C C,F C,G F,J G,J J,K D,E E,H E,I H,J I,J /;
! There are 4 workstations; STATION/1..4/; TXS( TASK, STATION): X; ! X is the attribute from the derived set TXS that represents the assignment. X(I,K) = 1 if task I is assigned to station K; ENDSETS DATA: ! Data taken from Chase and Aquilano, POM; ! There is an estimated time required for each task: A B C D E F G H I J K; T = 45 11 9 50 15 12 12 12 12 8 9; ENDDATA ! The model; ! *Warning* may be slow for more than 15 tasks; ! For each task, there must be one assigned station;
The times to complete the various tasks are given in the table below: Task: A B C D E F G H I J K Minutes:45 11 9 50 15 12 12 12 12 8 9 We need to find an assignment of tasks to workstations that minimize the assembly line抯 cycle time.
@FOR( TASK( I): @SUM( STATION( K): X( I, K)) = 1); ! Precedence constraints; ! For each precedence pair, the predecessor task I cannot be assigned to a later station than its successor task J; @FOR( PRED( I, J): @SUM( STATION( K): K * X( J, K) - K * X( I, K)) >= 0); ! For each station, the total time for the assigned tasks must be less than the maximum cycle time, CYCTIME; @FOR( STATION( K): @SUM( TXS( I, K): T( I) * X( I, K)) <= CYCTIME); ! Minimize the maximum cycle time; MIN = CYCTIME; ! The X(I,J) assignment variables are binary integers; @FOR( TXS: @BIN( X)); END
data: capacity=1,1,1,1,1; demend=1,1,1,1,1; cost=8 6 10 9 12
9 12 7 11 9 7 435 8 9 5 8 11 8 4 6 7 5 11; Enddata end
练习
For our example, we have eleven tasks (A through K) to assign to four workstations (1 through 4). The task precedence diagram looks like this:
例题讲解
Model: title Assignment Problem; sets: worker/w1,w2,w3,w4,w5/:capacity; job/j1,j2,j3,j4,j5/:demend; routes(worker,job):cost,volume; endsets min=@sum(routes:cost*volume); @for(job(j):@sum(worker(i):volume(i,j)) =demend(j)); @for(worker(i):@sum(job(j):volume(i,j)) =capacity(i));
Fra Baidu bibliotek
The Sets
We have two primitive sets in this model総he tasks (TASK) and the workstations (STATION).
From these two primitive sets, we create two derived sets.
相关文档
最新文档