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: package org.cougaar.glm.util;
028:
029: import java.util.Date;
030:
031: import org.cougaar.glm.ldm.Constants;
032: import org.cougaar.lib.filter.UTILPlugin;
033: import org.cougaar.lib.util.UTILAllocate;
034: import org.cougaar.planning.ldm.PlanningFactory;
035: import org.cougaar.planning.ldm.asset.Asset;
036: import org.cougaar.planning.ldm.plan.AspectValue;
037: import org.cougaar.planning.ldm.plan.Plan;
038: import org.cougaar.planning.ldm.plan.PlanElement;
039: import org.cougaar.planning.ldm.plan.Task;
040: import org.cougaar.util.log.Logger;
041:
042: /**
043: * This class contains utility functions for allocations.
044: */
045:
046: public class GLMAllocate extends UTILAllocate {
047:
048: public GLMAllocate(Logger l) {
049: super (l);
050: }
051:
052: /**
053: * Provides backword compatibility for next method.
054: *
055: * Deprecated :
056: *
057: * Each plugin should think of the role the assigned asset is
058: * acting in and migrate to using the other version of makeAllocation.
059: *
060: * Assigns a default role of TRANSPORTER.
061: *
062: * @see org.cougaar.planning.ldm.plan.Role
063: * @deprecated
064: */
065: public PlanElement makeAllocation(UTILPlugin creator,
066: PlanningFactory ldmf, Plan plan, Task t, Asset asset,
067: Date start, Date end, double cost, double confidence) {
068: return makeAllocation(creator, ldmf, plan, t, asset, start,
069: end, cost, confidence, Constants.Role.TRANSPORTER);
070: }
071:
072: /**
073: * Provides backword compatibility for next method.
074: *
075: * Deprecated :
076: *
077: * Each plugin should think of the role the assigned asset is
078: * acting in and migrate to using the other version of makeAllocation.
079: *
080: * Assigns a default role of TRANSPORTER.
081: *
082: * @see org.cougaar.planning.ldm.plan.Role
083: * @deprecated
084: */
085: public PlanElement makeAllocation(UTILPlugin creator,
086: PlanningFactory ldmf, Plan plan, Task t, Asset asset,
087: Date start, Date end, double confidence) {
088: return makeAllocation(creator, ldmf, plan, t, asset, start,
089: end, confidence, Constants.Role.TRANSPORTER);
090: }
091:
092: /**
093: * Provides backword compatibility for next method.
094: *
095: * Deprecated :
096: *
097: * Each plugin should think of the role the assigned asset is
098: * acting in and migrate to using the other version of makeAllocation.
099: *
100: * Assigns a default role of TRANSPORTER.
101: *
102: * @see org.cougaar.planning.ldm.plan.Role
103: * @deprecated
104: */
105: public PlanElement makeAllocation(UTILPlugin creator,
106: PlanningFactory ldmf, Plan plan, Task t, Asset asset,
107: AspectValue[] aspects, double confidence) {
108: return makeAllocation(creator, ldmf, plan, t, asset, aspects,
109: confidence, Constants.Role.TRANSPORTER);
110: }
111:
112: /**
113: * Provides backword compatibility for next method.
114: *
115: * Deprecated :
116: *
117: * Each plugin should think of the role the assigned asset is
118: * acting in and migrate to using the other version of makeAllocation.
119: *
120: * Assigns a default role of TRANSPORTER.
121: *
122: * @see org.cougaar.planning.ldm.plan.Role
123: * @deprecated
124: */
125: public PlanElement makeAllocation(UTILPlugin creator,
126: PlanningFactory ldmf, Plan plan, Task t, Asset asset,
127: int[] aspectarray, double[] resultsarray, double confidence) {
128: return makeAllocation(creator, ldmf, plan, t, asset,
129: aspectarray, resultsarray, confidence,
130: Constants.Role.TRANSPORTER);
131: }
132:
133: }
|