Source code for NaxToPy.Core.Classes.N2PSet

"""File where the class Set is defined"""


[docs] class N2PSet: """Class with the information of a set kept in the model.""" __slots__ = ( "__info" ) # Constructor of the N2PSet ---------------------------------------------------------------------------------------- def __init__(self, info): """N2PSet Constructor""" self.__info = info # ------------------------------------------------------------------------------------------------------------------ # Property for ID -------------------------------------------------------------------------------------------------- @property def IDSet(self) -> int: """ID of the set defined in the model""" return int(self.__info.IDSet) # ------------------------------------------------------------------------------------------------------------------ # Property for ID -------------------------------------------------------------------------------------------------- @property def Part(self) -> str: """ID of the set defined in the model""" return str(self.__info.PartID) # ------------------------------------------------------------------------------------------------------------------ # Property for ID -------------------------------------------------------------------------------------------------- @property def Name(self) -> str: """ID of the set defined in the model""" return str(self.__info.Name) # ------------------------------------------------------------------------------------------------------------------ # Property for ID -------------------------------------------------------------------------------------------------- @property def SetType(self) -> str: """ID of the set defined in the model""" return str(self.__info.Type.ToString()) # ------------------------------------------------------------------------------------------------------------------ # Property for ID -------------------------------------------------------------------------------------------------- @property def UserDefined(self) -> bool: """ID of the set defined in the model""" return bool(self.__info.UserDefined) # ------------------------------------------------------------------------------------------------------------------ # Property for ID -------------------------------------------------------------------------------------------------- @property def IDs(self) -> list: """ID of the set defined in the model""" return list(self.__info.IDs)
# ------------------------------------------------------------------------------------------------------------------