Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes in temporal_network.py #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions temporal_networks/temporal_network.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#from msilib.schema import Error
from queue import PriorityQueue
import json
from statistics import correlation
from xmlrpc.client import Boolean
import copy
from math import inf
Expand Down Expand Up @@ -120,10 +119,18 @@ def sd(self):
def lb(self):
return self.duration_bound["lb"]

@lb.setter
def lb(self, x):
self.duration_bound["lb"] = x

@property
def ub(self):
return self.duration_bound["ub"]

@ub.setter
def ub(self, x):
self.duration_bound["ub"] = x

class Correlation:
"""
Represents a correlation across a number of probabilistic "pstc" type constraints. Given n probabilistic constraints, such that for i = 1,2,...,n,
Expand Down Expand Up @@ -641,4 +648,4 @@ def __init__(self) -> None:
self.correlations = []

def add_correlation(self, constraints: list[Constraint]) -> None:
self.correlations.append(Correlation(constraints))
self.correlations.append(Correlation(constraints))