| 161 | |
| 162 | |
| 163 | class Boolean(ScalarVariable): |
| 164 | def __init__(self, name: str, start: Optional[Any] = None, **kwargs): |
| 165 | super().__init__(name, **kwargs) |
| 166 | self.__attrs = {"start": start} |
| 167 | |
| 168 | @property |
| 169 | def start(self) -> Optional[Any]: |
| 170 | return self.__attrs["start"] |
| 171 | |
| 172 | @start.setter |
| 173 | def start(self, value: float): |
| 174 | self.__attrs["start"] = value |
| 175 | |
| 176 | def to_xml(self) -> Element: |
| 177 | attrib = dict() |
| 178 | for key, value in self.__attrs.items(): |
| 179 | if value is not None: |
| 180 | attrib[key] = str(value).lower() |
| 181 | parent = super().to_xml() |
| 182 | SubElement(parent, "Boolean", attrib) |
| 183 | |
| 184 | return parent |
| 185 | |
| 186 | |
| 187 | class String(ScalarVariable): |
no outgoing calls