[rules-users] R: [planner] taboo list question
Geoffrey De Smet
ge0ffrey.spam at gmail.com
Sat Feb 6 03:33:57 EST 2010
Macro
You're making it way to complicated I think :)
You can probably revert all that fancy stuff and just do:
class MyMove ... {
private A a;
private B b;
private C c;
// I think this is what you need
// It's tabu if the other Move has a AND b
public Collection<? extends Object> getTabuProperties() {
return Collections.<Object>singletonList(
Arrays.<Object>asList(a, b));
}
// my former proposal which isn't what you need apparently
// It's tabu if the other Move has a OR b
public Collection<? extends Object> getTabuProperties() {
return Arrays.<Object>asList(a, b);
}
}
Is "tabu on a AND b" what you need?
If not, add a jira and explain the use case thoroughly and I 'll try to
take a look :)
With kind regards,
Geoffrey De Smet
dmzpippo-drools at yahoo.it schreef:
> Hi Geoffrey,
>
> Today I tried to follow the process for selecting a tabu move through
> propertytabuList. correct me if I misunderstood:
>
> * Make a move
> * Create a collection of objects through the method getTabuProperties()
>
> * In the class AbstractTabuAccepter I check if at least one of these
> objects is contained in propertyTabuList. in this case the move is
> considered taboo (unless the aspiration criteria). [These objects
> are called from the method findTabu(moveScope) of Class
> PropertyTabuAccepter]
>
> * When I chose the move to do for the current step, I insert in
> propertyTabuList objects generated by the method
> getTabuProperties() [these objects are called from the method
> findNewTabu(stepScope) of Class PropertyTabuAccepter]
>
> In this way, however, are not able to decide when I make a move which
> other moves I considered taboo.
> For giving me this opportunity I'm trying a new way.
> I tried to change :
>
> * the interface TabuPropertyEnabled adding a method
> representationMove()
> * the method findTabu(moveStep) of Class PropertyTabuAccepter
> internally calls representationMove().
>
> In this way the cycle of selecting a move would be:
>
> * Make a move
> * create a representation of the move with the method
> representationMove()
> * if this representation is contained in propertyTabuList the move
> is considered taboo (unless the aspiration criterion). [These
> objects are called from the method findTabu(moveScope) of Class
> PropertyTabuAccepter]
> * When I chose the move to do for the current step, I insert in
> propertyTabuList objects generated by the method
> getTabuProperties() [these objects are called from the method
> findNewTabu(stepScope) of Class PropertyTabuAccepter]
>
> Recalling the example that you had posted yesterday
> If for example I have 5 vehicles and 20 customer and I want to move the
> customer 6 from the vehicle 0 to vehicle 1, then:
>
> * (6,0,1) => is the representation of the move [generated by
> representationMove()]
>
> * (6,1,0), (6,2,0), (6,3,0), (6,4,0) => are the moves that I want I
> considered taboo. [generated by getTabuProperties()]
>
>
> By the first tests I noticed that in this way avoids the situation where
> at an step I make a move and at the one after a back move. Next week I
> will have to do some more detailed tests.
>
> regards,
> Marco
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
More information about the rules-users
mailing list