Maarten Wiltink pisze:
>>
>> I have about 300 variables (working data area) and a about 200 rules
>> (maybe more later).
>
> Peanuts.
>
> Still, make it work with 2 variables and 2 rules first.
>
Those numbers were to show that the data won't be huge.... anyway better
doing it right and expandable from the beginning
> Sides can be an expression, an expression can be a variable, constant,
> or operator applied to its own 'sides' (operands). Basic compiler stuff.
Yes of course, I forgot to write expressions, but I'm considering them
>> What is the best structure for each of these elements?
> [...]
>> 8) Rules - objects?
>
> Everything - objects.
Why objects for everything? What about the variable definition? Why
should I use an object here? Why is it better than a record? A variable
definiton has no functionality, just keeps a description of the data
> You have an idea of the 'things' you want to work with, and what they
> should do. Excellent! Now write down the things as class types, and what
> they should do as methods.
Almost :) I'm still working on the rule conditions structure. It seems
the hardest part to me.
>> The variables and the rules should have a fast access for the inference
>> engine to evaluate and easy to access to their data for UI.
>
> No, they should not. Make it work first. Make it work fast later.
> Then, you're likely to find that it works fast enough at the first try.
That remark was about the data structure choice. If I have a choice I
should choose the best for speed and usability. But you didn't give me a
choice... just objects :)
>
> It sounds like a nice project. You've done your homework. Now just dive
> in, and have fun with it.
Thanks for your help and sup****t, I'm really in deep water
Enrico


|