public void Add(DomainHypothesis domHyp)
        {
            if (DomainHypotheses.ContainsKey(domHyp.Identifier))
            {
                throw new ArgumentException(string.Format("Domain hypothesis identifier already exist: {0}", domHyp.Identifier));
            }

            DomainHypotheses.Add(domHyp.Identifier, domHyp);
        }
        public override void BuildDeclare(ParsedDeclare parsedElement, KAOSModel model)
        {
            DomainHypothesis g = model.domainRepository.GetDomainHypothesis(parsedElement.Identifier);

            if (g == null)
            {
                g = new DomainHypothesis(model, parsedElement.Identifier);
                model.domainRepository.Add(g);
            }
            else if (!parsedElement.Override)
            {
                throw new BuilderException("Cannot declare twice the same element. Use override instead.", parsedElement);
            }
        }
        public BDDNode GetObstructionSet(DomainHypothesis domhyp)
        {
            int idx;

            if (_mapping.ContainsKey(domhyp))
            {
                idx = _mapping[domhyp];
            }
            else
            {
                idx = _manager.CreateVariable();
                _mapping.Add(domhyp, idx);
                _rmapping.Add(idx, domhyp);
            }
            return(_manager.Create(idx, _manager.One, _manager.Zero));
        }
 protected void Render(DomainHypothesis domHyp)
 {
     AddHomeShape(domHyp.Identifier, domHyp.FriendlyName,
                  1, 1, 0.92156862745, 0.92156862745);
 }
Exemple #5
0
 public virtual double Sample(DomainHypothesis domprop)
 {
     return(_model.satisfactionRateRepository.GetDomHypothesisSatisfactionRate(domprop.Identifier).Sample());
 }
Exemple #6
0
 ISatisfactionRate GetESR(DomainHypothesis o)
 {
     return(o.LatestEPS());
 }