// //Dynamic planning command // //Syntax with parameters only. dynmp g1 - 3 by x; //Options kind:max //kind of plan value max or min //max:maximum value min:minmum value method:plus //method about integration of functions //plus : ƒ° func[i] mult: ƒ®func[i] // //Quation //This Algorithm is based on discrete funcions value. //This command needs table which is composed by discrete function value. //Example is below. // x func1 func2 func3 // 10 f1(10) f2(10) f3(10) // 20 f1(20) f2(20) f3(20) // 30 f1(30) f3(30) f3(30) // //Exsample 1 // Problem max volume of rectangular (X1*X2*X3) by constraint X1+X2+X3 <= 10. // Variable inclease by 0.1 pich from 0 to 10. // Å“K‰»ƒAƒ‹ƒSƒŠƒYƒ€ ’·”ö’q° P41 // /* Generate function table */ clear; vector g[3]; for(i=0;i<=100;i++) { for(n=1;n<=3;n++) { x=i*0.1; g[n]=x; } outrec; } select g_1-3 x; /* dynamic plan */ dynmp g_1-3 by x/ kind=max method=mult ; // //Exsample 2 // Valuable is X1 X2 X3 that are integer // 0<=X1<=4 0<=X2<=4 0<=X3<=4 // functions are defined as follow. // func1:-2X1**2+8X1-5 // func2: 3X2**2-18X2+29 // func3: -X3**2+5 // constraction // 0<= X1+X2+X3 <= 4 // Ref // Å“K‰»ƒAƒ‹ƒSƒŠƒYƒ€ ’·”ö’q° P48 // /* Generate function table */ clear; vector g[3]; for(i=1;i<=5;i++) { for(n=1;n<=3;n++) { x=i-1; if(n == 1) {g[n]=-2*x**2+8*x-5;} if(n == 2) {g[n]= 3*x**2-18*x+29;} if(n == 3) {g[n]= -1*x**2+5;} } outrec; } select g_1-3 x; /* dynamic plan */ dynmp g_1-3 by x;