Cell Factory
Cell Factory Reference#
create_cell(cell_type, params)
#
Create a validated cell instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cell_type
|
Union[str, CellType]
|
Cell type (string or enum) |
required |
params
|
Dict[str, Any]
|
Dictionary of cell parameters. |
required |
Returns:
| Type | Description |
|---|---|
BaseCell
|
BaseCell instance. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If validation fails. |
Source code in SMS_BP/cells/cell_factory.py
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |
validate_cell_parameters(cell_type, params)
#
Validate parameters for a given cell type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cell_type
|
Union[str, CellType]
|
The cell type (string or enum) |
required |
params
|
Dict[str, Any]
|
Dictionary of parameters |
required |
Returns:
| Type | Description |
|---|---|
Tuple[bool, List[str]]
|
Tuple of (is_valid, error_messages) |
Source code in SMS_BP/cells/cell_factory.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | |