public void testFiveRules()
        {
            int       objCount = 25000;
            Random    ran      = new Random();
            ArrayList facts    = new ArrayList();

            // loop and create account and transaction objects
            for (int idx = 0; idx < objCount; idx++)
            {
                Account4 acc = new Account4();
                acc.AccountId   = "acc" + idx;
                acc.AccountType = Convert.ToString(ran.Next(100000));
                acc.First       = Convert.ToString(ran.Next(100000));
                acc.Last        = Convert.ToString(ran.Next(100000));
                acc.Middle      = Convert.ToString(ran.Next(100000));
                acc.Status      = Convert.ToString(ran.Next(100000));
                acc.Title       = Convert.ToString(ran.Next(100000));
                acc.Username    = Convert.ToString(ran.Next(100000));
                acc.CountryCode = "US";
                acc.Cash        = 1298.00;
                facts.Add(acc);
                Transaction tx = new Transaction();
                tx.AccountId = "acc" + idx;
                tx.Total     = 1200000;
                facts.Add(tx);
            }
            Console.WriteLine("created " + objCount + " Accounts and Transactions");
            Rete engine = new Rete();

            engine.declareObject(typeof(Account4));
            engine.declareObject(typeof(Transaction));
            Console.WriteLine("delcare the objects");
            engine.close();
        }
Exemple #2
0
 public void testFiveRules()
 {
     int objCount = 25000;
     Random ran = new Random();
     ArrayList facts = new ArrayList();
     // loop and create account and transaction objects
     for (int idx = 0; idx < objCount; idx++)
     {
         Account4 acc = new Account4();
         acc.AccountId = "acc" + idx;
         acc.AccountType = Convert.ToString(ran.Next(100000));
         acc.First = Convert.ToString(ran.Next(100000));
         acc.Last = Convert.ToString(ran.Next(100000));
         acc.Middle = Convert.ToString(ran.Next(100000));
         acc.Status = Convert.ToString(ran.Next(100000));
         acc.Title = Convert.ToString(ran.Next(100000));
         acc.Username = Convert.ToString(ran.Next(100000));
         acc.CountryCode = "US";
         acc.Cash = 1298.00;
         facts.Add(acc);
         Transaction tx = new Transaction();
         tx.AccountId = "acc" + idx;
         tx.Total = 1200000;
         facts.Add(tx);
     }
     Console.WriteLine("created " + objCount + " Accounts and Transactions");
     Rete engine = new Rete();
     engine.declareObject(typeof (Account4));
     engine.declareObject(typeof (Transaction));
     Console.WriteLine("delcare the objects");
     engine.close();
 }