설명
제약 시스템에 변수 rhs가 있는 선형 프로그램
상보성 문제로 표현된다.
LP: 최소 <c,x>
도끼 = q(p),
성 Bx = b,
x >= 0
여기서 가격 p는 첫 번째 제약 조건에 대한 이중 관계입니다.
MCP: A'p + B'v + c >= 0, x >= 0, comp.
-Ax + q(p) = 0, p 자유, comp.
-Bx + b = 0, v 자유, comp.
물론 변수 x와 v는 다음과 같습니다.
슬롯 커뮤니티 모델에서 더 분할됩니다.
참고자료:
William W. Hogan, 프로젝트 독립성을 위한 에너지 정책 모델,
컴퓨터 및 운영 연구(2), 1975.
N. Josephy, PIES 에너지 모델을 위한 뉴턴 방법,
기술 보고서, 수학 연구 센터, UW-Madison, 1979.
S.P. Dirkse 및 M.C. Ferris, "MCPLIB: 비선형 혼합 모음
상보성 문제", 소프트웨어의 최적화 방법 5(1995), 319-345.
기고자: Michael Ferris 및 Steven Dirkse, 2010년 10월
소형 슬롯 커뮤니티 유형 :EQUIL
카테고리 : 슬롯 커뮤니티 EMP 라이브러리
메인 파일 : 슬롯 커뮤니티gms
$title PIES 에너지 평형 (PIES,SEQ=56)
$onText
제약 조건 시스템에 변수 rhs가 포함된 선형 프로그램
상보성 문제로 표현된다.
LP: 최소 <c,x>
도끼 = q(p),
성 Bx = b,
x >= 0
여기서 가격 p는 첫 번째 제약 조건에 대한 이중 관계입니다.
MCP: A'p + B'v + c >= 0, x >= 0, comp.
-Ax + q(p) = 0, p 자유, comp.
-Bx + b = 0, v 자유, comp.
물론 변수 x와 v는 다음과 같습니다.
슬롯 커뮤니티 모델에서 더 분할됩니다.
참고자료:
William W. Hogan, 프로젝트 독립성을 위한 에너지 정책 모델,
컴퓨터 및 운영 연구(2), 1975.
N. Josephy, PIES 에너지 모델을 위한 뉴턴 방법,
기술 보고서, 수학 연구 센터, UW-Madison, 1979.
S.P. Dirkse 및 M.C. Ferris, "MCPLIB: 비선형 혼합 모음
상보성 문제", 소프트웨어의 최적화 방법 5(1995), 319-345.
기고자: Michael Ferris 및 Steven Dirkse, 2010년 10월
$offText
세트
코모드 /
C'석탄'
L '라이트 오일'
H '중유'
/
R '자원' /
C '자본'
S'스틸'
/
creg '석탄 생산 지역' / 1 * 2 /
oreg '원유 생산 지역' / 1 * 2 /
ctyp '석탄 생산량 증가' / 1 * 3 /
otyp '석유 생산량 증가' / 1 * 2 /
'정유소'를 정제하다 / 1 * 2 /
사용자 '소비 지역' / 1 * 2 /
;
별칭(comod,cc);
매개변수
rmax(R) '최대 리소스 사용량' /
C 35000
에스 12000
/
cmax(creg,ctyp) '석탄 생산. 한계' /
1.1 300
1.2 300
1.3 400
2.1 200
2.2 300
2.3 600
/
omax(oreg,otyp) '석유 생산. 한계' /
1.1 1100
1.2 1200
2.1 1300
2.2 1100
/
rcost(refin) '정제 비용' /
1 6.5
2 5
/
q0(comod) '상품의 기본 수요' /
씨 1000
패 1200
H 1000
/
p0(comod) '상품 기본 가격' /
C12
패 16
H12
/
수요(상품,사용자) '최적 상태로 계산'
output(refin,*) '경질유/중유 생산량 %' /
1.L .6
1.H.4
2.L.5
2.H.5
/
;
TABLE esub(comod,cc) '대체의 교차 탄력성'
C L H
C -.75 .1 .2
L .1 -.5 .2
H .2 .1 -.5 ;
TABLE cruse(R,creg,ctyp) '석탄 생산의 자원 사용'
1 2 3
다.1 1 5 10
C.2 1 5 6
S.1 1 2 3
S.2 1 4 5 ;
테이블 oruse(R,oreg,otyp) '석유 제품의 자원 사용'
1 2
C.1 0 10
C.2 0 15
S.1 0 4
S.202;
테이블 ccost(creg,ctyp) '석탄 생산. 비용'
1 2 3
1 5 6 8
2 4 5 7 ;
테이블 ocost(oreg,otyp) '석유 생산. 비용'
1 2
1 1 1.5
2 1.25 1.5 ;
테이블 ctcost(creg,사용자)
1 2
1 1 2.5
2 .75 2.75 ;
테이블 otcost(oreg,refin)
1 2
1 2 3
2 4 2 ;
테이블 ltcost(refin,users) '경유 운송 비용'
1 2
1 1 1.2
2 1 1.5 ;
테이블 htcost(refin,users) '중유 거래 비용'
1 2
1 1 1.2
2 1 1.5 ;
긍정적인 변수
c(creg,ctyp) '석탄 생산'
o(oreg,otyp) '석유 생산'
ct(creg,users) '석탄 운송 수준'
ot(oreg,refin) '원유 운송 수준'
lt(refin,users) '경량 운송 수준'
ht(refin,users) '무거운 교통 수준'
p(comod,users) '상품 가격'
;
c.up(creg,ctyp) = cmax(creg,ctyp);
o.up(oreg,otyp) = omax(oreg,otyp);
방정식
dembal(comod,users) '제품의 과잉 공급'
cmbal(creg) '석탄 물질수지'
ombal(oreg) '석유 물질 균형'
lmbal(refin) '가벼운 소재 밸런스'
hmbal(refin) '무거운 물질 균형'
ruse(R) '자원 사용 제약'
;
dembal(comod,사용자) ..
(sum(creg,ct(creg,사용자)))$[sameas(comod,'C')]
+ (sum(refin,lt(refin,users)))$[sameas(comod,'L')]
+ (sum(refin,ht(refin,users)))$[sameas(comod,'H')]
=g=
q0(comod) * prod(cc, (p(cc,users)/p0(cc))**esub(comod,cc));
cmbal(creg) ..
sum(ctyp,c(creg,ctyp)) =e= sum(사용자,ct(creg,사용자));
옴발(oreg) ..
sum(otyp,o(oreg,otyp)) =e= sum(refin,ot(oreg,refin));
lmbal(정제) ..
sum(oreg, ot(oreg,refin)) * 출력(refin,"L") =e=
sum(users,lt(refin,users));
Hmbal(정제) ..
sum(oreg, ot(oreg,refin)) * 출력(refin,"H") =e=
sum(users,ht(refin,users));
계략 (R) ..
rmax(R) =g=
합계(creg, 합계(ctyp, c(creg,ctyp)*cruse(R,creg,ctyp)))
+ sum(oreg, sum(otyp, o(oreg,otyp)*oruse(R,oreg,otyp)));
옵션 리미로우 = 0;
옵션 limcol = 0;
옵션 iterlim = 1000;
옵션 reslim = 120;
테이블 i_c(creg,ctyp)
1 2 3
1 300 300 400
2 200 300 600 ;
테이블 i_o(oreg,otyp)
1 2
1 1100 1000
2 1300 1000 ;
테이블 i_ct(creg,users) '초기 거래'
1 2
1 0 828
2 1016 84 ;
테이블 i_ot(oreg,refin) '초기 거래'
1 2
1 2075 0
2 0 2358;
테이블 i_lt(refin,users) '초기 거래'
1 2
1 22 1223
2 1179 0 ;
테이블 i_ht(refin,users) '초기 거래'
1 2
1 0 830
2 998 180 ;
테이블 iprice(comod,users) '초기 가격 추정'
1 2
C 11.7 13.7
패 15.8 16.0
H 11.9 12.4 ;
c.l(creg,ctyp) = i_c(creg,ctyp);
o.l(oreg,otyp) = i_o(oreg,otyp);
ct.l(creg,사용자) = i_ct(creg,사용자);
ot.l(oreg,refin) = i_ot(oreg,refin);
lt.l(수정,사용자) = i_lt(수정,사용자);
ht.l(수정,사용자) = i_ht(수정,사용자);
p.lo(comod,사용자) = .1;
* p.fx(comod,사용자) = iprice(comod,사용자);
p.l(comod,사용자) = iprice(comod,사용자);
* 곱셈을 초기화합니다.....
cmbal.m(creg) = 1;
ombal.m(oreg) = 1;
lmbal.m(정제) = 1;
hmbal.m(정제) = 1;
ruse.m(R) = 1;
변수 obj;
방정식 defobj;
defobj.. obj =e= sum((creg,ctyp), ccost(creg,ctyp)*c(creg,ctyp))
+ 합계((oreg,otyp), ocost(oreg,otyp)*o(oreg,otyp))
+ 합계((creg, 사용자), ctcost(creg, 사용자)*ct(creg, 사용자))
+ sum((oreg,refin), (otcost(oreg,refin) + rcost(refin))*ot(oreg,refin))
+ sum((재정의, 사용자), ltcost(재정의, 사용자)*lt(재정의, 사용자))
+ sum((재정의, 사용자), htcost(재정의, 사용자)*ht(재정의, 사용자));
모델 Piesemp / defobj, dembal, cmbal, ombal, lmbal, hmbal, ruse /;
파일 myinfo /'%emp.info%'/;
putclose myinfo 'dualVar p dembal';
emp min obj를 사용하여 Piesemp를 해결합니다.
* 다음은 명시적으로 생성된 MCP를 설정합니다.
긍정적인 변수
cv(creg) 'cmbal과 이중'
난(oreg)
lv(정제)
hv(정제)
mu(R) '계략의 이중 단점, 즉 한계 효용'
;
방정식
delc(creg,ctyp)
델로(oreg, otyp)
delct(creg,사용자)
delot(oreg,refin)
Dellt(구체화,사용자)
delht(정의,사용자)
;
delc(creg,ctyp) ..
ccost(creg,ctyp) + sum(R, cruse(R,creg,ctyp)*mu(R))
=g= cv(creg);
델로(oreg,otyp) ..
ocost(oreg,otyp) + sum(R, oruse(R,oreg,otyp)*mu(R))
=g= ov(oreg);
delct(creg,사용자) ..
ctcost(creg,사용자) + cv(creg) =g= p("C",사용자);
delot(oreg,refin) ..
otcost(oreg,refin) + rcost(refin) + ov(oreg) =g=
output(refin,"L") * lv(refin) + output(refin,"H") * hv(refin);
Dellt(수정,사용자) ..
ltcost(정제, 사용자) + lv(정제)
=g= p("L",사용자);
delht(정제,사용자) ..
htcost(재정의, 사용자) + hv(재정의)
=g= p("H",사용자);
모델 파이 / delc.c, delo.o, delct.ct, delot.ot, delt.lt, delht.ht,
dembal.p, cmbal.cv, ombal.ov, lmbal.lv, hmbal.hv, ruse.mu /;
cv.l(creg) = cmbal.m(creg);
ov.l(oreg) = ombal.m(oreg);
lv.l(refin) = lmbal.m(refin);
hv.l(refin) = hmbal.m(refin);
mu.l(R) = ruse.m(R);
pies.iterlim = 0;
mcp를 사용하여 파이를 해결합니다.
abort$[pies.solveStat <> %solveStat.normalCompletion%] 'EMP 솔루션은 PIES MCP에 최적이어야 합니다.';
abort$[pies.modelStat <> %modelStat.optimal%] 'EMP 솔루션은 PIES MCP에 최적이어야 합니다.';
/pies.out/을 정리하세요;
내놔;
"석탄 생산: 유형 1 유형 2 유형 3"을 입력하세요. /;
put "지역 1", c.l("1","1"):11:3, c.l("1","2"):11:3, c.l("1","3"):11:3 /;
put "지역 2", c.l("2","1"):11:3, c.l("2","2"):11:3, c.l("2","3"):11:3 /;
놓다 /;
"석유 제품: 유형 1 유형 2"를 입력하세요. /;
put "지역 1", o.l("1","1"):11:3, o.l("1","2"):11:3 /;
put "지역 2", o.l("2","1"):11:3, o.l("2","2"):11:3 /;
놓다 /;
put "석탄 거래: 사용자 1 사용자 2" /;
put "지역 1", ct.l("1","1"):11:3, ct.l("1","2"):11:3 /;
put "지역 2", ct.l("2","1"):11:3, ct.l("2","2"):11:3 /;
놓다 /;
"Oil Trans: 정제 1 정제 2" /;
put "지역 1", ot.l("1","1"):11:3, ot.l("1","2"):11:3 /;
put "지역 2", ot.l("2","1"):11:3, ot.l("2","2"):11:3 /;
놓다 /;
put "Light Trans: 사용자 1 사용자 2" /;
put "refin 1 ", lt.l("1","1"):11:3, lt.l("1","2"):11:3 /;
put "refin 2 ", lt.l("2","1"):11:3, lt.l("2","2"):11:3 /;
놓다 /;
put "Heavy Trans: 사용자 1 사용자 2" /;
put "refin 1 ", ht.l("1","1"):11:3, ht.l("1","2"):11:3 /;
put "refin 2 ", ht.l("2","1"):11:3, ht.l("2","2"):11:3 /;
놓다 /;
put "가격: 사용자 1 사용자 2" /;
put "석탄", p.l("C","1"):11:3, p.l("C","2"):11:3 /;
put "경유", p.l("L","1"):11:3, p.l("L","2"):11:3 /;
put "중유", p.l("H","1"):11:3, p.l("H","2"):11:3 /;
놓다 /;
수요(상품,사용자) = q0(상품) *
prod(cc, (p.l(cc,users)/p0(cc))**esub(comod,cc));
put "수요: 사용자 1 사용자 2" /;
put "석탄", 수요("C","1"):11:3, 수요("C","2"):11:3 /;
put "경유", 수요("L","1"):11:3, 수요("L","2"):11:3 /;
put "중유", 수요("H","1"):11:3, 수요("H","2"):11:3 /;
놓다 /;
put "자본 사용량: ", (0-ruse.l("C")):10:2, " 이중 가격: ", mu.l("C"):9:3 /;
put " 강철 사용량: ", (0-ruse.l("S")):10:2, " 이중 가격: ", mu.l("S"):9:3 /;