[Home] [Help]
PACKAGE BODY: APPS.GMD_LINEAR_EVALUATE
Source
1 PACKAGE BODY GMD_LINEAR_EVALUATE AS
2 /* $Header: GMDLPEXB.pls 115.1 2004/02/25 17:10:29 nsrivast noship $ */
3
4 /* Holds the number of columns in the matrix */
5 l_col NUMBER(5);
6
7 --Bug 3222090, NSRIVAST 20-FEB-2004, BEGIN
8 --Forward decl.
9 FUNCTION set_debug_flag RETURN VARCHAR2;
10 l_debug VARCHAR2(1) := set_debug_flag;
11
12 FUNCTION set_debug_flag RETURN VARCHAR2 IS
13 l_debug VARCHAR2(1):= 'N';
14 BEGIN
15 IF( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) THEN
16 l_debug := 'Y';
17 END IF;
18 RETURN l_debug;
19 END set_debug_flag;
20 --Bug 3222090, NSRIVAST,END
21
22 /*======================================================================
23 -- PROCEDURE :
24 -- Substitute
25 --
26 -- DESCRIPTION:
27 -- This PL/SQL procedure is responsible for
28 --
29 -- REQUIREMENTS
30 -- p_mx Matrix (Required).
31 -- p_n Number of equations (Required).
32 -- SYNOPSIS:
33 -- sbustitute(X_matrix, P_count);
34 --
35 -- This procedure calls:
36 --
37 --===================================================================== */
38
39 PROCEDURE Substitute (P_mx IN OUT NOCOPY Matrix
40 ,P_n IN Number
41 ,x_status OUT NOCOPY VARCHAR2) IS
42 X_sum NUMBER;
43 i BINARY_INTEGER;
44 BEGIN
45 /*Initialize return status to success */
46 X_status := FND_API.g_ret_sts_success;
47
48 IF l_debug = 'Y' THEN
49 gmd_debug.put_line('In Substitute routine: Count:'||P_n);
50 END IF;
51 /*IF P_mx(P_n)(P_n) = 0 THEN*/
52 IF P_mx(l_col*(P_n-1) + P_n) = 0 THEN
53 IF l_debug = 'Y' THEN
54 gmd_debug.put_line(' Cannot evaluate as the divisor is zero at i:'||P_n||' j:'||P_n);
55 END IF;
56 GMD_API_GRP.log_message('GMD_NO_SOLUTION');
57 RAISE FND_API.G_EXC_ERROR;
58 END IF;
59 /*P_mx(P_n)(P_n + 1) := ROUND(P_mx(P_n)(P_n+1)/P_mx(P_n)(P_n), 9);*/
60 P_mx(l_col*(P_n-1)+ P_n+1) := ROUND(P_mx(l_col*(P_n-1) + P_n+1)/P_mx(l_col*(P_n-1) + P_n), 9);
61 IF l_debug = 'Y' THEN
62 gmd_debug.put_line(' Last row value:'||P_mx(l_col*(P_n-1) + P_n+1));
63 END IF;
64 i := P_n - 1;
65 WHILE i > 0 LOOP
66 X_sum := 0;
67 FOR j IN i+1..P_n LOOP
68 IF l_debug = 'Y' THEN
69 gmd_debug.put_line('i:'||i||' j:'||j||' Sum:'||X_sum);
70 END IF;
71 /*X_sum := X_sum + P_mx(i)(j) * P_mx(j)(P_n+1);*/
72 X_sum := X_sum + P_mx(l_col*(i-1) + j) * P_mx(l_col*(j-1) + P_n+1);
73 END LOOP;
74 IF l_debug = 'Y' THEN
75 gmd_debug.put_line('Out of Loop: Sum:'||X_sum||' '||i||'th row:'||p_mx(l_col*(i-1) + i));
76 END IF;
77
78 /*IF P_mx(i)(i) = 0 THEN*/
79 IF P_mx(l_col*(i-1) + i) = 0 THEN
80 IF l_debug = 'Y' THEN
81 gmd_debug.put_line(' Cannot evaluate as the divisor is zero at i:'||i||' j:'||i);
82 END IF;
83 GMD_API_GRP.log_message('GMD_NO_SOLUTION');
84 RAISE FND_API.G_EXC_ERROR;
85 END IF;
86 P_mx(l_col*(i-1)+ P_n+1) := ROUND((P_mx(l_col*(i-1)+ P_n+1) - X_sum) / P_mx(l_col*(i-1) + i), 9);
87 i := i - 1;
88 END LOOP;
89 EXCEPTION
90 WHEN FND_API.G_EXC_ERROR THEN
91 IF l_debug = 'Y' THEN
92 gmd_debug.put_line('Error in Substitute');
93 END IF;
94 X_status := FND_API.g_ret_sts_error;
95 WHEN OTHERS THEN
96 X_status := FND_API.g_ret_sts_unexp_error;
97 FND_MSG_PUB.Add_Exc_Msg('GMD_LINEAR_EVALUATE', 'SUBSTITUTE');
98 IF l_debug = 'Y' THEN
99 gmd_debug.put_line('Exception:'||sqlerrm);
100 END IF;
101 END Substitute;
102
103
104 /*======================================================================
105 -- PROCEDURE :
106 -- Calc_Mags
107 --
108 -- DESCRIPTION:
109 -- This PL/SQL procedure is responsible for
110 --
111 -- REQUIREMENTS
112 -- p_mx Matrix (Required).
113 -- p_count Number of equations (Required).
114 -- SYNOPSIS:
115 -- Calc_Mags(X_matrix, P_count, X_row);
116 --
117 -- This procedure calls:
118 --
119 --===================================================================== */
120 PROCEDURE Calc_Mags (P_Mx IN Matrix
121 ,P_count IN Number
122 ,X_row OUT NOCOPY Row
123 ,x_status OUT NOCOPY VARCHAR2) IS
124 BEGIN
125 /*Initialize return status to success */
126 X_status := FND_API.g_ret_sts_success;
127
128 IF l_debug = 'Y' THEN
129 gmd_debug.put_line('In Calc Mags Routine: Count:'||P_count);
130 END IF;
131 FOR i IN 1..P_Count LOOP
132 IF l_debug = 'Y' THEN
133 gmd_debug.put_line('i:'||i||' Abs Value:'||ABS(P_mx(l_col*(i-1)+ 1)));
134 END IF;
135 X_row(i) := ABS(P_Mx(l_col*(i-1)+ 1));
136 FOR j IN 1..P_Count LOOP
137 IF l_debug = 'Y' THEN
138 gmd_debug.put_line('j:'||j||' Abs Value:'||ABS(P_mx(l_col*(i-1)+ j))||' Row Value:'||X_row(i));
139 END IF;
140 /*IF ABS(P_Mx(i)(j)) > X_row(i) THEN*/
141 IF ABS(P_Mx(l_col*(i-1)+ j)) > X_row(i) THEN
142 /*X_row(i) := ABS(P_Mx(i)(j));*/
143 X_row(i) := ABS(P_Mx(l_col*(i-1)+ j));
144 END IF;
145 END LOOP;
146 X_row(i) := 1/X_row(i);
147 END LOOP;
148 IF l_debug = 'Y' THEN
149 gmd_debug.put_line(' Arry out of Calc Mags...');
150 FOR i IN 1..X_row.COUNT LOOP
151 gmd_debug.put_line(i||':'||X_row(i));
152 END LOOP;
153 END IF;
154 EXCEPTION
155 WHEN OTHERS THEN
156 X_status := FND_API.g_ret_sts_unexp_error;
157 FND_MSG_PUB.Add_Exc_Msg('GMD_LINEAR_EVALUATE', 'CALC_MAGS');
158 IF l_debug = 'Y' THEN
159 gmd_debug.put_line('Exception:'||sqlerrm);
160 END IF;
161 END calc_mags;
162
163 /*======================================================================
164 -- PROCEDURE :
165 -- Find_Max
166 --
167 -- DESCRIPTION:
168 -- This PL/SQL procedure is responsible for
169 --
170 -- REQUIREMENTS
171 -- p_mx Matrix (Required).
172 -- p_n Number of equations (Required).
173 -- SYNOPSIS:
174 -- Find_Max(X_matrix, P_row, P_current, P_count);
175 --
176 -- This procedure calls:
177 --
178 --===================================================================== */
179 PROCEDURE Find_Max (P_mx IN Matrix
180 ,P_s IN row
181 ,P_j IN NUMBER
182 ,P_n IN NUMBER
183 ,X_result OUT NOCOPY Row
184 ,X_row OUT NOCOPY NUMBER
185 ,x_status OUT NOCOPY VARCHAR2) IS
186 i NUMBER;
187 X_big NUMBER;
188 X_single NUMBER;
189 X_current NUMBER;
190 BEGIN
191 /*Initialize return status to success */
192 X_status := FND_API.g_ret_sts_success;
193
194 IF l_debug = 'Y' THEN
195 gmd_debug.put_line('In Find Max routine : P_j:'||P_j||' n:'||P_n);
196 END IF;
197 X_current := P_j;
198 /*X_big := ABS(P_mx(X_current)(1) * P_s(1));*/
199 X_big := ABS(P_mx(l_col*(X_current-1) + 1) * P_s(1));
200 IF l_debug = 'Y' THEN
201 gmd_debug.put_line('Big:'||X_big);
202 END IF;
203 /*X_result := P_mx(X_current);*/
204 FOR k IN 1..l_col LOOP
205 X_result(k) := P_mx(l_col*(X_current-1) + k);
206 END LOOP;
207
208 X_row := X_current;
209 i:=1;
210 WHILE i <= P_n LOOP
211 X_current := X_current + 1;
212 /*IF ABS(P_mx(X_current)(1) * P_s(i)) > X_big THEN*/
213 IF ABS(P_mx(l_col*(X_current-1) + 1) * P_s(i)) > X_big THEN
214 /*X_big := ABS(P_mx(X_current)(1) * P_s(i));*/
215 X_big := ABS(P_mx(l_col*(X_current-1) + 1) * P_s(i));
216
217 /*X_result := P_mx(X_current);*/
218 FOR k IN 1..l_col LOOP
219 X_result(k) := P_mx(l_col*(X_current-1) + k);
220 END LOOP;
221
222 X_row := X_current;
223 END IF;
224 i := i + 1;
225 END LOOP;
226 IF l_debug = 'Y' THEN
227 gmd_debug.put_line('Find Max Result:');
228 FOR j IN 1..X_result.COUNT LOOP
229 gmd_debug.put_line(j||':'||X_result(j));
230 END LOOP;
231 END IF;
232 EXCEPTION
233 WHEN OTHERS THEN
234 X_status := FND_API.g_ret_sts_unexp_error;
235 FND_MSG_PUB.Add_Exc_Msg('GMD_LINEAR_EVALUATE', 'FIND_MAX');
236 IF l_debug = 'Y' THEN
237 gmd_debug.put_line('Exception:'||sqlerrm);
238 END IF;
239 END Find_Max;
240
241 /*======================================================================
242 -- PROCEDURE :
243 -- Gauss_Pivot
244 --
245 -- DESCRIPTION:
246 -- This PL/SQL procedure is responsible for
247 --
248 -- REQUIREMENTS
249 -- p_mx Matrix (Required).
250 -- p_n Number of equations (Required).
251 -- SYNOPSIS:
252 -- Gauss_Pivot(X_matrix, P_row, P_current, P_count);
253 --
254 -- This procedure calls:
255 --
256 --===================================================================== */
257 PROCEDURE Gauss_Pivot(P_mx IN OUT NOCOPY Matrix
258 ,P_s IN row
259 ,P_current IN NUMBER
260 ,P_n IN NUMBER
261 ,x_status OUT NOCOPY VARCHAR2) IS
262 i INTEGER;
263 X_big NUMBER;
264 X_dummy NUMBER;
265 X_pivot Row;
266 X_n NUMBER;
267 X_row NUMBER;
268 BEGIN
269 /*Initialize return status to success */
270 X_status := FND_API.g_ret_sts_success;
271
272 IF l_debug = 'Y' THEN
273 gmd_debug.put_line('In Gauss_Pivot routine: P_current:'||p_current);
274 END IF;
275 Find_Max(P_mx => P_mx
276 ,P_s => P_s
277 ,P_j => P_current
278 ,P_n => P_n - P_current
279 ,X_result => X_pivot
280 ,X_row => X_row
281 ,X_status => X_status);
282 IF X_status <> FND_API.g_ret_sts_success THEN
283 RAISE FND_API.G_EXC_ERROR;
284 END IF;
285
286 i:=1;
287
288 WHILE i <= P_n+1 LOOP
289 IF l_debug = 'Y' THEN
290 gmd_debug.put_line('i:'||i||' Mxi:'||p_mx(l_col*(p_current-1) + i));
291 END IF;
292 /*X_dummy := P_mx(p_current)(i);*/
293 X_dummy := P_mx(l_col*(p_current-1) + i);
294
295 /*P_mx(P_current)(i) := X_pivot(i);*/
296 P_mx(l_col*(P_current-1) + i) := X_pivot(i);
297
298 /*P_mx(X_row)(i) := X_dummy;*/
299 P_mx(l_col*(X_row-1) + i) := X_dummy;
300 i := i + 1;
301 END LOOP;
302 EXCEPTION
303 WHEN FND_API.G_EXC_ERROR THEN
304 IF l_debug = 'Y' THEN
305 gmd_debug.put_line('Error in Gauss Pivot');
306 END IF;
307 X_status := FND_API.g_ret_sts_error;
308 WHEN OTHERS THEN
309 X_status := FND_API.g_ret_sts_unexp_error;
310 FND_MSG_PUB.Add_Exc_Msg('GMD_LINEAR_EVALUATE', 'GAUSS_PIVOT');
311 IF l_debug = 'Y' THEN
312 gmd_debug.put_line('Exception:'||sqlerrm);
313 END IF;
314 END Gauss_Pivot;
315
316 /*======================================================================
317 -- PROCEDURE :
318 -- Eliminate
319 --
320 -- DESCRIPTION:
321 -- This PL/SQL procedure is responsible for
322 --
323 -- REQUIREMENTS
324 -- p_mx Matrix (Required).
325 -- p_n Number of equations (Required).
326 -- SYNOPSIS:
327 -- Eliminate(X_matrix, P_row, P_count);
328 --
329 -- This procedure calls:
330 --
331 --===================================================================== */
332 PROCEDURE Eliminate (P_mx IN OUT NOCOPY Matrix
333 ,P_s IN Row
334 ,P_n IN NUMBER
335 ,x_status OUT NOCOPY VARCHAR2) IS
336 i Integer;
337 j Integer;
338 k Integer;
339 X_scale NUMBER;
340 X_divisor NUMBER;
341 X_mxj Row;
342 X_mxk Row;
343 l_debug_row VARCHAR2(2000);
344 BEGIN
345 /*Initialize return status to success */
346 X_status := FND_API.g_ret_sts_success;
347
348 IF l_debug = 'Y' THEN
349 gmd_debug.put_line('In Eliminate: P_n'||P_n);
350 END IF;
351 k := 1;
352 WHILE k < P_n LOOP
353 Gauss_Pivot(P_mx => P_mx
354 ,P_s => P_s
355 ,P_current => k
356 ,P_n => P_n
357 ,X_status => X_status);
358 IF X_status <> FND_API.g_ret_sts_success THEN
359 RAISE FND_API.G_EXC_ERROR;
360 END IF;
361
362 IF l_debug = 'Y' THEN
363 gmd_debug.put_line(' After Pivoting for :'||k);
364 FOR m IN 1..P_n LOOP
365 l_debug_row := '(';
366 FOR n IN 1..p_n+1 LOOP
367 l_debug_row := l_debug_row||p_mx(l_col*(m-1) + n)||',';
368 END LOOP;
369 gmd_debug.put_line(l_debug_row||')');
370 END LOOP;
371 END IF;
372
373 /*X_mxk := P_mx(k); -- Get row k*/
374 FOR l IN 1..l_col LOOP
375 X_mxk(l) := P_mx(l_col*(k-1) + l);
376 END LOOP;
377
378
379 j:=k+1;
380 IF l_debug = 'Y' THEN
381 gmd_debug.put_line('Row for k:'||k||' j:'||j);
382 l_debug_row := '(';
383 FOR m IN 1..P_n+1 LOOP
384 l_debug_row := l_debug_row||X_mxk(m)||',';
385 END LOOP;
386 gmd_debug.put_line(l_debug_row||')');
387 END IF;
388 IF X_mxk(k) = 0 THEN
389 IF l_debug = 'Y' THEN
390 gmd_debug.put_line(' Cannot evaluate as the divisor is zero at i:'||k||' j:'||k);
391 END IF;
392 GMD_API_GRP.log_message('GMD_NO_SOLUTION');
393 RAISE FND_API.G_EXC_ERROR;
394 END IF;
395 X_divisor := 1/X_mxk(k);
396 WHILE j <= P_n LOOP
397
398 /*X_mxj := P_mx(j); -- Get row j*/
399 FOR l IN 1..l_col LOOP
400 X_mxj(l) := P_mx(l_col*(j-1) + l);
401 END LOOP;
402
403 X_scale := X_mxj(k) * X_divisor;
404
405 IF l_debug = 'Y' THEN
406 gmd_debug.put_line('Row for J:'||j||' Scale:'||X_scale);
407 l_debug_row := '(';
408 FOR m IN 1..P_n+1 LOOP
409 l_debug_row := l_debug_row||X_mxj(m)||',';
410 END LOOP;
411 gmd_debug.put_line(l_debug_row||')');
412 END IF;
413
414 i := k;
415 WHILE i <= P_n+1 LOOP
416 X_mxj(i) := X_mxj(i) - (X_Scale * X_mxk(i));
417 i := i + 1;
418 END LOOP;
419
420 /*P_mx(j) := X_mxj; */
421 FOR l IN 1..l_col LOOP
422 P_mx(l_col*(j-1) + l) := X_mxj(l);
423 END LOOP;
424
425 j := j + 1;
426 END LOOP;
427 IF l_debug = 'Y' THEN
428 gmd_debug.put_line(' After elimination for :'||k);
429 FOR i IN 1..P_n LOOP
430 l_debug_row := '(';
431 FOR j IN 1..p_n+1 LOOP
432 l_debug_row := l_debug_row||p_mx(l_col*(i-1)+ j)||',';
433 END LOOP;
434 gmd_debug.put_line(l_debug_row||')');
435 END LOOP;
436 END IF;
437 k := k + 1;
438 END LOOP;
439 EXCEPTION
440 WHEN FND_API.G_EXC_ERROR THEN
441 X_status := FND_API.g_ret_sts_error;
442 IF l_debug = 'Y' THEN
443 gmd_debug.put_line('Error in Eliminate');
444 END IF;
445 WHEN OTHERS THEN
446 X_status := FND_API.g_ret_sts_unexp_error;
447 FND_MSG_PUB.Add_Exc_Msg('GMD_LINEAR_EVALUATE', 'ELIMINATE');
448 IF l_debug = 'Y' THEN
449 gmd_debug.put_line('Exception:'||sqlerrm);
450 END IF;
451 END Eliminate;
452
453 /*======================================================================
454 -- PROCEDURE :
455 -- Gauss
456 --
457 -- DESCRIPTION:
458 -- This PL/SQL procedure is responsible for
459 --
460 -- REQUIREMENTS
461 -- p_mx Matrix (Required).
462 -- p_n Number of equations (Required).
463 -- SYNOPSIS:
464 -- Gauss(X_matrix, P_row, P_count);
465 --
466 -- This procedure calls:
467 --
468 --===================================================================== */
469 PROCEDURE Gauss (P_mx IN Matrix
470 ,P_n IN NUMBER
471 ,X_result OUT NOCOPY Row
472 ,x_status OUT NOCOPY VARCHAR2) IS
473 X_mags Row;
474 X_matrix Matrix;
475 BEGIN
476 /*Initialize return status to success */
477 X_status := FND_API.g_ret_sts_success;
478 /* Let us store the number of columns in the matrix */
479 l_col := P_n + 1;
480
481 X_matrix := P_mx;
482 Calc_Mags (P_mx => X_matrix,
483 P_count => P_n,
484 X_row => X_mags,
485 X_status => X_status);
486 IF X_status <> FND_API.g_ret_sts_success THEN
487 RAISE FND_API.G_EXC_ERROR;
488 END IF;
489
490 Eliminate (P_mx => X_matrix,
491 P_s => X_mags,
492 P_n => P_n,
493 X_status => X_status);
494 IF X_status <> FND_API.g_ret_sts_success THEN
495 RAISE FND_API.G_EXC_ERROR;
496 END IF;
497
498 Substitute (P_mx => X_matrix,
499 P_n => P_n,
500 X_status => X_status);
501 IF X_status <> FND_API.g_ret_sts_success THEN
502 RAISE FND_API.G_EXC_ERROR;
503 END IF;
504
505 FOR i IN 1..P_n LOOP
506 /*X_result(i) := X_matrix(i)(P_n+1);*/
507 X_result(i) := X_matrix(l_col*(i-1) + P_n+1);
508 END LOOP;
509 EXCEPTION
510 WHEN FND_API.G_EXC_ERROR THEN
511 X_status := FND_API.g_ret_sts_error;
512 IF l_debug = 'Y' THEN
513 gmd_debug.put_line('Error in Gauss');
514 END IF;
515 WHEN OTHERS THEN
516 IF l_debug = 'Y' THEN
517 gmd_debug.put_line('Exception:'||sqlerrm);
518 END IF;
519 X_status := FND_API.g_ret_sts_unexp_error;
520 FND_MSG_PUB.Add_Exc_Msg('GMD_LINEAR_EVALUATE', 'GAUSS');
521 END Gauss;
522
523 /*======================================================================
524 -- PROCEDURE :
525 -- Test_Gauss
526 --
527 -- DESCRIPTION:
528 -- This PL/SQL procedure is responsible for
529 --
530 -- REQUIREMENTS
531 --
532 -- SYNOPSIS:
533 -- Test_Gauss;
534 --
535 -- This procedure calls:
536 --
537 --===================================================================== */
538 PROCEDURE Test_Gauss IS
539 X_matrix Matrix;
540 X_result Row;
541 j BINARY_INTEGER := 0;
542 X_status VARCHAR2(1);
543 BEGIN
544 FND_PROFILE.PUT('AFLOG_ENABLED', 'Y');
545 FND_PROFILE.PUT('AFLOG_LEVEL', 0);
546 l_debug := 'Y';
547 GMD_DEBUG.LOG_INITIALIZE(NULL);
548
549 X_matrix(1) := 3;
550 X_matrix(2) := -4;
551 X_matrix(3) := 5;
552 X_matrix(4) := -1;
553
554 X_matrix(5) := -3;
555 X_matrix(6) := 2;
556 X_matrix(7) := 1;
557 X_matrix(8) := 1;
558
559 X_matrix(9) := 6;
560 X_matrix(10) := 8;
561 X_matrix(11) := -1;
562 X_matrix(12) := 35;
563
564 -- answers: 2, 3, 1*/
565
566 /* X_matrix(1)(1) := 1;
567 X_matrix(1)(2) := -1;
568 X_matrix(1)(3) := 1;
569 X_matrix(1)(4) := 0;
570
571 X_matrix(2)(1) := 1;
572 X_matrix(2)(2) := 0;
573 X_matrix(2)(3) := -3;
574 X_matrix(2)(4) := 10;
575
576 X_matrix(3)(1) := 0;
577 X_matrix(3)(2) := -2;
578 X_matrix(3)(3) := -3;
579 X_matrix(3)(4) := 20;
580
581 -- answers: -40/11, -50/11, -10/11*/
582
583
584 /* X_matrix(1)(1) := -0.072;
585 X_matrix(1)(2) := 0.300;
586 X_matrix(1)(3) := -0.210;
587 X_matrix(1)(4) := 1.7667;
588 --X_matrix(1)(5) := 100;
589
590 X_matrix(2)(1) := 0.874;
591 X_matrix(2)(2) := -0.267;
592 X_matrix(2)(3) := 0.133;
593 X_matrix(2)(4) := -1.7411;
594 --X_matrix(2)(5) := 0;
595
596 X_matrix(3)(1) := -0.501;
597 X_matrix(3)(2) := -0.123;
598 X_matrix(3)(3) := 0.125;
599 X_matrix(3)(4) := -0.6046;
600 --X_matrix(3)(5) := 0;
601
602
603 /* X_matrix(4)(1) := 1;
604 X_matrix(4)(2) := 1;
605 X_matrix(4)(3) := 0;
606 X_matrix(4)(4) := 1;
607 X_matrix(4)(5) := 0;
608 -- answers: 2, 3, 1*/
609
610 /* X_matrix(1)(1) := 1;
611 X_matrix(1)(2) := 1;
612 X_matrix(1)(3) := 98;
613
614 X_matrix(2)(1) := 1;
615 X_matrix(2)(2) := -20;
616 X_matrix(2)(3) := -10;*/
617
618 /* X_matrix(1) := 0.2;
619 X_matrix(2) := -15.5;
620 X_matrix(3) := 4.5;
621 X_matrix(4) := 0;
622
623 X_matrix(5) :=1;
624 X_matrix(6) := 1;
625 X_matrix(7) := 1;
626 X_matrix(8) := 100;
627
628 X_matrix(9) := 0.3;
629 X_matrix(10) := -26.5;
630 X_matrix(11) := 8.5;
631 X_matrix(12) := 0;*/
632
633 l_debug := 'N';
634 Gauss(P_mx => X_matrix
635 ,X_result => X_result
636 ,P_n => 3
637 ,X_status => X_status);
638 IF X_status = FND_API.g_ret_sts_success THEN
639 FOR i IN 1..3 LOOP
640 gmd_debug.put_line(i||':'||X_result(i));
641 END LOOP;
642 END IF;
643 END Test_Gauss;
644
645 END GMD_LINEAR_EVALUATE;