-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added class to handle various setup statuses
- Loading branch information
Showing
4 changed files
with
46 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,25 @@ | ||
"""File to define different setup status constants.""" | ||
|
||
# PRE_SETUP: Newly initialized problem or newly added model. | ||
# POST_CONFIGURE: Configure has been called. | ||
# POST_SETUP: The `setup` method has been called, but vectors not initialized. | ||
# POST_FINAL_SETUP: The `final_setup` has been run, everything ready to run. | ||
|
||
PRE_SETUP = 0 | ||
POST_CONFIGURE = 1 | ||
POST_SETUP = 2 | ||
POST_FINAL_SETUP = 3 | ||
from enum import IntEnum | ||
|
||
|
||
class _SetupStatus(IntEnum): | ||
""" | ||
Class used to define different states of the setup status. | ||
Attributes | ||
---------- | ||
PRE_SETUP : int | ||
Newly initialized problem or newly added model. | ||
POST_CONFIGURE : int | ||
Configure has been called. | ||
POST_SETUP : int | ||
The `setup` method has been called, but vectors not initialized. | ||
POST_FINAL_SETUP : int | ||
The `final_setup` has been run, everything ready to run. | ||
""" | ||
|
||
PRE_SETUP = 0 | ||
POST_CONFIGURE = 1 | ||
POST_SETUP = 2 | ||
POST_FINAL_SETUP = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters