楼主: 896881930
826 0

大家帮帮看一下 [推广有奖]

  • 6关注
  • 0粉丝

本科生

13%

还不是VIP/贵宾

-

威望
0
论坛币
0 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
598 点
帖子
48
精华
0
在线时间
47 小时
注册时间
2011-10-6
最后登录
2013-3-29

楼主
896881930 发表于 2012-4-20 10:34:22 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
以下程序的加亮部分不怎么懂,大家知道应该找什么样的资料学习吗,我不知道是不是要找编程规则之类的书,希望大家多给我建议,先谢谢啦


data model;
      array grade{6} grade1-grade6;
      length _type_ $ 8 _row_ $ 8 _col_ $ 8;
      keep _type_ _row_ _col_ _coef_;

      ncust=5;
      nmach=4;
      ngrade=6;

      /* generate the objective function */

      _type_='MAX';
      _row_='OBJ';
      do k=1 to nmach;
         do i=1 to ncust;
            link readobj;     /* read the objective coefficient data */
            do j=1 to ngrade;
               if grade{j}^=. then do;
                  _col_='X'||put(i,1.)||put(j,1.)||put(k,1.);
                  _coef_=grade{j};
                  output;
               end;
            end;
         end;
      end;

       /* generate the demand constraints */        do i=1 to ncust;          link readdmd;        /* read the demand data */          do j=1 to ngrade;             if grade{j}^=. then do;                _type_='EQ';                _row_='DEMAND'||put(i,1.)||put(j,1.);                _col_='_RHS_';                _coef_=grade{j};                output;                _type_=' ';                do k=1 to nmach;                   _col_='X'||put(i,1.)||put(j,1.)||put(k,1.);                   _coef_=1.0;                   output;                end;             end;          end;       end;       /* generate the machine constraints */        do k=1 to nmach;          link readres;       /* read the machine data */          _type_='LE';          _row_='MACHINE'||put(k,1.);          _col_='_RHS_';          _coef_=avail;          output;          _type_=' ';          do i=1 to ncust;             do j=1 to ngrade;                if grade{j}^=. then do;                   _col_='X'||put(i,1.)||put(j,1.)||put(k,1.);                   _coef_=grade{j};                   output;                   end;                end;             end;          end;    readobj: set object;    return;    readdmd: set demand;    return;    readres: set resource;    return;    run;
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Constraints coefficient Constraint Objective constrain objective function generate 我不知道 程序

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-6 02:22