001: /*
002: * <copyright>
003: *
004: * Copyright 1997-2004 BBNT Solutions, LLC
005: * under sponsorship of the Defense Advanced Research Projects
006: * Agency (DARPA).
007: *
008: * You can redistribute this software and/or modify it under the
009: * terms of the Cougaar Open Source License as published on the
010: * Cougaar Open Source Website (www.cougaar.org).
011: *
012: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
013: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
014: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
015: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
016: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
017: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
018: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
019: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
020: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
021: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
022: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
023: *
024: * </copyright>
025: */
026:
027: /* @generated Thu Sep 27 15:21:47 EDT 2007 from /u01/builds/cougaar/B12_4/B12_4/070927151721/src/glm/src/org/cougaar/glm/ldm/asset/alpprops.def - DO NOT HAND EDIT */
028: /** Primary client interface for InventoryPG.
029: * @see NewInventoryPG
030: * @see InventoryPGImpl
031: **/package org.cougaar.glm.ldm.asset;
032:
033: import org.cougaar.planning.ldm.measure.*;
034: import org.cougaar.planning.ldm.asset.*;
035: import org.cougaar.planning.ldm.plan.*;
036: import java.util.*;
037:
038: import org.cougaar.glm.ldm.plan.*;
039: import org.cougaar.glm.ldm.oplan.*;
040: import org.cougaar.glm.ldm.policy.*;
041: import org.cougaar.core.mts.MessageAddress;
042: import org.cougaar.glm.execution.common.InventoryReport;
043:
044: public interface InventoryPG extends PropertyGroup,
045: org.cougaar.planning.ldm.dq.HasDataQuality {
046: /** maximum amount that can be contained or accommodated. **/
047: Scalar getCapacity();
048:
049: Scalar getInitialLevel();
050:
051: Scalar getReorderLevel();
052:
053: Scalar getMinReorder();
054:
055: /** Quantity of materiel which cannot be used. E.g. fuel which cannot be pumped out of a tank. **/
056: Scalar getUnobtainable();
057:
058: boolean getFillToCapacity();
059:
060: boolean getMaintainAtCapacity();
061:
062: Asset getResource();
063:
064: int resetInventory(Inventory inventory, long today);
065:
066: int getToday();
067:
068: int getFirstPlanningDay();
069:
070: Scalar getLevel(long day);
071:
072: Scalar getLevel(int day);
073:
074: int withdrawFromInventory(Inventory inventory,
075: MessageAddress cluster);
076:
077: double getNDaysDemand(int day);
078:
079: double getReorderLevel(int day);
080:
081: double getGoalLevel(int day);
082:
083: int addPreviousRefillsToInventory(Task maintainInv);
084:
085: int addDueIn(Task refillTask);
086:
087: int removeDueIn(Task refillTask);
088:
089: int getPlanningDays();
090:
091: void computeThresholdSchedule(int daysOfDemand, int daysForward,
092: int daysBackward, double minReorderLevel,
093: double maxReorderLevel, double goalLevelMultiplier);
094:
095: int determineInventoryLevels();
096:
097: Task refillAlreadyFailedOnDay(int day);
098:
099: Task getRefillOnDay(int day);
100:
101: void removeRefillProjection(int day);
102:
103: Scalar getProjected(int day);
104:
105: Scalar getProjectedRefill(int day);
106:
107: Date lastDemandTaskEnd(Inventory inventory);
108:
109: Integer getFirstOverflow(int day, MessageAddress cluster);
110:
111: DueOut getLowestPriorityDueOutBeforeDay(int end);
112:
113: List updateDueOutAllocations();
114:
115: int updateContentSchedule(Inventory inventory);
116:
117: int updateDetailedContentSchedule(Inventory inventory);
118:
119: int clearContentSchedule(Inventory inventory);
120:
121: int updateInventoryLevelsSchedule(Inventory inventory);
122:
123: int clearInventoryLevelsSchedule(Inventory inventory);
124:
125: int printQuantityScheduleTimes(Schedule sched);
126:
127: int printInventoryLevels(Inventory inventory,
128: MessageAddress clusterID);
129:
130: PGDelegate copy(PropertyGroup pg);
131:
132: Enumeration getAllDueIns();
133:
134: ProjectionWeight getProjectionWeight();
135:
136: void setProjectionWeight(ProjectionWeight newWeight);
137:
138: void addInventoryReport(InventoryReport anInventoryReport);
139:
140: InventoryReport getLatestInventoryReport();
141:
142: InventoryReport getOldestInventoryReport();
143:
144: void pruneOldInventoryReports(long pruneTime);
145:
146: long convertDayToTime(int day);
147:
148: long getStartOfDay(int day);
149:
150: int convertTimeToDay(long time);
151:
152: int getImputedDayOfTime(long time);
153:
154: int getImputedDay(int day);
155:
156: void setDueOutFilled(DueOut dueOut, boolean newFilled);
157:
158: // introspection and construction
159: /** the method of factoryClass that creates this type **/
160: String factoryMethod = "newInventoryPG";
161: /** the (mutable) class type returned by factoryMethod **/
162: String mutableClass = "org.cougaar.glm.ldm.asset.NewInventoryPG";
163: /** the factory class **/
164: Class factoryClass = org.cougaar.glm.ldm.asset.PropertyGroupFactory.class;
165: /** the (immutable) class type returned by domain factory **/
166: Class primaryClass = org.cougaar.glm.ldm.asset.InventoryPG.class;
167: String assetSetter = "setInventoryPG";
168: String assetGetter = "getInventoryPG";
169: /** The Null instance for indicating that the PG definitely has no value **/
170: InventoryPG nullPG = new Null_InventoryPG();
171:
172: /** Null_PG implementation for InventoryPG **/
173: final class Null_InventoryPG implements InventoryPG, Null_PG {
174: public Scalar getCapacity() {
175: throw new UndefinedValueException();
176: }
177:
178: public Scalar getInitialLevel() {
179: throw new UndefinedValueException();
180: }
181:
182: public Scalar getReorderLevel() {
183: throw new UndefinedValueException();
184: }
185:
186: public Scalar getMinReorder() {
187: throw new UndefinedValueException();
188: }
189:
190: public Scalar getUnobtainable() {
191: throw new UndefinedValueException();
192: }
193:
194: public boolean getFillToCapacity() {
195: throw new UndefinedValueException();
196: }
197:
198: public boolean getMaintainAtCapacity() {
199: throw new UndefinedValueException();
200: }
201:
202: public Asset getResource() {
203: throw new UndefinedValueException();
204: }
205:
206: public InventoryBG getInvBG() {
207: throw new UndefinedValueException();
208: }
209:
210: public void setInvBG(InventoryBG _invBG) {
211: throw new UndefinedValueException();
212: }
213:
214: public int resetInventory(Inventory inventory, long today) {
215: throw new UndefinedValueException();
216: }
217:
218: public int getToday() {
219: throw new UndefinedValueException();
220: }
221:
222: public int getFirstPlanningDay() {
223: throw new UndefinedValueException();
224: }
225:
226: public Scalar getLevel(long day) {
227: throw new UndefinedValueException();
228: }
229:
230: public Scalar getLevel(int day) {
231: throw new UndefinedValueException();
232: }
233:
234: public int withdrawFromInventory(Inventory inventory,
235: MessageAddress cluster) {
236: throw new UndefinedValueException();
237: }
238:
239: public double getNDaysDemand(int day) {
240: throw new UndefinedValueException();
241: }
242:
243: public double getReorderLevel(int day) {
244: throw new UndefinedValueException();
245: }
246:
247: public double getGoalLevel(int day) {
248: throw new UndefinedValueException();
249: }
250:
251: public int addPreviousRefillsToInventory(Task maintainInv) {
252: throw new UndefinedValueException();
253: }
254:
255: public int addDueIn(Task refillTask) {
256: throw new UndefinedValueException();
257: }
258:
259: public int removeDueIn(Task refillTask) {
260: throw new UndefinedValueException();
261: }
262:
263: public int getPlanningDays() {
264: throw new UndefinedValueException();
265: }
266:
267: public void computeThresholdSchedule(int daysOfDemand,
268: int daysForward, int daysBackward,
269: double minReorderLevel, double maxReorderLevel,
270: double goalLevelMultiplier) {
271: throw new UndefinedValueException();
272: }
273:
274: public int determineInventoryLevels() {
275: throw new UndefinedValueException();
276: }
277:
278: public Task refillAlreadyFailedOnDay(int day) {
279: throw new UndefinedValueException();
280: }
281:
282: public Task getRefillOnDay(int day) {
283: throw new UndefinedValueException();
284: }
285:
286: public void removeRefillProjection(int day) {
287: throw new UndefinedValueException();
288: }
289:
290: public Scalar getProjected(int day) {
291: throw new UndefinedValueException();
292: }
293:
294: public Scalar getProjectedRefill(int day) {
295: throw new UndefinedValueException();
296: }
297:
298: public Date lastDemandTaskEnd(Inventory inventory) {
299: throw new UndefinedValueException();
300: }
301:
302: public Integer getFirstOverflow(int day, MessageAddress cluster) {
303: throw new UndefinedValueException();
304: }
305:
306: public DueOut getLowestPriorityDueOutBeforeDay(int end) {
307: throw new UndefinedValueException();
308: }
309:
310: public List updateDueOutAllocations() {
311: throw new UndefinedValueException();
312: }
313:
314: public int updateContentSchedule(Inventory inventory) {
315: throw new UndefinedValueException();
316: }
317:
318: public int updateDetailedContentSchedule(Inventory inventory) {
319: throw new UndefinedValueException();
320: }
321:
322: public int clearContentSchedule(Inventory inventory) {
323: throw new UndefinedValueException();
324: }
325:
326: public int updateInventoryLevelsSchedule(Inventory inventory) {
327: throw new UndefinedValueException();
328: }
329:
330: public int clearInventoryLevelsSchedule(Inventory inventory) {
331: throw new UndefinedValueException();
332: }
333:
334: public int printQuantityScheduleTimes(Schedule sched) {
335: throw new UndefinedValueException();
336: }
337:
338: public int printInventoryLevels(Inventory inventory,
339: MessageAddress clusterID) {
340: throw new UndefinedValueException();
341: }
342:
343: public PGDelegate copy(PropertyGroup pg) {
344: throw new UndefinedValueException();
345: }
346:
347: public Enumeration getAllDueIns() {
348: throw new UndefinedValueException();
349: }
350:
351: public ProjectionWeight getProjectionWeight() {
352: throw new UndefinedValueException();
353: }
354:
355: public void setProjectionWeight(ProjectionWeight newWeight) {
356: throw new UndefinedValueException();
357: }
358:
359: public void addInventoryReport(InventoryReport anInventoryReport) {
360: throw new UndefinedValueException();
361: }
362:
363: public InventoryReport getLatestInventoryReport() {
364: throw new UndefinedValueException();
365: }
366:
367: public InventoryReport getOldestInventoryReport() {
368: throw new UndefinedValueException();
369: }
370:
371: public void pruneOldInventoryReports(long pruneTime) {
372: throw new UndefinedValueException();
373: }
374:
375: public long convertDayToTime(int day) {
376: throw new UndefinedValueException();
377: }
378:
379: public long getStartOfDay(int day) {
380: throw new UndefinedValueException();
381: }
382:
383: public int convertTimeToDay(long time) {
384: throw new UndefinedValueException();
385: }
386:
387: public int getImputedDayOfTime(long time) {
388: throw new UndefinedValueException();
389: }
390:
391: public int getImputedDay(int day) {
392: throw new UndefinedValueException();
393: }
394:
395: public void setDueOutFilled(DueOut dueOut, boolean newFilled) {
396: throw new UndefinedValueException();
397: }
398:
399: public boolean equals(Object object) {
400: throw new UndefinedValueException();
401: }
402:
403: public Object clone() throws CloneNotSupportedException {
404: throw new CloneNotSupportedException();
405: }
406:
407: public NewPropertyGroup unlock(Object key) {
408: return null;
409: }
410:
411: public PropertyGroup lock(Object key) {
412: return null;
413: }
414:
415: public PropertyGroup lock() {
416: return null;
417: }
418:
419: public PropertyGroup copy() {
420: return null;
421: }
422:
423: public Class getPrimaryClass() {
424: return primaryClass;
425: }
426:
427: public String getAssetGetMethod() {
428: return assetGetter;
429: }
430:
431: public String getAssetSetMethod() {
432: return assetSetter;
433: }
434:
435: public Class getIntrospectionClass() {
436: return InventoryPGImpl.class;
437: }
438:
439: public boolean hasDataQuality() {
440: return false;
441: }
442:
443: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
444: return null;
445: }
446: }
447:
448: /** Future PG implementation for InventoryPG **/
449: final class Future implements InventoryPG, Future_PG {
450: public Scalar getCapacity() {
451: waitForFinalize();
452: return _real.getCapacity();
453: }
454:
455: public Scalar getInitialLevel() {
456: waitForFinalize();
457: return _real.getInitialLevel();
458: }
459:
460: public Scalar getReorderLevel() {
461: waitForFinalize();
462: return _real.getReorderLevel();
463: }
464:
465: public Scalar getMinReorder() {
466: waitForFinalize();
467: return _real.getMinReorder();
468: }
469:
470: public Scalar getUnobtainable() {
471: waitForFinalize();
472: return _real.getUnobtainable();
473: }
474:
475: public boolean getFillToCapacity() {
476: waitForFinalize();
477: return _real.getFillToCapacity();
478: }
479:
480: public boolean getMaintainAtCapacity() {
481: waitForFinalize();
482: return _real.getMaintainAtCapacity();
483: }
484:
485: public Asset getResource() {
486: waitForFinalize();
487: return _real.getResource();
488: }
489:
490: public boolean equals(Object object) {
491: waitForFinalize();
492: return _real.equals(object);
493: }
494:
495: public int resetInventory(Inventory inventory, long today) {
496: waitForFinalize();
497: return _real.resetInventory(inventory, today);
498: }
499:
500: public int getToday() {
501: waitForFinalize();
502: return _real.getToday();
503: }
504:
505: public int getFirstPlanningDay() {
506: waitForFinalize();
507: return _real.getFirstPlanningDay();
508: }
509:
510: public Scalar getLevel(long day) {
511: waitForFinalize();
512: return _real.getLevel(day);
513: }
514:
515: public Scalar getLevel(int day) {
516: waitForFinalize();
517: return _real.getLevel(day);
518: }
519:
520: public int withdrawFromInventory(Inventory inventory,
521: MessageAddress cluster) {
522: waitForFinalize();
523: return _real.withdrawFromInventory(inventory, cluster);
524: }
525:
526: public double getNDaysDemand(int day) {
527: waitForFinalize();
528: return _real.getNDaysDemand(day);
529: }
530:
531: public double getReorderLevel(int day) {
532: waitForFinalize();
533: return _real.getReorderLevel(day);
534: }
535:
536: public double getGoalLevel(int day) {
537: waitForFinalize();
538: return _real.getGoalLevel(day);
539: }
540:
541: public int addPreviousRefillsToInventory(Task maintainInv) {
542: waitForFinalize();
543: return _real.addPreviousRefillsToInventory(maintainInv);
544: }
545:
546: public int addDueIn(Task refillTask) {
547: waitForFinalize();
548: return _real.addDueIn(refillTask);
549: }
550:
551: public int removeDueIn(Task refillTask) {
552: waitForFinalize();
553: return _real.removeDueIn(refillTask);
554: }
555:
556: public int getPlanningDays() {
557: waitForFinalize();
558: return _real.getPlanningDays();
559: }
560:
561: public void computeThresholdSchedule(int daysOfDemand,
562: int daysForward, int daysBackward,
563: double minReorderLevel, double maxReorderLevel,
564: double goalLevelMultiplier) {
565: waitForFinalize();
566: _real.computeThresholdSchedule(daysOfDemand, daysForward,
567: daysBackward, minReorderLevel, maxReorderLevel,
568: goalLevelMultiplier);
569: }
570:
571: public int determineInventoryLevels() {
572: waitForFinalize();
573: return _real.determineInventoryLevels();
574: }
575:
576: public Task refillAlreadyFailedOnDay(int day) {
577: waitForFinalize();
578: return _real.refillAlreadyFailedOnDay(day);
579: }
580:
581: public Task getRefillOnDay(int day) {
582: waitForFinalize();
583: return _real.getRefillOnDay(day);
584: }
585:
586: public void removeRefillProjection(int day) {
587: waitForFinalize();
588: _real.removeRefillProjection(day);
589: }
590:
591: public Scalar getProjected(int day) {
592: waitForFinalize();
593: return _real.getProjected(day);
594: }
595:
596: public Scalar getProjectedRefill(int day) {
597: waitForFinalize();
598: return _real.getProjectedRefill(day);
599: }
600:
601: public Date lastDemandTaskEnd(Inventory inventory) {
602: waitForFinalize();
603: return _real.lastDemandTaskEnd(inventory);
604: }
605:
606: public Integer getFirstOverflow(int day, MessageAddress cluster) {
607: waitForFinalize();
608: return _real.getFirstOverflow(day, cluster);
609: }
610:
611: public DueOut getLowestPriorityDueOutBeforeDay(int end) {
612: waitForFinalize();
613: return _real.getLowestPriorityDueOutBeforeDay(end);
614: }
615:
616: public List updateDueOutAllocations() {
617: waitForFinalize();
618: return _real.updateDueOutAllocations();
619: }
620:
621: public int updateContentSchedule(Inventory inventory) {
622: waitForFinalize();
623: return _real.updateContentSchedule(inventory);
624: }
625:
626: public int updateDetailedContentSchedule(Inventory inventory) {
627: waitForFinalize();
628: return _real.updateDetailedContentSchedule(inventory);
629: }
630:
631: public int clearContentSchedule(Inventory inventory) {
632: waitForFinalize();
633: return _real.clearContentSchedule(inventory);
634: }
635:
636: public int updateInventoryLevelsSchedule(Inventory inventory) {
637: waitForFinalize();
638: return _real.updateInventoryLevelsSchedule(inventory);
639: }
640:
641: public int clearInventoryLevelsSchedule(Inventory inventory) {
642: waitForFinalize();
643: return _real.clearInventoryLevelsSchedule(inventory);
644: }
645:
646: public int printQuantityScheduleTimes(Schedule sched) {
647: waitForFinalize();
648: return _real.printQuantityScheduleTimes(sched);
649: }
650:
651: public int printInventoryLevels(Inventory inventory,
652: MessageAddress clusterID) {
653: waitForFinalize();
654: return _real.printInventoryLevels(inventory, clusterID);
655: }
656:
657: public PGDelegate copy(PropertyGroup pg) {
658: waitForFinalize();
659: return _real.copy(pg);
660: }
661:
662: public Enumeration getAllDueIns() {
663: waitForFinalize();
664: return _real.getAllDueIns();
665: }
666:
667: public ProjectionWeight getProjectionWeight() {
668: waitForFinalize();
669: return _real.getProjectionWeight();
670: }
671:
672: public void setProjectionWeight(ProjectionWeight newWeight) {
673: waitForFinalize();
674: _real.setProjectionWeight(newWeight);
675: }
676:
677: public void addInventoryReport(InventoryReport anInventoryReport) {
678: waitForFinalize();
679: _real.addInventoryReport(anInventoryReport);
680: }
681:
682: public InventoryReport getLatestInventoryReport() {
683: waitForFinalize();
684: return _real.getLatestInventoryReport();
685: }
686:
687: public InventoryReport getOldestInventoryReport() {
688: waitForFinalize();
689: return _real.getOldestInventoryReport();
690: }
691:
692: public void pruneOldInventoryReports(long pruneTime) {
693: waitForFinalize();
694: _real.pruneOldInventoryReports(pruneTime);
695: }
696:
697: public long convertDayToTime(int day) {
698: waitForFinalize();
699: return _real.convertDayToTime(day);
700: }
701:
702: public long getStartOfDay(int day) {
703: waitForFinalize();
704: return _real.getStartOfDay(day);
705: }
706:
707: public int convertTimeToDay(long time) {
708: waitForFinalize();
709: return _real.convertTimeToDay(time);
710: }
711:
712: public int getImputedDayOfTime(long time) {
713: waitForFinalize();
714: return _real.getImputedDayOfTime(time);
715: }
716:
717: public int getImputedDay(int day) {
718: waitForFinalize();
719: return _real.getImputedDay(day);
720: }
721:
722: public void setDueOutFilled(DueOut dueOut, boolean newFilled) {
723: waitForFinalize();
724: _real.setDueOutFilled(dueOut, newFilled);
725: }
726:
727: public Object clone() throws CloneNotSupportedException {
728: throw new CloneNotSupportedException();
729: }
730:
731: public NewPropertyGroup unlock(Object key) {
732: return null;
733: }
734:
735: public PropertyGroup lock(Object key) {
736: return null;
737: }
738:
739: public PropertyGroup lock() {
740: return null;
741: }
742:
743: public PropertyGroup copy() {
744: return null;
745: }
746:
747: public Class getPrimaryClass() {
748: return primaryClass;
749: }
750:
751: public String getAssetGetMethod() {
752: return assetGetter;
753: }
754:
755: public String getAssetSetMethod() {
756: return assetSetter;
757: }
758:
759: public Class getIntrospectionClass() {
760: return InventoryPGImpl.class;
761: }
762:
763: public synchronized boolean hasDataQuality() {
764: return (_real != null) && _real.hasDataQuality();
765: }
766:
767: public synchronized org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
768: return (_real == null) ? null : (_real.getDataQuality());
769: }
770:
771: // Finalization support
772: private InventoryPG _real = null;
773:
774: public synchronized void finalize(PropertyGroup real) {
775: if (real instanceof InventoryPG) {
776: _real = (InventoryPG) real;
777: notifyAll();
778: } else {
779: throw new IllegalArgumentException(
780: "Finalization with wrong class: " + real);
781: }
782: }
783:
784: private synchronized void waitForFinalize() {
785: while (_real == null) {
786: try {
787: wait();
788: } catch (InterruptedException _ie) {
789: // We should really let waitForFinalize throw InterruptedException
790: Thread.interrupted();
791: }
792: }
793: }
794: }
795: }
|