[Drools Planner] Proof-of-Concept Stock-planning System
by Reinis
Hello,
I want to ask you, guys, if you could guess if it is possible or
probable to build such a System with Drools Planner:
The system shall plan the best time where the transport unit (TU) has to
be input into stock system to reach set delivery deadlines, utilization
of resources and load balancing of bottle necks (all expressed as rules).
Most of things (resource capacity, route within the stock system, etc.)
are given and constant facts. Actually there is only one planning
variable - time interval of a transport unit characterizing retention
period within a given Resource. Like this:
TU#1 is in Resource #A from 11:00 till 11:30 <- the optimal interval has
to be planned
TU#1 is in Resource #B from 11:45 till 12:00 <- the optimal interval has
to be planned
TU#1 is in Resource #C from 12:30 till 13:00 <- the optimal interval has
to be planned
I have following problem size and constraints:
- TUs per day: 160'000
- Amount of resources a TU travel through: 3
- Average smallest time interval: 15 Min
- Planning period: 09:00 - 16:00 = 8 hours = 32 intervals
- Initial planning window: 4-6 hours
- continuous planning multiple batch execution time during the day after
addition and/or retraction of number of TUs: 20 minutes
So the problem size would be(?):
(TUs * resources) ^ intervals = (160'000 * 3) ^ 32 = 6.305500958×10¹⁸¹
I know there is no one answer to this question. I would like only to get
your feeling on this problem. Would you take on solving this sort of
problem with drools planner?
thanks and br
Reinis
14 years, 1 month
drools process flow not firing all rule flow group
by ravendra.gupta
I have segregated my rules in two ruleflow-groups 1. mandatoryRulesGroup and
2. businessRulesGroup, and I want to use them in same given order.
details is below
-------------------------------------------------------------------------------------------
1. #business rule: 09
rule "Earth Station attached to uplinked carriers"
ruleflow-group "mandatoryRulesGroup"
when
$es: EarthStation($esId: id, $esPolarizationId:
earthStationType.feedPolarisationTypeUUIDRef.id)
$cxr: Carrier( $cxrId: id, $cxrPtxpId: potentialTransponderUUIDRef.id)
CarrierCarrierTransmitEarthStationCrossAggregateUUIDAssociation(earthStationId
== $esId)
from $cxr.carrierTransmitEarthStationAssociations
then
insert(new EsLinkedUplinkCxr($es, $cxr)); //
end
--------------------------------------------------------------------------------------------------
2. Rule "Carriers transmitted to transponders on same satellite"
ruleflow-group "businessRulesGroup"
when
$cxr: Carrier()
then
System.out.println("Carriers transmitted fired");
end
-------------------------------------------------------------------------
the problem is if I add only carriers fact then second group execute, but if
I add earth station and Carriers fact second group doesn't execute. looks
like only one group executes
my test file is like below
-------------------------------------------------------------------------------------------------
kbuilder.add(ResourceFactory.newClassPathResource("mandatoryRules.drl"),
ResourceType.DRL);
kbuilder.add(ResourceFactory.newClassPathResource("businessRules.drl"),
ResourceType.DRL);
kbuilder.add(ResourceFactory.newClassPathResource("ruleFlowProcess.bpmn"),
ResourceType.BPMN2);
kSession.insert(testData.cxrRxesTxpSatCons003); //Carrier1
kSession.insert(testData.cxrHpaLimitCons1004); // Carrier2
kSession.insert(testData.esRxesTxpSatCons001);// EarthStation(If I
add this businessRulesGroup not fired!!)
kSession.startProcess("ruleFlowProcess");
kSession.fireAllRules(new AgendaFilter() {........});
-----------------------------------------------------------------------------------------
ruleFlow.bpmn:
<process processType="Private" isExecutable="true" id="ruleFlowProcess"
name="ruleFlowProcess" tns:packageName="ruleFlowProcess" >
<startEvent id="_1" name="Start" />
<businessRuleTask id="_2" name="graphBuilderRuleTask"
g:ruleFlowGroup="graphBuilderRulesGroup" >
</businessRuleTask>
<businessRuleTask id="_4" name="mandatoryRuleTask"
g:ruleFlowGroup="mandatoryRulesGroup" >
</businessRuleTask>
<businessRuleTask id="_5" name="businessRuleTask"
g:ruleFlowGroup="businessRulesGroup" >
</businessRuleTask>
<endEvent id="_6" name="End" >
<terminateEventDefinition/>
</endEvent>
<businessRuleTask id="_7" name="filterRulesTask"
g:ruleFlowGroup="filterRulesGroup" >
</businessRuleTask>
---------------
------------------------------------
I am not able to figure out why both groups not are not being executed even
after I am inserting data to satisfy all of the rules.
I would be grateful, if someone could help me to get the clue.
Thanks very much.
-Ravi
--
View this message in context: http://drools.46999.n3.nabble.com/drools-process-flow-not-firing-all-rule...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 1 month
https://issues.jboss.org/browse/GUVNOR-579
by Sean Su
I see this case has been marked as resolved but without any comment. I am about to start a new project based on fusion but I need a UI such as guvnor. How are we supporting fusion in Guvnor? I could find reference documents on this topic.
Does anyone have experience here?
Thanks
Sean
Sent from my iPad
14 years, 1 month
Using accumulate function
by sanal
Hi,
Iam trying to use the accumulate function of the drools.I need to
accumulate based on the result of a rule execution.
Eg: Suppose i have list of orders and another list of conditions
for a particular package.I need to check weather each of the order is part
of package or not.
Suppose a qty limit is set to 1 for a item in package definition and
the item is ordered 2 times.
While checking the condition, both of the item will go under package.
Actually for second record the rule should get executed based on result of
the 1 record's rule execution and so on.
So I require a looping rule execution.
How can i achive this using Drools.
Rule "Package Rate_21"
salience 65515
when
$objOrderedComponents:AccumulatedComponent()
$packageDefinition:PackageDefinition($packageId:packageId)
$accumulatedQty:Number()
from accumulate(
$accQtyComponent:OrderedComponent(packageChargeRecordId==$packageId, $AccQty
: componentQty) from
$objOrderedComponents.getOrderedComponentList(),sum($AccQty ) )
$orderedComponent:OrderedComponent($id1:componentKey,$qty:componentQty)
from $objOrderedComponents.getOrderedComponentList() and
$pkgComps:PackageComponent(componentKey==$id1,(quantityLmt
>=($qty+$accumulatedQty.intValue()))) from
$packageDefinition.getPackageComponentList()
then
$orderedComponent.setIsComponentApplicable(true);
$orderedComponent.setPackageChargeRecordId($packageId);
end
Regards
Sanal.P
--
View this message in context: http://drools.46999.n3.nabble.com/Using-accumulate-function-tp3896078p389...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 1 month
Guvnor Uploads without Eclipse
by Amin Mohammed-Coleman
Hi
I am currently looking at building a custom maven task that uploads BPMN definitions from a project to a remote Guvnor installation. I was looking at the current Eclipse Guvnor plugin and noticed lots of code around Eclipse (which makes sense :)) . I was wondering whether there was any generic code that I could take a look at without using eclipse dependencies?
Any help would be appreciated.
Thanks
14 years, 1 month