Adding eval on rule cause it to run in infinite loop
by brachi
for this Drools Fact Type:
/*
declare DvFacts0
@propertyReactive
IsNUMERIC: Double
condIsNUMERIC: Double
end*/
I have this rule:
/*rule "1"
salience -1
agenda-group "agenda1"
when
$condIsNUMERIC: DvFacts0(eval(condIsNUMERIC == null ) )
$conclusion: DvFacts0( )
then
modify($conclusion){setIsNUMERIC(1.0)};
end*/
the rule hit just one time without the eval clause, adding the eval cause
this rule to run in infinite loop.
have an idea?
put attention that I add @propertyReactive on the DVFacts0 to avoid this.
--
View this message in context: http://drools.46999.n3.nabble.com/Adding-eval-on-rule-cause-it-to-run-in-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Drools Planner: Vehicle routing problems
by davidglassborow
Hi,
as discussed the other day with Ge0ffrey on IRC, I've been trying to
get some vehicle routing done using the new TSP / chaining functionality in
drools planner.
I've written an example, but am having problems with the chaining of jobs
together. After pulling my hair out, I've put together an example into my
fork of planner, showing a simplified example of how I am approaching it,
and the problem that can be replicated.
https://github.com/davidglassborow/drools-planner/tree/vehicle_routing
It is a very simple console app along the same lines as the hello world
example for NQueens.
On running it will print out the chains, and you will see the some Jobs
appear more than once in the same list.
On the planning variable it seems to be get assigned in front of itself,
I've put some notes in the source, and checked that the same doesn't occur
in your TSP example.
I'm not sure if its a bug in the way I've setup things, or whether its an
issue in the chain move code.
Greatly appreciated if anybody in the know gets a chance to have a look.
Thanks,
David
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Planner-Vehicle-routing-problems...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
How can we make the ‘over window:time’ parameter being configurable?
by moonbeam
How can we make the ‘over window:time’ parameter being configurable?
Something similar to the following rule (that does not compile at all). See
the $windowTime variable.
declare TemperatureThreshold
windowTime : String = "30s"
max : long = 70
end
declare SensorReading
@role( event )
temperature : String = "40"
end
rule "Sound the alarm in case temperature rises above threshold"
when
TemperatureThreshold( $max : max, $windowTime : windowTime )
Number( doubleValue > $max ) from accumulate(
SensorReading( $temp : temperature ) over window:time( $windowTime ),
average( $temp ) )
then
// sound the alarm
end
--
View this message in context: http://drools.46999.n3.nabble.com/How-can-we-make-the-over-window-time-pa...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Re: [rules-users] Drools Workbench - VFS Repository Clustering - Workbench Assets Not synched
by Zahid Ahmed
Hi,
Getting following error in console of server B when making any change in Workbench server A
14:44:19,780 ERROR [org.apache.helix.messaging.handling.HelixTask] (pool-18-thread-21) Exception while executing a message. java.lang.NullPointerException msgId: 939154ed-eedb-493f-a803-83883764276a type: USER_DEFINE_MSG: java.lang.NullPointerException
at org.uberfire.metadata.io.IOServiceIndexedImpl.setupWatchService(IOServiceIndexedImpl.java:168) [uberfire-metadata-commons-io-0.3.1.Final.jar:0.3.1.Final]
at org.uberfire.metadata.io.IOServiceIndexedImpl.getFileSystem(IOServiceIndexedImpl.java:126) [uberfire-metadata-commons-io-0.3.1.Final.jar:0.3.1.Final]
at org.uberfire.io.impl.cluster.IOServiceClusterImpl$SyncFileSystemMessageHandler.handleMessage(IOServiceClusterImpl.java:919) [uberfire-io-0.3.1.Final.jar:0.3.1.Final]
at org.uberfire.io.impl.cluster.helix.ClusterServiceHelix$MessageHandlerResolverWrapper$1$1.handleMessage(ClusterServiceHelix.java:289) [uberfire-io-0.3.1.Final.jar:0.3.1.Final]
at org.apache.helix.messaging.handling.HelixTask.call(HelixTask.java:93) [helix-core-0.6.2-incubating.jar:0.6.2-incubating]
at org.apache.helix.messaging.handling.HelixTask.call(HelixTask.java:50) [helix-core-0.6.2-incubating.jar:0.6.2-incubating]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_25]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
14:44:20,506 ERROR [org.apache.helix.messaging.handling.HelixTask] (pool-18-thread-21) Message execution failed. msgId: 939154ed-eedb-493f-a803-83883764276a, errorMsg: null
14:44:20,985 INFO [org.apache.helix.messaging.handling.HelixTaskExecutor] (pool-18-thread-21) message finished: 939154ed-eedb-493f-a803-83883764276a, took 1260
14:44:20,995 INFO [org.apache.helix.manager.zk.CallbackHandler] (ZkClient-EventThread-117-localhost:2199) 117 START:INVOKE /brms-cluster/INSTANCES/nodeTwo_22/MESSAGES listener:org.apache.helix.messaging.handling.HelixTaskExecutor
Regards,
Zahid Ahmed
11 years, 9 months
Drools6 VFS Clustering what to mention in VFS-REPO
by Zahid Ahmed
Hi,
I need to know, what the vfs-repo in below command refers to ? Is it referring to .niogit
helix-admin.bat --zkSvr localhost:2199 --addResource kie-cluster vfs-repo 1 LeaderStandby AUTO_REBALANCE
regards,
Zahid
11 years, 9 months