You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you'd like you track it using a different attribute, you could do that using the `model_attribute` argument while initializing the `Machine`.
350
+
If you'd like you can choose your own state attribute name by passing the `model_attribute` argument while initializing the `Machine`. This will also change the name of `is_«state name»()` to `is_«model_attribute»_«state name»()` though. This is done to allow multiple machines to work on the same model with individual state attribute names.
# with a custom 'model_attribute', states can also be checked like this:
358
+
lump.is_matter_state_solid()
359
+
>>>True
357
360
```
358
361
359
362
#### <aname="enum-state"></a>Enumerations
@@ -963,18 +966,23 @@ machine.add_model(Matter())
963
966
machine.add_model(Matter(), initial='liquid')
964
967
```
965
968
966
-
Models with multiple states could attach multiple machines using different `model_attribute` values:
969
+
Models with multiple states could attach multiple machines using different `model_attribute` values. As mentioned in [Checking state](#checking-state), this will add custom `is_<model_attribute>_<state_name>` functions:
0 commit comments