Jsun Yui Wong
The following computer programs try to solve a transformer design model based on the transformer design model on page 265 of Ballard, Jelinek, and Schinzinger [1, p. 265]. For the present paper the first four variables are required to be integer; X(5) and X(6) are continuous, representing magnetic-flux density and electric-current density, respectively; see Papalambros and Wilde [2, p. 258] and Ballard, Jelinet and Schinzinger [1, p. 265]. Thus the present model has four integer variables and two continuous variables.
The transformer design model on page 265 of Ballard, Jelinek, and Schinzinger [1] has two constraints, one much longer than the other. It seems that at least one of these two inequality constraints is active/holding, but which one is active/holding is a question. To find out one can treat one inequality constraint at a time as an equality constraint. Hence the first computer program below treats the shorter constraint of the transformer design model as an equality constraint; line 354 below is for that purpose. Similarly the second computer program below treats the longer constraint as an equality constaint. As usual, the user normally goes with the best solution produced.
One notes that the right-hand side of the longer constraint is 1, Ballard et al. [1, p. 265], not 1.2.
Case One: The shorter constraint is active/holding:
0 DEFSNG A-Z
2 DEFINT J,K
3 DIM B(99),N(99),A(99),H(99),L(99),U(99),X(1111),D(111),P(111),PP(22)
12 FOR JJJJ=-32000 TO 32000
14 RANDOMIZE JJJJ
16 M=-1D+37
61 FOR KLQ=1 TO 6
62 A(KLQ)=RND*30
63 NEXT KLQ
126 IMAR=10+FIX(RND*1000)
128 FOR I=1 TO IMAR STEP .5
129 FOR KKQQ=1 TO 6
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
181 J=1+FIX(RND*6)
183 R=(1-RND*2)*A(J)
191 IF RND<.14 THEN X(J)=A(J)+RND^5*R ELSE IF RND<.17 THEN X(J)=A(J)+R ELSE IF RND<.2 THEN X(J)=A(J)+RND*R ELSE IF RND<.25 THEN X(J)=A(J)+RND^2*R ELSE IF RND<.33 THEN X(J)=A(J)+RND^3*R ELSE IF RND<.5 THEN X(J)=A(J)+RND^4*R ELSE X(J)=INT(X(J))
327 X(1)=INT(X(1))
328 X(2)=INT(X(2))
329 X(3)=INT(X(3))
330 X(4)=INT(X(4))
331 FOR J42=1 TO 6
333 IF X(J42)<.5 THEN 1670
336 NEXT J42
354 X(6)=2.07/(.001*X(1)*X(2)*X(3)*X(4)*X(5) )
425 L2=.00062*X(1)*X(4)*X(5)^2*(X(1)+X(2)+X(3))+.00058*X(2)*X(3)*X(6)^2*(X(1)+1.57*X(2)+X(4))-1
426 IF L2>0 THEN 1670
444 P1NEWMAY=-.0204*X(1)*X(4)*(X(1)+X(2)+X(3))-.0187*X(2)*X(3)*(X(1)+1.57*X(2)+X(4))-.0607*X(1)*X(4)*X(5)^2*(X(1)+X(2)+X(3))-.0437*X(2)*X(3)*X(6)^2*(X(1)+1.57*X(2)+X(4))
448 P=P1NEWMAY
1451 IF P<=M THEN 1670
1452 M=P
1454 FOR KLX=1 TO 6
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 IF M<-138 THEN 1999
1928 PRINT A(1),A(2),A(3),A(4),A(5),A(6),M,JJJJ
1999 NEXT JJJJ
This BASIC computer program was run with Microsoft's GW BASIC 3.11 interpreter. The complete output through JJJJ=32000 is shown below. What immediately follows is a hand copy from the computer monitor.
5 5 11 13 .7081461
.8176574 -137.5205 -30999
5 5 11 13 .7080245
.8177978 -137.5205 -29097
5 5 11 12 .7444006
.8426546 -136.0535 -17682
5 5 12 12 .7200568
.7985481 -137.9016 -17650
5 5 11 12 .7445957
.8424338 -137.0535 -15859
5 5 10 14 .7010605
.8436198 -137.5205 -7566
6 5 9 13 .6635701
.8887434 -137.8188 -869
On a personal computer with an Intel 2.66 chip and the IBM basica/D interpreter, version GW BASIC 3.11, the running time (throughput time) from JJJJ=-32000 through JJJJ=32000 was one hour.
Case Two: The longer constraint is active/holding:
0 DEFSNG A-Z
2 DEFINT J,K
3 DIM B(99),N(99),A(99),H(99),L(99),U(99),X(1111),D(111),P(111),PP(22)
12 FOR JJJJ=-32000 TO 32000
14 RANDOMIZE JJJJ
16 M=-1D+37
61 FOR KLQ=1 TO 6
62 A(KLQ)=RND*30
63 NEXT KLQ
126 IMAR=10+FIX(RND*1000)
128 FOR I=1 TO IMAR STEP .5
129 FOR KKQQ=1 TO 6
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
181 J=1+FIX(RND*6)
183 R=(1-RND*2)*A(J)
191 IF RND<.14 THEN X(J)=A(J)+RND^5*R ELSE IF RND<.17 THEN X(J)=A(J)+R ELSE IF RND<.2 THEN X(J)=A(J)+RND*R ELSE IF RND<.25 THEN X(J)=A(J)+RND^2*R ELSE IF RND<.33 THEN X(J)=A(J)+RND^3*R ELSE IF RND<.5 THEN X(J)=A(J)+RND^4*R ELSE X(J)=INT(X(J))
327 X(1)=INT(X(1))
328 X(2)=INT(X(2))
329 X(3)=INT(X(3))
330 X(4)=INT(X(4))
334 FOR J42=1 TO 6
335 IF X(J42)<.1 THEN 1670
336 NEXT J42
345 DOWN=.00062*X(1)*X(4)* (X(1)+X(2)+X(3))
348 IF ( ( -.00058*X(2)*X(3)*X(6)^2*(X(1)+1.57*X(2)+X(4))+1 ) /DOWN )<0 THEN 1670
352 X(5)= ( ( -.00058*X(2)*X(3)*X(6)^2*(X(1)+1.57*X(2)+X(4))+1 ) /DOWN )^.5
433 L1=-.001*X(1)*X(2)*X(3)*X(4)*X(5)*X(6)+2.07
434 IF L1>0 THEN 1670
444 P1NEWMAY=-.0204*X(1)*X(4)*(X(1)+X(2)+X(3))-.0187*X(2)*X(3)*(X(1)+1.57*X(2)+X(4))-.0607*X(1)*X(4)*X(5)^2*(X(1)+X(2)+X(3))-.0437*X(2)*X(3)*X(6)^2*(X(1)+1.57*X(2)+X(4))
448 P=P1NEWMAY
1451 IF P<=M THEN 1670
1452 M=P
1454 FOR KLX=1 TO 6
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1557 GOTO 128
1670 NEXT I
1889 IF M<-135.8 THEN 1999
1928 PRINT A(1),A(2),A(3),A(4),A(5),A(6),M,JJJJ
1999 NEXT JJJJ
This BASIC computer program was run with Microsoft's GW BASIC 3.11 interpreter. The complete output through JJJJ=32000 is shown below. What immediately follows is a hand copy from the computer monitor.
5 5 10 13 .7305032
.8718993 -135.7372 -30900
5 5 10 13 .7304968
.8719051 -135.737 -29482
5 5 10 13 .7304941
.8719076 -135.7369 -28262
5 5 10 13 .7304928
.8719087 -135.7369 -24142
5 5 10 13 .7304967
.8719052 -135.737 -19194
5 5 10 13 .7304926
.8719089 -135.7369 -19066
5 5 10 13 .730497
.8719049 -135.737 -12277
5 5 10 13 .7305082
.8718948 -135.7373 -8203
5 5 10 13 .7304963
.8719055 -135.737 -1702
5 5 10 13 .7305092
.8718939 -135.7373 8294
5 5 10 13 .7304939
.8719076 -135.7369 10207
5 5 10 13 .7304928
.8719087 -135.7369 18893
5 5 10 13 .7304925
.871909 -135.7369 20486
5 5 10 13 .7308841
.8715561 -135.7473 28720
On a personal computer with an Intel 2.66 chip and the IBM basica/D interpreter, version GW BASIC 3.11, the running time (throughput time) from JJJJ=-32000 through JJJJ=32000 was two hours.
References
[1] D. H. Ballard, C. O. Jelinek, and R. Schinzinger (1974). An algorithm for the solution of constrained generalised polynomial programming problems. The Computer Journal, Vol. 17, Number 3, pp. 261-266.
[2] Panos Y. Papalambros, Douglass J. Wilde. Principles of Optimal Design, Second Edition. Cambridge University Press, 2000.
[3] Microsoft Corp. BASIC, second edition (May 1982), Version 1.10. Boca Raton, Florida: IBM Corp., Personal Computer, P. O. Box 1328-C, Boca Raton, Florida 33432, 1981.