Questions tagged [rules]

This tag is very broad, try being more specific by using tags relevant to your problem. Examples are "rule-engine" for rules engines, "url-rewriting"/"mod-rewrite" for rewrite rules or "form-validation" for validation rules. See the full wiki article for a more complete list.

Rules are used to describe a requirement for data or behavior in software.

If a more specific tag exists for the subject of your question, please use that tag to better contact experts familiar with that technology.

1666 questions
0
votes
1 answer

Why do my fuzzy rules not fire?

I have created a fuzzy rulebase for a project.I am currently testing to see if the rules work. I am trying to explicitly test Rule 7 from the below given rules (though the fuzzy controller has all the rules written in them). RULE 7 : IF…
Kripa Jayakumar
  • 891
  • 9
  • 16
0
votes
1 answer

AI - How to concisely generate all possible results based on rules

I have a problem as follows: One room can hold 13 people, one 9, and another 4. Rooms all start out empty 0 0 0 and can be filled to their capacity OR the contents of one room can be transferred into another. So, for a situation like 13 0 0, the 13…
jonbon
  • 1,142
  • 3
  • 12
  • 37
0
votes
2 answers

Yii framework validation rules

I am using Yii 1 for my project. I have 5 fields in a form, which must be filled. There's no problem with that - a simple validation rule in model. However, there is one more field, which is not required. But if it is filled, other 5 fields must…
Ben
  • 99
  • 2
  • 6
0
votes
2 answers

Finding the best 3 elements in a collection in Drools

Let's say I have some numbers in the working memory, and in a rule I need to check that the 3 higher numbers have a property (that they are all odd for example), how would you write that in pure Drools? I could collect all the numbers in a list and…
Francesco
  • 857
  • 1
  • 11
  • 26
0
votes
2 answers

How to give validation rules in Yii to upload all file other then (.php, aspx, .cs etc)

return array( array('speech', 'required'), array('speech,document,speech_on,created_on, updated_on,inactive','safe') array('document','file','restrict','types'=>'.php,.aspx,.cs', 'maxSize'=>1024*1024*2,'tooLarge'=>'Size should be less then…
Umashankar Saw
  • 1,131
  • 1
  • 9
  • 25
0
votes
1 answer

Logic OR in a DSL

I have a question around how to do an or in a DSLR, I have this rule: rule "Test" when There is AThing - with attribute1 is equal to something1 - attribute2 is higher than or equal to somethingelse1 There is…
Francesco
  • 857
  • 1
  • 11
  • 26
0
votes
1 answer

Force optaplanner to break specific rules

how to force optaplanner to break specific rules and pass specific rules out of a given set of rules. I tried to put a high negative score on the rules that have to pass but no luck. Also salience did not work. If 2 specific rules are broken the…
jaya
  • 11
  • 1
0
votes
1 answer

Always call Laravel's extended validation method

I've created a class that extends LaravelValidatior and a method that needs to check some rules. For example class ExtendLaravelValidator extends LaravelValidator { public function validateRequiredIfSomething($attribute, $value, $parameters) …
Filip Zelic
  • 110
  • 10
0
votes
1 answer

Drools rules import with wildcard

I am working with Drools rules. Some developers have created rules which I have to put on Guvnor (rules repository) and build packages. In these rules they have import statements with wildcards, for example: import org.drools.runtime.rule.*; When I…
azec-pdx
  • 4,790
  • 6
  • 56
  • 87
0
votes
1 answer

Independent DSL files in Drools

I am using Drools 6.1.0.Final. I have 3 sets of rules, created with 3 different DSL files. Now, it seems that for every dslr file I create, all the DSL files are loaded into his scope, so if there are overlapping dsl definition in 2 different DSL…
Francesco
  • 857
  • 1
  • 11
  • 26
0
votes
0 answers

Complex, configurable logic or rules

This is one of those wishy-washy questions but hopefully will lead to some good answers as I think the issues comes up often. I am building a subscription based platform/site where people are able to setup their own services with unique rules. There…
cmptrwizard
  • 338
  • 4
  • 9
0
votes
1 answer

Drools dslr - passing a list

In a dslr, can you pass a list of values to a condition or Drools is limited to one single value? I would like to write something like: [condition][]The customer firstName is in this list {nameList}=... instead of [condition][]The customer…
Francesco
  • 857
  • 1
  • 11
  • 26
0
votes
2 answers

Htaccess rewrite rule and condition

We are now using OpenCart and domain aliasses in DirectAdmin. We now have some rules in our htaccess for redirecting non www to www and non https to https. But this rule is for all domains. We only want to use it for example-1.com How can we do…
user4445866
0
votes
1 answer

Not able to use execute php in my rule in hosted environment

I use a drupal 7 installation. On my localhost dev environment i had no trouble importing rules. Now that i am on a hosting environment i am not able to import a certain rule using "execute php". I am also unable to create the rule myself pasting…
user25765
  • 43
  • 1
  • 5
0
votes
1 answer

Complex conditional element in accumulate in Jess rules

I am trying to find average value of temperature observations in JessTab which requires joining facts from multiple classes. The following rule: (defrule averageOfObsValue ?res <- (accumulate (progn (bind ?s 0)(bind ?n 0)) (progn (bind…
Edi
  • 109
  • 11
1 2 3
99
100