zeus.actors
Class ProducedDb
java.lang.Object
zeus.actors.ProducedDb
- public class ProducedDb
- extends java.lang.Object
The Produced Resources Database is an internal storage component used by
the Planner in the course of its activities. It is unlikely
that developers will need to call these methods directly.
|
Method Summary |
void |
add(int effect_position,
EffectChain ch)
|
void |
add(int effect_position,
PlanRecord parent,
int amount,
java.lang.String goal_id,
boolean consumed)
|
protected void |
allocatePostcondition(int position,
Fact[] input)
|
void |
allocatePostconditions(Fact[][] fact)
|
int |
anySideEffect(int effect_position,
PlanRecord parent,
java.lang.Object precond,
int required)
|
protected int |
availableItems(int position,
int start,
boolean consumed)
|
protected boolean |
checkConsumers(int start,
int amount,
boolean consumed,
java.util.Vector temp)
|
protected boolean |
checkCurrent(int available,
java.util.Vector current,
int start,
boolean consumed,
int amount)
|
boolean |
constrain(Bindings bindings)
|
void |
debug(java.lang.String str)
|
java.lang.String |
firstKey()
|
PlanRecord |
firstParent()
|
int |
firstPosition(PlanRecord parent)
|
java.util.Vector |
getAllParents()
|
PlanRecord |
getOwner()
|
void |
hardChain(int effect_position,
int required,
PlanRecord parent,
int precond_position)
|
void |
hardChain(int effect_position,
java.lang.String key,
int amount,
int start,
boolean consumed)
|
boolean |
hasAtMostOneParent(PlanRecord parent,
java.lang.String key)
|
int |
noItemsProduced(int position)
|
void |
notifyFailed(java.util.Vector Tasks,
java.util.Vector path)
|
boolean |
references(PlanRecord parent)
|
void |
remove(int effect_position,
PlanRecord parent,
int precond_position,
int amount)
|
boolean |
replaceOrAdd(java.lang.String key,
java.lang.String newKey,
int start,
int amount,
boolean consumed)
|
boolean |
setConsumers(java.lang.String key,
java.util.Vector input)
|
void |
share(ProducedDb db,
PlanRecord parent_image,
java.lang.String key_image,
PlanRecord parent,
java.lang.String key)
|
void |
softNotifyFailed(java.util.Vector Tasks,
java.util.Vector path,
PlannerQueryStruct struct,
int mode)
|
java.lang.String |
toString()
|
boolean |
update(PlanRecord image,
PlanRecord record)
|
boolean |
update(java.lang.String image,
java.lang.String key)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
data
protected java.util.Vector[] data
produced
protected int[] produced
owner
protected PlanRecord owner
ProducedDb
public ProducedDb()
ProducedDb
public ProducedDb(PlanRecord owner,
PrimitiveTask task)
add
public void add(int effect_position,
PlanRecord parent,
int amount,
java.lang.String goal_id,
boolean consumed)
add
public void add(int effect_position,
EffectChain ch)
noItemsProduced
public int noItemsProduced(int position)
availableItems
protected int availableItems(int position,
int start,
boolean consumed)
anySideEffect
public int anySideEffect(int effect_position,
PlanRecord parent,
java.lang.Object precond,
int required)
hardChain
public void hardChain(int effect_position,
int required,
PlanRecord parent,
int precond_position)
hardChain
public void hardChain(int effect_position,
java.lang.String key,
int amount,
int start,
boolean consumed)
allocatePostconditions
public void allocatePostconditions(Fact[][] fact)
allocatePostcondition
protected void allocatePostcondition(int position,
Fact[] input)
constrain
public boolean constrain(Bindings bindings)
getOwner
public PlanRecord getOwner()
share
public void share(ProducedDb db,
PlanRecord parent_image,
java.lang.String key_image,
PlanRecord parent,
java.lang.String key)
update
public boolean update(PlanRecord image,
PlanRecord record)
update
public boolean update(java.lang.String image,
java.lang.String key)
replaceOrAdd
public boolean replaceOrAdd(java.lang.String key,
java.lang.String newKey,
int start,
int amount,
boolean consumed)
hasAtMostOneParent
public boolean hasAtMostOneParent(PlanRecord parent,
java.lang.String key)
remove
public void remove(int effect_position,
PlanRecord parent,
int precond_position,
int amount)
references
public boolean references(PlanRecord parent)
firstParent
public PlanRecord firstParent()
firstKey
public java.lang.String firstKey()
firstPosition
public int firstPosition(PlanRecord parent)
getAllParents
public java.util.Vector getAllParents()
notifyFailed
public void notifyFailed(java.util.Vector Tasks,
java.util.Vector path)
softNotifyFailed
public void softNotifyFailed(java.util.Vector Tasks,
java.util.Vector path,
PlannerQueryStruct struct,
int mode)
toString
public java.lang.String toString()
setConsumers
public boolean setConsumers(java.lang.String key,
java.util.Vector input)
checkConsumers
protected boolean checkConsumers(int start,
int amount,
boolean consumed,
java.util.Vector temp)
checkCurrent
protected boolean checkCurrent(int available,
java.util.Vector current,
int start,
boolean consumed,
int amount)
debug
public void debug(java.lang.String str)
Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.