Ejemplo n.º 1
0
        /// <summary>
        /// Finds the implied (by a constraint) difference between the value of the two nodes as a union of intervals
        /// </summary>
        /// <param name="constraint">The constraint implying the difference</param>
        /// <returns></returns>
        public List <Interval> GetDifferenceIntervals(ConfigurationConstraint constraint)
        {
            // A - BeginOfTime is in [n+1, MAX]
            MetricRelationPart relPartN = constraint.RelationParts[1] as MetricRelationPart;
            Interval           interval = new Interval(relPartN.GetIntValue() + 1, StructuralRelationsManager.MetricDomain.MaxValue); List <Interval> intervals = new List <Interval>();

            intervals.Add(interval);

            return(intervals);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Finds the implied (by a constraint) difference between the value of the two nodes as a union of intervals
        /// </summary>
        /// <param name="constraint">The constraint implying the difference</param>
        /// <returns></returns>
        public List <Interval> GetDifferenceIntervals(ConfigurationConstraint constraint)
        {
            // A - BeginOfTime is in [n, n]
            MetricRelationPart relPartN  = constraint.RelationParts[1] as MetricRelationPart;
            Interval           interval  = new Interval(relPartN.GetIntValue(), relPartN.GetIntValue());
            List <Interval>    intervals = new List <Interval>();

            intervals.Add(interval);

            return(intervals);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Finds the implied (by a constraint) difference between the value of the two nodes as a union of intervals
        /// </summary>
        /// <param name="constraint">The constraint implying the difference</param>
        /// <returns></returns>
        public List <Interval> GetDifferenceIntervals(ConfigurationConstraint constraint)
        {
            // B-A is in [-n, -n]
            MetricRelationPart relPartN  = constraint.RelationParts[2] as MetricRelationPart;
            Interval           interval  = new Interval(-relPartN.GetIntValue(), -relPartN.GetIntValue());
            List <Interval>    intervals = new List <Interval>();

            intervals.Add(interval);

            return(intervals);
        }
 /// <summary>
 /// Creates a new metric relation part with a special value
 /// </summary>
 /// <param name="value">The value. It will e interpretted at runtime
 /// </param>
 public MetricDomainRelationPart(SpecialMetricValue value)
 {
     this.relPart = new MetricRelationPart((int)value, StructuralRelationsManager.MetricDomain);
 }
 /// <summary>
 /// Creates a new metric relation part
 /// </summary>
 /// <param name="value">The metric value.
 /// </param>
 /// <param name="metricDomainVal">The Domain for the value</param>
 public MetricDomainRelationPart(int value, GKOIntDomain metricDomainVal)
 {
     this.relPart = new MetricRelationPart(value, metricDomainVal);
 }