XpressMemoForDash.dvi

Size: px
Start display at page:

Download "XpressMemoForDash.dvi"

Transcription

1 Xpress-MP 1 Ver (Ver1.0) (Ver1.1) Xpress-MP Xpress-MP 2006

2 Xpress-MP,. Dash [1]. mosel,, mosel.,,?, shokosv Xpress-MP,., 2. Example. 1 Xpress-MP 2 mosel 3 mosel 4, shakosv Xpress-MP Hyper ( ), Xpress-IVE, : Xpress-MP.,.,,,. i

3 1 Xpress-MP (shakosv ) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : Xpress-IVE : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 4 2 Xpress-MP,! (LP) (LPSimple.mos) : : : : : : : : : : : : : : : : : : (IP) (IPwithData.mos) : : : : : : : : : : : : : : : : (QP) (QPwithData.mos) : : : : : : : : : : : : : : : (Knapsack.mos) : : : : : : : : : : : : : : : : : (DEA) (DEA.mos) : : : : : : : : : : : : : : : : : : : : : : 17 3 mosel : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : model uses : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : ! writeln() : : : : : : : : : : : : : : : : : : : : : : : : : : : : (declarations end-declarations) : : : : : : : : : : : : : : : : : : : (real, integer, mpvar ) : : : : : : : : : : : : : : : : : : : : : : (=) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : (set of, range) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : (array of) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : (+, -, *, / ) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : (:= ) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : (parameters end-parameters) : : : : : : : : : : : : : : : : : : (>=, <>, and, or ) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : (if, case ) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : (forall, while, repeat ) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : (is free) : : : : : : : : : : : : : : : : : : : : : : : : : : (is integer, is binary) : : : : : : : : : : : : : : : : : : : (initializations from end-initializations) : : : : : : : : : : : : : : : : : : : : (function, procedure) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : (sum, prod, round, abs ) : : : : : : : : : : : : : : : : : : : (minimize, maximize) : : : : : : : : : : : : : : : : : : : : : : : : : : : (random) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 34 ii

4 4!? (fopen ) : : : : : : : : : : : : : : : : : : : : : : (gettime) : : : : : : : : : : : : : : : : : : : : : : : (getprobstat) : : : : : : : : : : : : : : : : : (,, ) : : : : : : : : : : : (minimize, maximize) (setcallback) : : : : : : : : (sethidden) : : : : : : : : : : : : : : : : : : : : : : : : (create) : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : iii

5 1 Xpress-MP Xpress-MP, (a) shakosv Xpress-MP. 2 (b) (c) Xpress-IVE. C Xpress-MP., (a), (b). 1.1 (shakosv ) shakosv Xpress-MP., shakosv Xpress-MP, (QP).,.. 1: mosel ( 1.1).,, ``mos''., ``Ex01.mos''. Ex01.mos model Ex01 uses "mmxprs" declarations a: mpvar b: mpvar end-declarations 3*a + 2*b <= 400 a + 3*b <= 200 profit := a + 2*b maximize(profit) 2: writeln("profit is ", getobjval) writeln(" a = ", getsol(a), "; b = ", getsol(b)) end-model. 3: ( 1.2). shakosv> mp-model > exec Ex01 > quit 2 18 Windows Xpress-MP, (b) 1

6 1.1: 1.2: Xpress 2

7 1.1: Xpress-MP mp-model exec (.mos) quit help compile (.mos) load (.mos) cload (.mos) run (.mos) list exportprob -m (.mat) Xpress-MP. mp-mosel. shokosv mp-.,. Xpress-MP.....,.. run,.,. MPS.. 3

8 1.2 Xpress-IVE Xpress-IVE. 1: Xpress-IVE ( 1.3). 2: mosel ( 1.4).,, ``mos''. 3: ( 1.4). 1.3: Xpress-IVE 4

9 1.4: 5

10 2 Xpress-MP,!,, mosel,., (LP) (IP). 3 (22 ), (LP), (IP). 2.1 (LP) (LPSimple.mos) : (LP) min s.t. cx Ax = b x = 0;., A b, c, A = ; b = h3 ; c = 2 4 ; 7 i. (LP) ``LPSimple.mos''. 6

11 LPSimple.mos 1 model LPSimple 2 uses "mmxprs" 3 4 writeln(" (LP):") 5 writeln(" min c x") 6 writeln(" s.t Ax >= b, x >= 0") 7 writeln(" ") 8 9!!! A, b, c, x 10 declarations 11 I = 1..3! I 12 J = 1..3! J A: array(i, J) of real! A 15 b: array(i) of real! b 16 c: array(j) of real! c x: array(j) of mpvar! x 19 end-declarations 20 21!!! 22 writeln(">.") 23 A := [1, 1, 2, 24 2, 0, 2, 25 2, 1, 3] 26 b := [4, 5, 7] 27 c := [3, 2, 4] 28 writeln(" A = ", A, " n b = ", b, " n c = ", c) 29 30!!! Ax >= b, x >= 0 31 writeln(">.") 32 forall (i in I) do 33 sum(j in J) A(i,j)*x(j) >= b(i) 34 end-do 35 36!!! ObjFunc := cx 37 writeln(">.") 38 ObjFunc := sum(j in J) c(j)*x(j) 39 40!!! 41 writeln("> ") 42 minimize(objfunc) 43 44!!! 45 writeln(" = ", getobjval) 46 forall (j in J) writeln(" x(", j, ") = ", getsol(x(j))) 47 end-model 7

12 . LPsimple.mos (LP): min c x s.t Ax >= b, x >= 0 >. A = [1,1,2,2,0,2,2,1,3] b = [4,5,7] c = [3,2,4] >. >. > = 9.5 x(1) = 0.5 x(2) = 0 x(3) = 2 (LPSimple.mos) 1 47 model.. 2 mmxprs. 4, wirte writeln. 9!, mpvar A b, c Ax = b, 33 sum(j in J) A(i,j)*x(j) = b(i). ( ) minimize( ) maximize( ). 45 getobjval. 46. getsol. 2.2 (IP) (IPwithData.mos), A; b; c, (IP) : (IP) min s.t. cx Ax = b x = 0 x ; 8

13 ., LPSimple.mos forall (j in J) x(j) is integer,,. ffl A; b; c. ffl parameters. ffl procedure., ``Abc.dat''. Abc.dat!!! A, b, c A: [ ] b: [ ] c: [ ], ``IPwithData.mos''. 9

14 IPwithData.mos 1 model IPwithData 2 uses "mmxprs" 3 4!!! 5 parameters 6 FName = "Abc.dat" 7 end-parameters 8 9 writeln(" (IP):") 10 writeln(" min c x") 11 writeln(" s.t Ax >= b, x >= 0, x is integer") 12 writeln(" ") 13 14!!! A, b, c, x 15 declarations 16 I = 1..3! I 17 J = 1..3! J 18 A: array(i, J) of real! A 19 b: array(i) of real! b 20 c: array(j) of real! c x: array(j) of mpvar! 23 end-declarations 24 initializations from FName 25 A b c 26 end-initializations 27 writeln(" A = ", A, " n b = ", b, " n c = ", c) 28 29!!! 30 procedure PrintSol 31 writeln(" = ", getobjval) 32 forall (j in J) writeln(" x(", j, ") = ", getsol(x(j))) 33 end-procedure 34 35!!! Ax >= b, x >= 0 36 writeln(">.") 37 forall (i in I) do 38 sum(j in J) A(i,j)*x(j) >= b(i) 39 end-do 40 forall (j in J) x(j) is_integer 41 42!!! ObjFunc := cx 43 writeln(">.") 44 ObjFunc := sum(j in J) c(j)*x(j) 45 46!!! 47 writeln("> ") 48 minimize(objfunc) 49 50!!! ( ) 51 PrintSol 52 end-model 10

15 . IPwithData.mos (IP): min c x s.t Ax >= b, x >= 0, x is integer A = [1,1,2,2,0,2,2,1,3] b = [4,5,7] c = [3,2,4] >. >. > = 10 x(1) = 2 x(2) = 0 x(3) = 1 (IPwithData.mos) LPSimple.mos. 5 7 parameters. FName A b, c. FName PrintSol PrintSol. 2.3 (QP) (QPwithData.mos) : (QP) min s.t. 1 2 x > Qx + cx Ax = b x = 0;., A; b; c, Q Q = , ``ABcQ.dat''. 11

16 AbcQ.dat!!! A, b, c, Q A: [ ] b: [ ] c: [ ] Q: [ ], ``QPwithData.mos''. 12

17 QPwithData.mos 1 model QPwithData 2 uses "mmxprs", "mmquad" 3 4 parameters 5 FName = "AbcQ.dat" 6 end-parameters 7 8 writeln(" 2 (QP):") 9 writeln(" min 1/2 x^t Q x + cx") 10 writeln(" s.t Ax >= b, x >= 0") 11 writeln(" ") 12 13!!! A, b, c, Q, x 14 declarations 15 I = 1..3! I 16 J = 1..3! J 17 A: array(i, J) of real! A 18 b: array(i) of real! b 19 c: array(j) of real! c 20 Q: array(j,j) of real! Q x: array(j) of mpvar! x 23 end-declarations 24 initializations from FName 25 A b c Q 26 end-initializations 27 writeln(" A = ", A, " n b = ", b, " n c = ", c, " n Q = ", Q) 28 29!!! Ax >= b, x >= 0 30 writeln(">.") 31 forall (i in I) do 32 sum(j in J) A(i,j)*x(j) >= b(i) 33 end-do 34 35!!! 1/2 (x^t) Qx + cx 36 writeln(">.") 37 ObjFunc := 1/2*sum(j1 in J, j2 in J) x(j1)*q(j1,j2)*x(j2) + sum(j in J) c(j)*x(j) 38 39!!! 40 writeln("> ") 41 minimize(objfunc) 42 43!!! 44 writeln(" = ", getobjval) 45 forall (j in J) writeln(" x(", j, ") = ", getsol(x(j))) 46 end-model 13

18 . QPwithData.mos 2 (QP): min 1/2 x^t Q x + cx s.t Ax >= b, x >= 0 A = [1,1,2,2,0,2,2,1,3] b = [4,5,7] c = [3,2,4] Q = [3,1,0,0,2,1,1,0,2] >. >. > = x(1) = x(2) = e-008 x(3) = (QPwithData.mos) 2 mmquad (Knapsack.mos),,.,.,.,. ( ),.., (Capacity) 100,. 2.1: , Item, i W eight(i), Value(i). x(i), (i 2 Item) x(i) = 8 < : 1 ( i ) 0 ( );, 14

19 ., (KP). max (KP) s.t. X X i2item Value(i) x(i) W eight(i) x(i) 5 Capacity i2item x(i) 2f0; 1g (8i 2 Item): (KP) Xpress-MP, ``Knapsack.dat''. Knapsack.dat!!! Item, Weight, Value Item: [ " " " " " " " " " " " " " " ] Weight: [ ] Value: [ ] (KP) ``Knapsack.mos''. 15

20 Knapsack.mos 1 model Knapsack 2 uses "mmxprs" 3 4 parameters 5 FName = "Knapsack.dat"! 6 Capacity = 100! 7 end-parameters 8 9 writeln("0-1 ") 10 11!!! Capacity, Weight, Value, x 12 declarations 13 Item: set of string! Item 14 Value: array(item) of integer! Value 15 Weight: array(item) of integer! Weight x: array(item) of mpvar! x 18 end-declarations 19 initializations from FName 20 Item Weight Value 21 end-initializations writeln(" ") 24 writeln(" ") 25 writeln("======================") 26 forall (i in Item) do 27 writeln(strfmt(i,8), strfmt(weight(i),5), strfmt(value(i),5)) 28 end-do 29 writeln(" ", Capacity) 30 writeln(" ") 31 32!!! 33 forall (i in Item) create(x(i)) 34 35!!! Weight * x <= Capacity, x is binary 36 writeln(">.") 37 sum(i in Item) Weight(i)*x(i) <= Capacity 38 forall (i in Item) x(i) is_binary 39 40!!! ObjFunc := Value * x 41 writeln(">.") 42 ObjFunc := sum(i in Item) Value(i)*x(i) 43 44!!! 45 writeln("> ") 46 maximize(objfunc) 47 48!!! 49 writeln(" : ", getobjval) 50 write(" : ") 51 forall (i in Item round(getsol(x(i))) = 1) write(i, " ") 52 end-model 16

21 . Knapsack.mos ====================== >. >. > : 60 : (Knapsack.mos) Item set of string., Item, Item. 27 strfmt(" ", ),. 33 Item, x(i) (DEA) (DEA.mos),. (linctr ) (sethidden ). (Data Envelopment Analysis, DEA ), 1978 Charnes-Cooper., n (Decision Making Unit, DMU ), p, q., k DMU k (k =1;:::;n), k X ik (i =1;:::;p), Y jk (j =1;:::;q). DEA, DMU. DMU,,,., i v i, j 17

22 u j..,, DMU., DMU k (k =1;:::;n) : max k = (DEA(k)) s.t. qx Y jk u j j=1 px X ik v i i=1 qx Y jd u j j=1, : max k = s.t. (DEA(k)) qx px 5 1 (d =1;:::;n) i=1 u j = 0 (j =1;:::;q) v i = 0 (i =1;:::;p): Y jk u j j=1 px X ik v i = 1 i=1 qx X Y jd u j 5 p j=1 X id v i i=1 (d =1;:::;n) u j = 0 (j =1;:::;q) v i = 0 (i =1;:::;p):. (DEA(k)) k Λ DMU k, k Λ =1, DMU k, k Λ < 1, DMU k.,., 2.2: DMU ( 1) ( 2) ( ) , k 2f ;:::; g (DEA(k))., ``DEA.dat''. Xpress-MP 18

23 DEA.dat!!! In: [ ] " " " "!!! Out: [ " " ]!!! DMU: [ " " " " " " " " " " " " " " " " " " ]!!! (, ) X: [ ]!!! (, ) Y: [ ] (DEA(k)) ``DEA.mos''. 19

24 DEA.mos 1 model DEA 2 uses "mmxprs" 3 4 writeln(" ") 5 writeln(" (DEA) n coded at Feb by T. featuring D.Z ") 6 writeln("=========================================") 7 8!!!! 1 9 declarations 10 In: set of string! 11 Out: set of string! 12 DMU: set of string! (DEA) 13 X: array (In, DMU) of real! 14 Y: array (Out, DMU) of real! 15 v: array (In) of mpvar! 16 u: array (Out) of mpvar! 17 Const: array(dmu) of linctr! 18 end-declarations 19 20!!!! 1 21 initializations from "DEA.dat" 22 In Out DMU X Y 23 end-initializations 24 25!!!. 26 forall (i in In) create(v(i)) 27 forall (j in Out) create(u(j)) 28 29!!! Yu <= Xv, u >= 0, v >= 0 30 forall (d in DMU) do 31 sum (j in Out) Y(j,d)*u(j) <= sum(i in In) X(i,d)*v(i) 32 end-do 33 34!!! 35 forall (k in DMU) do 36!!! 37 Const(k) := sum (i in In) X(i,k)*v(i) = 1 38!!! 39 ObjFunc := sum(j in Out) Y(j,k)*u(j) 40!!! 41 maximize(objfunc) 42!!! 43 writeln(k, " n : ", getobjval) 44 forall (i in In) writeln(" ", i, " = ", getsol(v(i))) 45 forall (j in Out) writeln(" ", j, " = ", getsol(u(j))) 46 writeln(" ") 47!!! 48 sethidden(const(k), true) 49 end-do 50 end-model 20

25 . DEA.mos (DEA) coded at Feb by T. featuring D.Z ========================================= : = 0 = = : = 0 = = (, ) : = = 0 = : = 0 = = (DEA.mos) 17 linctr Const , 38 k. 48 sethidden k. 21

26 3 mosel, mosel. 3.1,. and, array, as, boolean, break, case, declarations, div, do, mpvar, dynamic, elif, else, end, false, forall, forward, from, function, if, in, include, initialisations, initializations, integer, inter, is binary, is continuous, is free, is partint, is semcont, is semint, is sos1, is sos2, linctr, max, min, mod, model, next, not, of, options, or, parameters, procedure, public, prod, range, real, repeat, set, string, sum, then, to, true, union, until, uses, while. 3.2 model uses model end-model ( ) model.. uses " " ( ). 3.1: mmxprs mmquad mmsystem mmodbc mmive,...,. Excel, SQL.. 22

27 3.3! writeln()!,, (!!) ( ).! (!,.!) write(),, writeln() ( ) write(" "),, writeln(" "). write(), writeln().,,,., writeln(" A = ", A), A = A., LPSimple.mos, A., write("nn"),, writeln. 3.4 (declarations end-declarations) declarations : 1, 2,... : = end-declarations!,. ( ) (real, integer, mpvar ) mosel,. integer real string boolean mpvar linctr 3.2: e e+308, true false 23

28 3.4.2 (=). = ( ). ( ) STR = "My Const String"! MyVal = 5.0! S = f2, 0.1, "a", "e"g! Hanni = 1..4! Hanni =f1, 2, 3, 4g ( ), declarations,, parameters.., STR = "String", STR (set of, range) fa, b, cg., 2..7 f2, 3, 4, 5, 6, 7g., 3.4.1,, f1, 2, 3g, f"1", "2", "3"g.,,, set of range. set of ( ).. ( ) S1: set of integer S2: set of string range ( ).. ( ) R1: range (array of), array. 24

29 array (,,...) of ( ). dynamic array. ( ) A1: array (1..2, 1..5) of integer A2: array (f1.5, 2.3g, 1..3, f" ", " ", " "g) of real A ,, A1(2,3). A ,, A2(1.5, 2, " "). ( 1) 3.4.3, S = f1, 2, 3g, 3.,, T = [1, 2, 3],, T := [1, 2, 3]., declarations T, T: array (1..3) of integer 3, T := [1, 2, 3] ( ). ( 2)., T, T(5) T(" ") 5 " " (+, -, *, / ) Xpress-MP,. 3.3: A, B A + B A B,,, A - B A B,,, A * B A B,, A / B A B, A ^ B A B, A mod B A B, ( ) f1, 2, 3g+f3, 4g = f1, 2, 3, 4g, f1, 2, 3g-f3, 4g = f1, 2g, f1, 2, 3g*f3, 4g = f3g., " "-" "+" " = " ". 25

30 3.5.2 (:= ). := ( ).,. ( ) B := 5! STR := "Hello"! V := [1, 2, 3]! Func := 5*x + 3!, ( 1) Xpress-MP,.,,. Const1 := 5*x + 3 = 0! Const2 := x >= 30! ( 2) delcarations,., B B := 2, B., 3.4.4,. ( 3)., declarations B C, B := 2 C := 2.0,.,., B := C. ( 3) (=),. declarations,, parameters :=.,. 3.4: A += B A -= B A := A + B A := A - B 26

31 3.6 (parameters end-parameters),. parameters = end-parameters ( ).,,. ( ) parameters M = 15! PI = 3.14! FName = "Abc.dat"! end-parameters. IPwithData.mos, > exec IPwithData FName="Abc2.dat",, "Abc2.dat"., ( 3.1, 3.2 ). Xpress-IVE ( 1) declarations,. S = f1, 2, 3g., parameters ( 2) declarations, model, parameters, model, uses., model DEMO uses "mmxprs" writeln(" ")! parameters parameters 1 = end-parameters parameters! paramters 2 2 = end-parameters 27

32 3.1: 3.2: 28

33 3.7 (>=, <>, and, or ) Xpress-MP., true false, boolean. 3.5: A < B A > B A >= B A <= B A = B A <> B 1 and 2 1 or 2 A < B true, false A > B true, false A = B true, false A 5 B true, false A = B true, false A 6= B true, false 1 2 true true, false 1 2 true true, false 3.8 Xpress-MP (if, case ) if ( ) then elif ( ) then else end-if ( ) if then,. if ( ), if ( ) then end-if 29

34 case of : : do end-do : do end-do else end-case ( ) case B of 1 : writeln(" 1")! B : writeln(" 2")! B 2 5 6, 8 : do writeln(" 3") end-do! B 6 8 else writeln(" 4")! end-case (forall, while, repeat ) Xpress-MP,. forall ( in ),,, forall ( in ) do end-do ( ),. forall ( in j ). while ( ),,, whilie ( ) do end-do ( ),.. repeat until ( ) ( ),.. break [n] ( ) [ n ]. 30

35 next [n] ( ) [ n ]. ( ) forall,.,. forall (i in 1..9) do if (i = 3) then i := 7! end-if end-do, i := 1 while (i < 10) do if (i = 3) then i := 7 end-if i += 1 end-do while. 3.9, (is free),.,, x(1) >= -1000, x(1).., is free ( ), 1. ( ) x(1) 1,. x(1) is free 31

36 (is integer, is binary),. is integer ( ). is binary ( ) (initializations from end-initializations),. initializations from " " end-initializations ( ),. ( ) r : 1.5! z : 2! M : [! ] ( ) M. M : [! ] (1 1) 1! (2 3) 1 2! 2 3 1, 2 (3 4) 3 (3 ) M. D : [! (1 1 1) 1 2 3! (1,1,1) (1,1,3). ] 1 1 1! (1,2,1) (1,2,3). (2 1 1) 3 3 1! (2,1,1) (2,1,3) 5 2 7! (2,2,1) (2,2,3) 32

37 3.11 (function, procedure),. Xpress-MP, function procedure. procedure [( :, )] end-procedure ( ). function [( :, )] : returned :=!. end-function ( ).,.,. forward procedure [( :, )] forward function [( :, )] : ( ). 3.12, ( ).., (sum, prod, round, abs ) sum ( in ) ( ). sum ( in j ). prod ( in ) ( ). prod ( in j ). round ( ) ( ). abs ( ) ( ). 33

38 (minimize, maximize) minimize( ),, maximize( ) ( ). getobjval. getsol( ) ( ). ( ) x, getsol(x).. forall (j in J) getsol(x(j)) (random) random ( ) [0, 1). ( ) [1,Num] round(random*num + 0.5) setrandseed ( ) ( ). 34

39 4!? 4.1 (fopen ),, script typescript, Xpress-IVE,,.,,. fopen(" ", F OUTPUT)!. fclose(f OUTPUT)!. ( ) F OUTPUT. ( ) fopen("log.txt", F OUTPUT) writeln(" = ", getobjval) fclose(f OUTPUT) 4.2 (gettime)., gettime. gettime ( ). ( ) uses "mmxprs", "mmsystem", mmsystem. ( ) StartTime := gettime writeln(" = ", gettime - StartTime, " ") 4.3 (getprobstat) Xpress-MP,,,. getprobstat 35

40 getprobstat ( ),. getprobstat. 4.1: getprobstat getprobstat (,, ) setparam,,. setparam(" ", ) ( ).,. ( ) setparam("xprs NODESELECTION", )! : 1 Local first,,. 2 Best first. 3 Local depth first,,. 4 Best first,, Best first, then local first "XPRS BREADTHFIRST", Local first.,, setparam("xprs BREADTHFIRST", 10). 5 Pure depth first. ( ) 36

41 setparam("xprs MAXNODE", 5000)! setparam("xprs MAXTIME", 100)! 100. setparam("xprs MIPABSSTOP", 0.99)! - <= (minimize, maximize) (setcallback) (IP) minimize( ), maxmize( ),,,.,.. setcallback setcallback(, " ") ( ),. ( ) setcallback(xprs CB INTSOL, "MyFunc")! MyFunc. ( ), XPRS CB INTSOL, Xpress-Mosel Language Reference Manual. 4.6 (sethidden),.,,., sethidden. sethidden(, 0)!. sethidden(, 1)!. ( ) /. ( ) Const := 3*a + b <= 3 forall (itr in 1..2) do minimize(objfunc)! 1 Const, 2 sethiden(const, 0) end-do 4.7 (create),.., create create( ) ( ). 37

42 ,,,,., Dash Xpress-MP. [1] Dash Optimization Corp. URL: 38

(B2) 序章 FICO Xpressの基礎

(B2) 序章 FICO Xpressの基礎 Xpress の 基 礎 Xpress-Mosel Mosel Mosel Xpress-IVE Mosel http://www.msi-jp.com/xpress/learning/square/ Mosel 1. 2 3 2 4 40 160 1kg 3kg 200kg 20 5 chess.mos Mosel mos model Chess uses "mmxprs"! We shall use

More information

第 5 章 Xpress の基礎 本書の全ての問題は Xpress-Mosel( 短縮して Mosel) 言語で記述されています 問題を解く場合 ユーザは Mosel コマンド文か Xpress-IVE を選択できます 本書の最適化問題を解く場合 線形問題や混合整数計画問題を Mosel 言語で記述

第 5 章 Xpress の基礎 本書の全ての問題は Xpress-Mosel( 短縮して Mosel) 言語で記述されています 問題を解く場合 ユーザは Mosel コマンド文か Xpress-IVE を選択できます 本書の最適化問題を解く場合 線形問題や混合整数計画問題を Mosel 言語で記述 FICO Xpress の基礎 Application of optimization with Xpress 第 5 章の抜粋 ( 日本語訳 ) MSI 株式会社 Xpress 事業部 第 5 章 Xpress の基礎 本書の全ての問題は Xpress-Mosel( 短縮して Mosel) 言語で記述されています 問題を解く場合 ユーザは Mosel コマンド文か Xpress-IVE を選択できます

More information

Pascal Pascal Free Pascal CPad for Pascal Microsoft Windows OS Pascal

Pascal Pascal Free Pascal CPad for Pascal Microsoft Windows OS Pascal Pascal Pascal Pascal Free Pascal CPad for Pascal Microsoft Windows OS 2010 10 1 Pascal 2 1.1.......................... 2 1.2.................. 2 1.3........................ 3 2 4 2.1................................

More information

1. A0 A B A0 A : A1,...,A5 B : B1,...,B

1. A0 A B A0 A : A1,...,A5 B : B1,...,B 1. A0 A B A0 A : A1,...,A5 B : B1,...,B12 2. 3. 4. 5. A0 A B f : A B 4 (i) f (ii) f (iii) C 2 g, h: C A f g = f h g = h (iv) C 2 g, h: B C g f = h f g = h 4 (1) (i) (iii) (2) (iii) (i) (3) (ii) (iv) (4)

More information

f(x) x S (optimal solution) f(x ) (optimal value) f(x) (1) 3 GLPK glpsol -m -d -m glpsol -h -m -d -o -y --simplex ( ) --interior --min --max --check -

f(x) x S (optimal solution) f(x ) (optimal value) f(x) (1) 3 GLPK glpsol -m -d -m glpsol -h -m -d -o -y --simplex ( ) --interior --min --max --check - GLPK by GLPK http://mukun mmg.at.infoseek.co.jp/mmg/glpk/ 17 7 5 : update 1 GLPK GNU Linear Programming Kit GNU LP/MIP ILOG AMPL(A Mathematical Programming Language) 1. 2. 3. 2 (optimization problem) X

More information

1. A0 A B A0 A : A1,...,A5 B : B1,...,B12 2. 5 3. 4. 5. A0 (1) A, B A B f K K A ϕ 1, ϕ 2 f ϕ 1 = f ϕ 2 ϕ 1 = ϕ 2 (2) N A 1, A 2, A 3,... N A n X N n X N, A n N n=1 1 A1 d (d 2) A (, k A k = O), A O. f

More information

Mosel

Mosel 1 1 1.1................................................ 1 1.2 Mosel............................................. 2 1.3........................................... 2 1.4...........................................

More information

xl 1 program Othello6; 2 {$APPTYPE CONSOLE} 3 uses SysUtils; 4 5 type 6 TMasuNo = 0..99; // 7 TYouso = (Soto,Kara,Kuro,Siro); // 8 TBan = array [TMasu

xl 1 program Othello6; 2 {$APPTYPE CONSOLE} 3 uses SysUtils; 4 5 type 6 TMasuNo = 0..99; // 7 TYouso = (Soto,Kara,Kuro,Siro); // 8 TBan = array [TMasu xl 1 program Othello6; 2 {$APPTYPE CONSOLE 3 uses SysUtils; 4 5 type 6 TMasuNo = 0..99; // 7 TYouso = (Soto,Kara,Kuro,Siro); // 8 TBan = array [TMasuNo] of TYouso; // 10 10 9 TPlayer = Kuro..Siro; // 10

More information

橡ソート手順比較

橡ソート手順比較 PAGE:1 [Page] 20 1 20 20 QuickSort 21 QuickSort 21 21 22 QuickSort 22 QuickSort 22 23 0 23 QuickSort 23 QuickSort 24 Order 25 25 26 26 7 26 QuickSort 27 PAGE:2 PAGE:3 program sort; { { type item = record

More information

1. A0 A B A0 A : A1,...,A5 B : B1,...,B

1. A0 A B A0 A : A1,...,A5 B : B1,...,B 1. A0 A B A0 A : A1,...,A5 B : B1,...,B12 2. 3. 4. 5. A0 A, B Z Z m, n Z m n m, n A m, n B m=n (1) A, B (2) A B = A B = Z/ π : Z Z/ (3) A B Z/ (4) Z/ A, B (5) f : Z Z f(n) = n f = g π g : Z/ Z A, B (6)

More information

Excel ではじめる数値解析 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 初版 1 刷発行時のものです.

Excel ではじめる数値解析 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます.   このサンプルページの内容は, 初版 1 刷発行時のものです. Excel ではじめる数値解析 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. http://www.morikita.co.jp/books/mid/009631 このサンプルページの内容は, 初版 1 刷発行時のものです. Excel URL http://www.morikita.co.jp/books/mid/009631 i Microsoft Windows

More information

橡挿入法の実践

橡挿入法の実践 PAGE:1 7JFC1121 PAGE:2 7JFC1121 PAGE:3 7JFC1121 Kadai_1.pas program input_file;{7jfc1121 19 20 { type item = record id : integer; math : integer; english : integer; var wfile data flag id_no filename :

More information

コンピュータ概論

コンピュータ概論 4.1 For Check Point 1. For 2. 4.1.1 For (For) For = To Step (Next) 4.1.1 Next 4.1.1 4.1.2 1 i 10 For Next Cells(i,1) Cells(1, 1) Cells(2, 1) Cells(10, 1) 4.1.2 50 1. 2 1 10 3. 0 360 10 sin() 4.1.2 For

More information

...v..&.{..&....

...v..&.{..&.... 8 pp.- 2006 * h ** *** An empirical analysis on the efficiency of the M&A among the non-financial companies based on DEA Hidetoshi KOKUBO*, Koichi MIYAZAKI**, Tomohiko TAKAHASHI*** Abstract Using DEA (Data

More information

L N P Y F C T V W Z I X Pentomino Form Name Caption Position FormMain podesktopcenter

L N P Y F C T V W Z I X Pentomino Form Name Caption Position FormMain podesktopcenter 1. 1 1 1.1 5 12 60 3 20 4 15 5 12 6 10 12 L N P Y F C T V W Z I X 1.1.1 1.2 Pentomino 1.2.1 Form Name Caption Position FormMain podesktopcenter 1.2.2 unit PentominoU; interface uses Windows, Messages,

More information

D0050.PDF

D0050.PDF Excel VBA 6 3 3 1 Excel BLOCKGAME.xls Excel 1 OK 2 StepA D B1 B4 C1 C2 StepA StepA Excel Workbook Open StepD BLOCKGAME.xls VBEditor ThisWorkbook 3 1 1 2 2 3 5 UserForm1 4 6 UsorForm2 StepB 3 StepC StepD

More information

My関数の作成演習問題集

My関数の作成演習問題集 Excel Sum,Average,Max 330 BMI Excel My Excel VBA Visual BASIC Editor AltF11 Visual BASIC Editor My Function Function -1- Function ( As Single, As Single) As Double Function Funciton Funciton As Single

More information

応用数学特論.dvi

応用数学特論.dvi 1 1 1.1.1 ( ). P,Q,R,.... 2+3=5 2 1.1.2 ( ). P T (true) F (false) T F P P T P. T 2 F 1.1.3 ( ). 2 P Q P Q P Q P Q P or Q P Q P Q P Q T T T T F T F T T F F F. P = 5 4 Q = 3 2 P Q = 5 4 3 2 P F Q T P Q T

More information

2004.11.29 4 Communication1 program communication1(input, output); procedure double; r1, r2: real; r2 := 2 * r1; double; end. Communication1 program communication1(input, output); procedure double; r1,

More information

untitled

untitled 1 (1) (2) (3) (4) (1) (2) (3) (1) (2) (3) (1) (2) (3) (4) (5) (1) (2) (3) (1) (2) 10 11 12 2 2520159 3 (1) (2) (3) (4) (5) (6) 103 59529 600 12 42 4 42 68 53 53 C 30 30 5 56 6 (3) (1) 7 () () (()) () ()

More information

K227 Java 2

K227 Java 2 1 K227 Java 2 3 4 5 6 Java 7 class Sample1 { public static void main (String args[]) { System.out.println( Java! ); } } 8 > javac Sample1.java 9 10 > java Sample1 Java 11 12 13 http://java.sun.com/j2se/1.5.0/ja/download.html

More information

1. 入力画面

1. 入力画面 指定した時刻に指定したマクロ (VBA) を実行するプログラム (VBA) 益永八尋 様々な業務を行っている場合には 指定した時刻に指定したマクロ (Macro VBA) を実行したくなる場合がある たとえば 9:00 17: 00 や 1 時間 6 時間間隔に指定したマクロ (Macro VBA) を実行する この様な場合に対応できるように汎用性の高いプログラムを作成した この場合に注意する必要があるのは

More information

2005 D Pascal CASL ( ) Pascal C 3. A A Pascal TA TA TA

2005 D Pascal CASL ( ) Pascal C 3. A A Pascal TA TA TA 2005 D 1 1.1 1.2 Pascal CASL ( ) Pascal 1. 2005 10 13 2006 1 19 12 2. C 3. A A 2 1 2 Pascal 1.3 1. 2. TA TA TA sdate@ist.osaka-u.ac.jp nakamoto@image.med.osaka-u.ac.jp h-kido@ist.osaka-u.ac.jp m-nakata@ist.osaka-u.ac.jp

More information

double float

double float 2015 3 13 1 2 2 3 2.1.......................... 3 2.2............................. 3 3 4 3.1............................... 4 3.2 double float......................... 5 3.3 main.......................

More information

第10回 コーディングと統合(WWW用).PDF

第10回 コーディングと統合(WWW用).PDF 10 January 8, 2004 algorithm algorithm algorithm (unit testing) (integrated testing) (acceptance testing) Big-Bang (incremental development) (goto goto DO 50 I=1,COUNT IF (ERROR1) GO TO 60 IF (ERROR2)

More information

106 4 4.1 1 25.1 25.4 20.4 17.9 21.2 23.1 26.2 1 24 12 14 18 36 42 24 10 5 15 120 30 15 20 10 25 35 20 18 30 12 4.1 7 min. z = 602.5x 1 + 305.0x 2 + 2

106 4 4.1 1 25.1 25.4 20.4 17.9 21.2 23.1 26.2 1 24 12 14 18 36 42 24 10 5 15 120 30 15 20 10 25 35 20 18 30 12 4.1 7 min. z = 602.5x 1 + 305.0x 2 + 2 105 4 0 1? 1 LP 0 1 4.1 4.1.1 (intger programming problem) 1 0.5 x 1 = 447.7 448 / / 2 1.1.2 1. 2. 1000 3. 40 4. 20 106 4 4.1 1 25.1 25.4 20.4 17.9 21.2 23.1 26.2 1 24 12 14 18 36 42 24 10 5 15 120 30

More information

2009 D Pascal CASL II ( ) Pascal C 3. A A Pascal TA TA

2009 D Pascal CASL II ( ) Pascal C 3. A A Pascal TA TA 2009 D 1 1.1 1.2 Pascal CASL II ( ) Pascal 1. 2009 10 15 2010 1 29 16 2. C 3. A A 2 1 2 Pascal 1.3 1. 2. TA enshud@image.med.osaka-u.ac.jp TA enshu-d@image.med.osaka-u.ac.jp nakamoto@image.med.osaka-u.ac.jp

More information

2011 D Pascal CASL II ( ) Pascal C 3. A A Pascal TA TA enshu-

2011 D Pascal CASL II ( ) Pascal C 3. A A Pascal TA TA enshu- 2011 D 1 1.1 1.2 Pascal CASL II ( ) Pascal 1. 2011 10 6 2011 2 9 15 2. C 3. A A 2 1 2 Pascal 1.3 1. 2. TA enshud@fenrir.ics.es.osaka-u.ac.jp TA enshu-d@fenrir.ics.es.osaka-u.ac.jp higo@ist.osaka-u.ac.jp

More information

数理計画法入門 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 初版 1 刷発行時のものです.

数理計画法入門 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます.   このサンプルページの内容は, 初版 1 刷発行時のものです. 数理計画法入門 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. http://www.morikita.co.jp/books/mid/092181 このサンプルページの内容は, 初版 1 刷発行時のものです. i 1947 G.B. Dantzig 3 (1) (2) (3) (4) Microsoft Excel Web 4 1 2 2 2 2 3 ii 4

More information

B Simon (Trump ) SimonU.pas SimonP.dpr Name FormSimon Caption Position podesktopcenter uses Windows, Messages, SysUtils,

B Simon (Trump ) SimonU.pas SimonP.dpr Name FormSimon Caption Position podesktopcenter uses Windows, Messages, SysUtils, B 132 20 1 1 20.1 20.1.1 1 52 10 1 2 3... 7 8 8 8 20.1.2 1 5 6 7 3 20.1.3 1 3 8 20.1.4 13 20.1.5 4 1 (solitaire) B 133 20.2 20.2.1 Simon (Trump ) SimonU.pas SimonP.dpr 20.2.2 Name FormSimon Caption Position

More information

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション ループ ループとは? ある条件を満たすまで 指定の命令を繰り返す Do... Loop For Next For Each Next While WEnd ループの種類 Do Loop Do While 条件 ステートメント Loop Do ステートメント Loop While 条件 Do Until 条件 ステートメント Loop Do ステートメント Until Loop 条件 Do Loop

More information

94 expression True False expression FalseMSDN IsNumber WorksheetFunctionIsNumberexpression expression True Office support.office.com/ja-jp/ S

94 expression True False expression FalseMSDN IsNumber WorksheetFunctionIsNumberexpression expression True Office   support.office.com/ja-jp/ S Excel VBA a Excel VBA VBA IsNumeric IsNumber SpecialCells SpecialCells MSDNMicrosoft Developer NetworkIsNumeric IsNumber SpecialCells IsNumeric VBA IsNumericexpression SpecialCells 94 expression True False

More information

Copyright c 2008 Zhenjiang Hu, All Right Reserved.

Copyright c 2008 Zhenjiang Hu, All Right Reserved. 2008 10 27 Copyright c 2008 Zhenjiang Hu, All Right Reserved. (Bool) True False data Bool = False True Remark: not :: Bool Bool not False = True not True = False (Pattern matching) (Rewriting rules) not

More information

2 X Y Y X θ 1,θ 2,... Y = f (X,θ 1,θ 2,...) θ k III 8 ( ) 1 / 39

2 X Y Y X θ 1,θ 2,... Y = f (X,θ 1,θ 2,...) θ k III 8 ( ) 1 / 39 III 8 (3) VBA, R / III 8 (2013 11 26 ) / 39 2 X Y Y X θ 1,θ 2,... Y = f (X,θ 1,θ 2,...) θ k III 8 (2013 11 26 ) 1 / 39 Y X 1, X 2,..., X n Y = f (X 1, X 2,..., X n,θ 1,θ 2,...) (y k, x k,1, x k,2,...)

More information

(Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1

(Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1 (Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1 17 Fortran Formular Tranlator Lapack Fortran FORTRAN, FORTRAN66, FORTRAN77, FORTRAN90, FORTRAN95 17.1 A Z ( ) 0 9, _, =, +, -, *,

More information

all.dvi

all.dvi fortran 1996 4 18 2007 6 11 2012 11 12 1 3 1.1..................................... 3 1.2.............................. 3 2 fortran I 5 2.1 write................................ 5 2.2.................................

More information

Excel Excel Excel = Excel ( ) 1

Excel Excel Excel = Excel ( ) 1 10 VBA / 10 (2016 06 21 ) Excel Excel Excel 20132 20 = 1048576 Excel 201316 100 10 (2016 06 21 ) 1 Excel VBA Excel Excel 2 20 Excel QR Excel R QR QR BLASLAPACK 10 (2016 06 21 ) 2 VBA VBA (Visual Basic

More information

VDM-SL VDM VDM-SL Toolbox VDM++ Toolbox 1 VDM-SL VDM++ Web bool

VDM-SL VDM VDM-SL Toolbox VDM++ Toolbox 1 VDM-SL VDM++ Web bool VDM-SL VDM++ 23 6 28 VDM-SL Toolbox VDM++ Toolbox 1 VDM-SL VDM++ Web 2 1 3 1.1............................................... 3 1.1.1 bool......................................... 3 1.1.2 real rat int

More information

scicos.dvi

scicos.dvi SCICOS - Λ R. Nikoukhah S. Steer demo22 noise random generator sinusoid generator reference trajectory Num(s) ----- Den(s) Plant Mux Num(z) ----- Den(z) S/H Controller 1: Scicos 1 Introduction Scicos (Scilab

More information

AtCoder Regular Contest 073 Editorial Kohei Morita(yosupo) A: Shiritori if python3 a, b, c = input().split() if a[len(a)-1] == b[0] and b[len(

AtCoder Regular Contest 073 Editorial Kohei Morita(yosupo) A: Shiritori if python3 a, b, c = input().split() if a[len(a)-1] == b[0] and b[len( AtCoder Regular Contest 073 Editorial Kohei Morita(yosupo) 29 4 29 A: Shiritori if python3 a, b, c = input().split() if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]: print( YES ) else: print( NO ) 1 B:

More information

y = x 4 y = x 8 3 y = x 4 y = x 3. 4 f(x) = x y = f(x) 4 x =,, 3, 4, 5 5 f(x) f() = f() = 3 f(3) = 3 4 f(4) = 4 *3 S S = f() + f() + f(3) + f(4) () *4

y = x 4 y = x 8 3 y = x 4 y = x 3. 4 f(x) = x y = f(x) 4 x =,, 3, 4, 5 5 f(x) f() = f() = 3 f(3) = 3 4 f(4) = 4 *3 S S = f() + f() + f(3) + f(4) () *4 Simpson H4 BioS. Simpson 3 3 0 x. β α (β α)3 (x α)(x β)dx = () * * x * * ɛ δ y = x 4 y = x 8 3 y = x 4 y = x 3. 4 f(x) = x y = f(x) 4 x =,, 3, 4, 5 5 f(x) f() = f() = 3 f(3) = 3 4 f(4) = 4 *3 S S = f()

More information

新版明解C言語 実践編

新版明解C言語 実践編 2 List - "max.h" a, b max List - max "max.h" #define max(a, b) ((a) > (b)? (a) : (b)) max List -2 List -2 max #include "max.h" int x, y; printf("x"); printf("y"); scanf("%d", &x); scanf("%d", &y); printf("max(x,

More information

Excel Excel Excel 20132 20 = 1048576 Excel 201316 100 III 7 (2014 11 18 ) 1

Excel Excel Excel 20132 20 = 1048576 Excel 201316 100 III 7 (2014 11 18 ) 1 III 7 VBA / III 7 (2014 11 18 ) Excel Excel Excel 20132 20 = 1048576 Excel 201316 100 III 7 (2014 11 18 ) 1 Excel VBA Excel Excel 2 20 Excel QR Excel R QR QR BLASLAPACK III 7 (2014 11 18 ) 2 VBA VBA (Visual

More information

syspro-0405.ppt

syspro-0405.ppt 3 4, 5 1 UNIX csh 2.1 bash X Window 2 grep l POSIX * more POSIX 3 UNIX. 4 first.sh #!bin/sh #first.sh #This file looks through all the files in the current #directory for the string yamada, and then prints

More information

R による統計解析入門

R による統計解析入門 R May 31, 2016 R R R R Studio GUI R Console R Studio PDF URL http://ruby.kyoto-wu.ac.jp/konami/text/r R R Console Windows, Mac GUI Unix R Studio GUI R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"

More information

記号と準備

記号と準備 tbasic.org * 1 [2017 6 ] 1 2 1.1................................................ 2 1.2................................................ 2 1.3.............................................. 3 2 5 2.1............................................

More information

2X Y Y X θ 1, θ 2,... Y = f(x, θ 1, θ 2,...) θ k III 8 (2013 05 28 ) 1 / 39

2X Y Y X θ 1, θ 2,... Y = f(x, θ 1, θ 2,...) θ k III 8 (2013 05 28 ) 1 / 39 III 8 (3) VBA, R / III 8 (2013 05 28 ) / 39 2X Y Y X θ 1, θ 2,... Y = f(x, θ 1, θ 2,...) θ k III 8 (2013 05 28 ) 1 / 39 Y X 1, X 2,..., X n Y = f(x 1, X 2,..., X n, θ 1, θ 2,...) (y k, x 1,k, x 2,k,...)

More information

OpenMP¤òÍѤ¤¤¿ÊÂÎó·×»»¡Ê£±¡Ë

OpenMP¤òÍѤ¤¤¿ÊÂÎó·×»»¡Ê£±¡Ë 2012 5 24 scalar Open MP Hello World Do (omp do) (omp workshare) (shared, private) π (reduction) PU PU PU 2 16 OpenMP FORTRAN/C/C++ MPI OpenMP 1997 FORTRAN Ver. 1.0 API 1998 C/C++ Ver. 1.0 API 2000 FORTRAN

More information

z-tree 2005 4 1 1 4 1.1............................ 4 1.2.............................. 5 1.3......................................... 5 1.4............................................. 5 1.5................................

More information

OpenMP¤òÍѤ¤¤¿ÊÂÎó·×»»¡Ê£±¡Ë

OpenMP¤òÍѤ¤¤¿ÊÂÎó·×»»¡Ê£±¡Ë 2011 5 26 scalar Open MP Hello World Do (omp do) (omp workshare) (shared, private) π (reduction) scalar magny-cours, 48 scalar scalar 1 % scp. ssh / authorized keys 133. 30. 112. 246 2 48 % ssh 133.30.112.246

More information

listings-ext

listings-ext (6) Python (2) ( ) ohsaki@kwansei.ac.jp 5 Python (2) 1 5.1 (statement)........................... 1 5.2 (scope)......................... 11 5.3 (subroutine).................... 14 5 Python (2) Python 5.1

More information

untitled

untitled II 4 Yacc Lex 2005 : 0 1 Yacc 20 Lex 1 20 traverse 1 %% 2 [0-9]+ { yylval.val = atoi((char*)yytext); return NUM; 3 "+" { return + ; 4 "*" { return * ; 5 "-" { return - ; 6 "/" { return / ; 7 [ \t] { /*

More information

joho09.ppt

joho09.ppt s M B e E s: (+ or -) M: B: (=2) e: E: ax 2 + bx + c = 0 y = ax 2 + bx + c x a, b y +/- [a, b] a, b y (a+b) / 2 1-2 1-3 x 1 A a, b y 1. 2. a, b 3. for Loop (b-a)/ 4. y=a*x*x + b*x + c 5. y==0.0 y (y2)

More information

8 if switch for while do while 2

8 if switch for while do while 2 (Basic Theory of Information Processing) ( ) if for while break continue 1 8 if switch for while do while 2 8.1 if (p.52) 8.1.1 if 1 if ( ) 2; 3 1 true 2 3 false 2 3 3 8.1.2 if-else (p.54) if ( ) 1; else

More information

Excel97関数編

Excel97関数編 Excel97 SUM Microsoft Excel 97... 1... 1... 1... 2... 3... 3... 4... 5... 6... 6... 7 SUM... 8... 11 Microsoft Excel 97 AVERAGE MIN MAX SUM IF 2 RANK TODAY ROUND COUNT INT VLOOKUP 1/15 Excel A B C A B

More information

Windows Cygwin Mac *1 Emacs Ruby ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2

Windows Cygwin Mac *1 Emacs Ruby ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2 September 2016 1 Windows Cygwin Mac *1 Emacs Ruby 1 1.1 ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2 ~/16:00:20> ls 2 2 ls ls -a ~/16:00:20> ls -a

More information

D0120.PDF

D0120.PDF 12? 1940 Stanislaw Ulam John von Neumann Cellular Automaton 2 Cellular Automata 1 0 1 2 0 1 A 3 B 1 2 3 C 10 A B C 1 ExcelVBA 1 1 1 1 0 1 1 B7 BD7 road1 B8 BD31 board 0 Road1 50 board 0 1 0 1 Excel 2 2

More information

JavaScript 1.! DOM Ajax Shelley Powers,, JavaScript David Flanagan, JavaScript 2

JavaScript 1.! DOM Ajax Shelley Powers,, JavaScript David Flanagan, JavaScript 2 JavaScript (2) 1 JavaScript 1.! 1. 2. 3. DOM 4. 2. 3. Ajax Shelley Powers,, JavaScript David Flanagan, JavaScript 2 (1) var a; a = 8; a = 3 + 4; a = 8 3; a = 8 * 2; a = 8 / 2; a = 8 % 3; 1 a++; ++a; (++

More information

Mosel: An Overview Y. Colombani and S. Heipcke Xpress Team, FICO, Leam House, Leamington Spa CV32 5YN, UK May 2002, last re

Mosel: An Overview Y. Colombani and S. Heipcke Xpress Team, FICO, Leam House, Leamington Spa CV32 5YN, UK   May 2002, last re 日本語訳 版 Mosel: An Overview Y. Colombani and S. Heipcke Xpress Team, FICO, Leam House, Leamington Spa CV32 5YN, UK http://www.fico.com/xpress May 2002, last rev. June 2008 概要 Msel An Overview では 基本的な Mosel

More information

untitled

untitled Fortran90 ( ) 17 12 29 1 Fortran90 Fortran90 FORTRAN77 Fortran90 1 Fortran90 module 1.1 Windows Windows UNIX Cygwin (http://www.cygwin.com) C\: Install Cygwin f77 emacs latex ps2eps dvips Fortran90 Intel

More information

# let rec sigma (f, n) = # if n = 0 then 0 else f n + sigma (f, n-1);; val sigma : (int -> int) * int -> int = <fun> sigma f n ( : * -> * ) sqsum cbsu

# let rec sigma (f, n) = # if n = 0 then 0 else f n + sigma (f, n-1);; val sigma : (int -> int) * int -> int = <fun> sigma f n ( : * -> * ) sqsum cbsu II 4 : 2001 11 7 keywords: 1 OCaml OCaml (first-class value) (higher-order function) 1.1 1 2 + 2 2 + + n 2 sqsum 1 3 + 2 3 + + n 3 cbsum # let rec sqsum n = # if n = 0 then 0 else n * n + sqsum (n - 1)

More information

untitled

untitled StiLL StiLL Excel VBA IT Excel2000 2003 StiLL StiLL! Excel2007 StiLL -- -- Excel!!!! DB CSV VBA VBA ' VBA Public Sub SampleProgramDAO1() Dim SheetName As String Dim strname As String SheetName = "Sheet2"

More information

Copyright c 2006 Zhenjiang Hu, All Right Reserved.

Copyright c 2006 Zhenjiang Hu, All Right Reserved. 1 2006 Copyright c 2006 Zhenjiang Hu, All Right Reserved. 2 ( ) 3 (T 1, T 2 ) T 1 T 2 (17.3, 3) :: (Float, Int) (3, 6) :: (Int, Int) (True, (+)) :: (Bool, Int Int Int) 4 (, ) (, ) :: a b (a, b) (,) x y

More information

Autumn 2005 1 9 13 14 16 16 DATA _null_; SET sashelp.class END=eof; FILE 'C: MyFiles class.txt'; /* */ PUT name sex age; IF eof THEN DO; FILE LOG; /* */ PUT '*** ' _n_ ' ***'; END; DATA _null_;

More information

‚æ4›ñ

‚æ4›ñ ( ) ( ) ( ) A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 (OUS) 9 26 1 / 28 ( ) ( ) ( ) A B C D Z a b c d z 0 1 2 9 (OUS) 9

More information

Ver.1 1/17/2003 2

Ver.1 1/17/2003 2 Ver.1 1/17/2003 1 Ver.1 1/17/2003 2 Ver.1 1/17/2003 3 Ver.1 1/17/2003 4 Ver.1 1/17/2003 5 Ver.1 1/17/2003 6 Ver.1 1/17/2003 MALTAB M GUI figure >> guide GUI GUI OK 7 Ver.1 1/17/2003 8 Ver.1 1/17/2003 Callback

More information

0 第 4 書データベース操作 i 4.1 データベースへの接続 (1) データベースチェックポイントの追加 データベースチェックポイントを追加します (2)ODBC による接続 ODBC を使用してデータベースへ接続します SQL 文を手作業で指定する場合 最大フェッチ行数を指定する場合はここで最大行数を指定します ii 接続文字列を作成します 作成ボタンクリック > データソース選択 > データベース接続

More information

¥×¥í¥°¥é¥ß¥ó¥°±é½¬I Exercise on Programming I [1zh] ` `%%%`#`&12_`__~~~ alse

¥×¥í¥°¥é¥ß¥ó¥°±é½¬I  Exercise on Programming I [1zh] ` `%%%`#`&12_`__~~~alse I Exercise on Programming I http://bit.ly/oitprog1 1, 2 of 14 ( RD S ) I 1, 2 of 14 1 / 44 Ruby Ruby ( RD S ) I 1, 2 of 14 2 / 44 7 5 9 2 9 3 3 2 6 5 1 3 2 5 6 4 7 8 4 5 2 7 9 6 4 7 1 3 ( RD S ) I 1, 2

More information

<303288C991BD946797C797592E696E6464>

<303288C991BD946797C797592E696E6464> 175 71 5 19 / 100 20 20 309 133 72 176 62 3 8 2009 2002 1 2 3 1 8 1 20 1 2 + 0.4952 1 2 http://www.mtwa.or.jp/ h19mokuji.html 20 100 146 0 6,365 359 111 0 38,997 11,689 133,960 36,830 76,177 155,684 18,068

More information

80 X 1, X 2,, X n ( λ ) λ P(X = x) = f (x; λ) = λx e λ, x = 0, 1, 2, x! l(λ) = n f (x i ; λ) = i=1 i=1 n λ x i e λ i=1 x i! = λ n i=1 x i e nλ n i=1 x

80 X 1, X 2,, X n ( λ ) λ P(X = x) = f (x; λ) = λx e λ, x = 0, 1, 2, x! l(λ) = n f (x i ; λ) = i=1 i=1 n λ x i e λ i=1 x i! = λ n i=1 x i e nλ n i=1 x 80 X 1, X 2,, X n ( λ ) λ P(X = x) = f (x; λ) = λx e λ, x = 0, 1, 2, x! l(λ) = n f (x i ; λ) = n λ x i e λ x i! = λ n x i e nλ n x i! n n log l(λ) = log(λ) x i nλ log( x i!) log l(λ) λ = 1 λ n x i n =

More information

25 II :30 16:00 (1),. Do not open this problem booklet until the start of the examination is announced. (2) 3.. Answer the following 3 proble

25 II :30 16:00 (1),. Do not open this problem booklet until the start of the examination is announced. (2) 3.. Answer the following 3 proble 25 II 25 2 6 13:30 16:00 (1),. Do not open this problem boolet until the start of the examination is announced. (2) 3.. Answer the following 3 problems. Use the designated answer sheet for each problem.

More information

MQTT V3.1 プロトコル仕様

MQTT V3.1 プロトコル仕様 1999 d digit = X MOD 128 X = X DIV 128 // if there are mre digits t encde, set the tp bit f this digit if ( X > 0 ) digit = digit OR 0x80 endif 'utput' digit while ( X> 0 ) multiplier = 1 value = 0

More information

2 1/2 1/4 x 1 x 2 x 1, x 2 9 3x 1 + 2x 2 9 (1.1) 1/3 RDA 1 15 x /4 RDA 1 6 x /6 1 x 1 3 x 2 15 x (1.2) (1.3) (1.4) 1 2 (1.5) x 1

2 1/2 1/4 x 1 x 2 x 1, x 2 9 3x 1 + 2x 2 9 (1.1) 1/3 RDA 1 15 x /4 RDA 1 6 x /6 1 x 1 3 x 2 15 x (1.2) (1.3) (1.4) 1 2 (1.5) x 1 1 1 [1] 1.1 1.1. TS 9 1/3 RDA 1/4 RDA 1 1/2 1/4 50 65 3 2 1/15 RDA 2/15 RDA 1/6 RDA 1 1/6 1 1960 2 1/2 1/4 x 1 x 2 x 1, x 2 9 3x 1 + 2x 2 9 (1.1) 1/3 RDA 1 15 x 1 + 2 1/4 RDA 1 6 x 1 1 4 1 1/6 1 x 1 3

More information

Q&A集

Q&A集 MapViewer & ver.2 EWEB-3C-N055 PreSerV for Web MapViewer & i 1... 1 1.1... 1 1.2... 2 1.3... 3 1.4... 4 1.5... 5 1.6... 6 1.7... 7 1.8... 8 1.9... 9 1.10...11 1.11...12 1.12...13 1.13...14 1.14...15 1.15...16

More information

10-C.._241_266_.Z

10-C.._241_266_.Z Windows 10 1 2 3 4 5 Visual Studio 2008LINQ MySchedule 242 Microsoft Visual C# 2008 10 Windows 243 1 LINQIEnumerableXML LINQ to Object q Form1.cs w RefreshListBox private void RefreshListBox() schedulelistbox.items.clear();

More information

プラズマ核融合学会誌5月号【81-5】/内外情報_ソフト【注:欧フォント特殊!】

プラズマ核融合学会誌5月号【81-5】/内外情報_ソフト【注:欧フォント特殊!】 PROGRAM PLOTDATA USE NUM_KINDS, ONLY : wp=>dp, i4b USE MYLIB, ONLY : GET_SIZE, GET_DATA INTEGER(i4b) :: ntime, nx REAL(wp), ALLOCATABLE :: time(:), x(:), Temp(:,:) Fortran Temp, temp, TEMP temporal REAL(wp)

More information

<リスト1> AD コンバータへのデータの出力例 NEC PC98 用 mov al,22h // CLK -> 1, CS -> 0, DI -> 0 out 32h,al // シリアル ポートにデータ出力 PC/AT 互換機用 mov al,00h // CLK -> 1 mov dx,3fb

<リスト1> AD コンバータへのデータの出力例 NEC PC98 用 mov al,22h // CLK -> 1, CS -> 0, DI -> 0 out 32h,al // シリアル ポートにデータ出力 PC/AT 互換機用 mov al,00h // CLK -> 1 mov dx,3fb AD コンバータへのデータの出力例 NEC PC98 用 mov al,22h // CLK -> 1, CS -> 0, DI -> 0 out 32h,al // シリアル ポートにデータ出力 PC/AT 互換機用 mov al,00h // CLK -> 1 mov dx,3fbh out dx al // シリアル ポートにデータ出力 mov al,03h // CS -> 0,

More information

r08.dvi

r08.dvi 19 8 ( ) 019.4.0 1 1.1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( ) 1 next 1 prev 1 head cur tail head cur prev

More information

1 1 2 2 2-1 2 2-2 4 2-3 11 2-4 12 2-5 14 3 16 3-1 16 3-2 18 3-3 22 4 35 4-1 VHDL 35 4-2 VHDL 37 4-3 VHDL 37 4-3-1 37 4-3-2 42 i

1 1 2 2 2-1 2 2-2 4 2-3 11 2-4 12 2-5 14 3 16 3-1 16 3-2 18 3-3 22 4 35 4-1 VHDL 35 4-2 VHDL 37 4-3 VHDL 37 4-3-1 37 4-3-2 42 i 1030195 15 2 10 1 1 2 2 2-1 2 2-2 4 2-3 11 2-4 12 2-5 14 3 16 3-1 16 3-2 18 3-3 22 4 35 4-1 VHDL 35 4-2 VHDL 37 4-3 VHDL 37 4-3-1 37 4-3-2 42 i 4-3-3 47 5 52 53 54 55 ii 1 VHDL IC VHDL 5 2 3 IC 4 5 1 2

More information

WordPress Web

WordPress Web 0948011 1 1 1.............................. 1 2 WordPress....................... 2 3........................ 3 4........................ 4 2 4 1 Web......... 4 3 5 1 WordPress...................... 5 2..........................

More information

Fortran90/95 2. (p 74) f g h x y z f x h x = f x + g x h y = f y + g y h z = f z + g z f x f y f y f h = f + g Fortran 1 3 a b c c(1) = a(1) + b(1) c(

Fortran90/95 2. (p 74) f g h x y z f x h x = f x + g x h y = f y + g y h z = f z + g z f x f y f y f h = f + g Fortran 1 3 a b c c(1) = a(1) + b(1) c( Fortran90/95 4.1 1. n n = 5 x1,x2,x3,,x4,x5 5 average = ( x1 + x2 + x3 + x4 + x5 )/5.0 n n x (subscript) x 1 x 2 average = 1 n n x i i=1 Fortran ( ) x(1) x(2) x(n) Fortran ( ) average = sum(x(1:n))/real(n)

More information

unix15-script2_09.key

unix15-script2_09.key UNIX講習会 シェルスクリプト2 31/July/2015 情報管理解析室 西出 浩世 SGE ~/unix15/sge $ cd ~/unix15/sge $ ls script* script2.sh script3.sh script4.sh ~/unix15/sge/results sam 12 $ ls results/*.sam $ rm -r results $ cp -r /usr/local/data/unix15/sge/results.

More information

B 5 (2) VBA R / B 5 ( ) / 34

B 5 (2) VBA R / B 5 ( ) / 34 B 5 (2) VBAR / B 5 (2014 11 17 ) / 34 VBA VBA (Visual Basic for Applications) Visual Basic VBAVisual Basic Visual BasicC B 5 (2014 11 17 ) 1 / 34 VBA 2 Excel.xlsm 01 Sub test() 02 Dim tmp As Double 03

More information

if clear = 1 then Q <= " "; elsif we = 1 then Q <= D; end rtl; regs.vhdl clk 0 1 rst clear we Write Enable we 1 we 0 if clk 1 Q if rst =

if clear = 1 then Q <=  ; elsif we = 1 then Q <= D; end rtl; regs.vhdl clk 0 1 rst clear we Write Enable we 1 we 0 if clk 1 Q if rst = VHDL 2 1 VHDL 1 VHDL FPGA VHDL 2 HDL VHDL 2.1 D 1 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; regs.vhdl entity regs is clk, rst : in std_logic; clear : in std_logic; we

More information

ii

ii ii iii 1 1 1.1..................................... 1 1.2................................... 3 1.3........................... 4 2 9 2.1.................................. 9 2.2...............................

More information

. (.8.). t + t m ü(t + t) + c u(t + t) + k u(t + t) = f(t + t) () m ü f. () c u k u t + t u Taylor t 3 u(t + t) = u(t) + t! u(t) + ( t)! = u(t) + t u(

. (.8.). t + t m ü(t + t) + c u(t + t) + k u(t + t) = f(t + t) () m ü f. () c u k u t + t u Taylor t 3 u(t + t) = u(t) + t! u(t) + ( t)! = u(t) + t u( 3 8. (.8.)............................................................................................3.............................................4 Nermark β..........................................

More information

,, etc. ( ) [Marti & Stoeckel 04] [Lloyd Smith, Chuang & Munro 90], [Staat & Heitzer 03] worst-case detection [Elishakoff, Haftka & Fang 94] 2 [Cheng

,, etc. ( ) [Marti & Stoeckel 04] [Lloyd Smith, Chuang & Munro 90], [Staat & Heitzer 03] worst-case detection [Elishakoff, Haftka & Fang 94] 2 [Cheng ( ) ( ) OPTIS 2006 p.1/17 ,, etc. ( ) [Marti & Stoeckel 04] [Lloyd Smith, Chuang & Munro 90], [Staat & Heitzer 03] worst-case detection [Elishakoff, Haftka & Fang 94] 2 [Cheng et al. 02], [Craig et al.

More information

org/ghc/ Windows Linux RPM 3.2 GHCi GHC gcc javac ghc GHCi(ghci) GHCi Prelude> GHCi :load file :l file :also file :a file :reload :r :type expr :t exp

org/ghc/ Windows Linux RPM 3.2 GHCi GHC gcc javac ghc GHCi(ghci) GHCi Prelude> GHCi :load file :l file :also file :a file :reload :r :type expr :t exp 3 Haskell Haskell Haskell 1. 2. 3. 4. 5. 1. 2. 3. 4. 5. 6. C Java 3.1 Haskell Haskell GHC (Glasgow Haskell Compiler 1 ) GHC Haskell GHC http://www.haskell. 1 Guarded Horn Clauses III - 1 org/ghc/ Windows

More information

45 VBA Fortran, Pascal, C Windows OS Excel VBA Visual Basic Excel VBA VBA Visual Basic For Application Microsoft Office Office Excel VBA VBA Excel Acc

45 VBA Fortran, Pascal, C Windows OS Excel VBA Visual Basic Excel VBA VBA Visual Basic For Application Microsoft Office Office Excel VBA VBA Excel Acc \n Title 文 系 学 生 のための VBA プログラミング 教 育 についての 考 察 Author(s) 五 月 女, 仁 子 ; Soutome, Hiroko Citation 商 経 論 叢, 46(1): 45-60 Date 2010-10-31 Type Departmental Bulletin Paper Rights publisher KANAGAWA University

More information

PowerPoint Presentation

PowerPoint Presentation AI Programming data mining ( Plug in Weka to Eclipse) Review of Identification Tree Run bouncing ball in Weka Run bouncing ball in Eclipse How about color? weight? rubber? Please write down their formulae.

More information

Java updated

Java updated Java 2003.07.14 updated 3 1 Java 5 1.1 Java................................. 5 1.2 Java..................................... 5 1.3 Java................................ 6 1.3.1 Java.......................

More information

Python Speed Learning

Python   Speed Learning Python Speed Learning 1 / 89 1 2 3 4 (import) 5 6 7 (for) (if) 8 9 10 ( ) 11 12 for 13 2 / 89 Contents 1 2 3 4 (import) 5 6 7 (for) (if) 8 9 10 ( ) 11 12 for 13 3 / 89 (def) (for) (if) etc. 1 4 / 89 Jupyter

More information

javascript key

javascript key Associate Professor Department of International Social Studies KYOAI GAKUEN UNIVERSITY Email: ogashiwa@c.kyoai.ac.jp, ogashiwa@wide.ad.jp sample

More information

2 Java 35 Java Java HTML/CSS/JavaScript Java Java JSP MySQL Java 9:00 17:30 12:00 13: 項目 日数 時間 習得目標スキル Java 2 15 Web Java Java J

2 Java 35 Java Java HTML/CSS/JavaScript Java Java JSP MySQL Java 9:00 17:30 12:00 13: 項目 日数 時間 習得目標スキル Java 2 15 Web Java Java J 1 2018 4 Java 35 35 262.5 30 1 1 1,045,300 653,300 656,000 2017 12 389,300 2,700 2 946,900 554,900 290,900 101,100 1 2 Java Java Java Web Eclipse Java List Set Map StringBuilder HTML/CSS/JavaScript JSP/Servlet

More information

ohp1.dvi

ohp1.dvi 2008 1 2008.10.10 1 ( 2 ) ( ) ( ) 1 2 1.5 3 2 ( ) 50:50 Ruby ( ) Ruby http://www.ruby-lang.org/ja/ Windows Windows 3 Web Web http://lecture.ecc.u-tokyo.ac.jp/~kuno/is08/ / ( / ) / @@@ ( 3 ) @@@ :!! ( )

More information

Solution Report

Solution Report CGE 3 GAMS * Date: 2018/07/24, Version 1.1 1 2 2 GAMSIDE 3 2.1 GAMS................................. 3 2.2 GAMSIDE................................ 3 2.3 GAMSIDE............................. 7 3 GAMS 11

More information

AC-1 procedure AC-1 (G) begin Q = f(i; j) (i; j) 2 arc(g), i 6= jg repeat begin CHANGE = false for each (i; j) 2 Q do CHANGE = REVISE((i; j)) _ CHANGE

AC-1 procedure AC-1 (G) begin Q = f(i; j) (i; j) 2 arc(g), i 6= jg repeat begin CHANGE = false for each (i; j) 2 Q do CHANGE = REVISE((i; j)) _ CHANGE AC-5, May 7, 2003 Lecture 3-1, (Local Consistency) 4 1. (Node Consistency) 2. (Arc Consistency) 3. (Path Consistency) m (m-consistency) 4. AC-1 AC-2 (Waltz, ) AC-3 AC-4 AC-1 procedure AC-1 (G) begin Q

More information

一般化線形 (混合) モデル (2) - ロジスティック回帰と GLMM

一般化線形 (混合) モデル (2) - ロジスティック回帰と GLMM .. ( ) (2) GLMM kubo@ees.hokudai.ac.jp I http://goo.gl/rrhzey 2013 08 27 : 2013 08 27 08:29 kubostat2013ou2 (http://goo.gl/rrhzey) ( ) (2) 2013 08 27 1 / 74 I.1 N k.2 binomial distribution logit link function.3.4!

More information