core package
Subpackages
Submodules
core.config module
Configurations of parameters, initial conditions, and default models for a given simulation.
- class core.config.Config(parameters: typing.Dict, initial_condition: typing.Dict, models: typing.List[utils.constants.ModelEnum] = [<ModelEnum.AttitudeModel: 'att'>, <ModelEnum.PositionModel: 'pos'>])
Bases:
objectRepresentation of the parameters and initial conditions of the simulation. This module depends on parameters.py, models.py, and state.py. The variation in performance of different runs of the simulation depends on the variation of config. This class is frozen, so it cannot be changed.
- __init__(parameters: typing.Dict, initial_condition: typing.Dict, models: typing.List[utils.constants.ModelEnum] = [<ModelEnum.AttitudeModel: 'att'>, <ModelEnum.PositionModel: 'pos'>])
- classmethod make_config(path_str: str)
make_config creates a config object from json file in the proposed location.
It is dependent on state.py, and parameters.py. Changes in these files will affect this method. It will be used by main.py. Changes in this method might affect the functionality of Main.
To construct a json file, consult schema.json and example.json in the ‘configs’ folder. All properties are optional, default values will be inserted if a field is not specified. However, if a property is specified its type and format has to be correct.
Raises: JsonError if json file is not well defined.
- exception core.config.JsonError
Bases:
Exception
- exception core.config.MutationException
Bases:
Exception
core.parameters module
- class core.parameters.Parameters(param_dict: Dict = {})
Bases:
objectThis is a container class for all parameters as defined in this sheet: https://cornell.box.com/s/z20wbp66q0pseqievmadf515ucd971g2.
- __init__(param_dict: Dict = {})
core.sim module
- class core.sim.CislunarSim(config: core.config.Config)
Bases:
objectThis class consolidates all parts of the sim (config, models, state). It is responsible for stepping the sim and checking stop conditions.
- __init__(config: core.config.Config) None
- should_stop() bool
Returns true if our state reaches a condition that should stop the sim
- Returns
Whether the sim should be stopped
- Return type
bool
- step() core.state.statetime.PropagatedOutput
Evaluates all models and propagates state :returns: The true and observed states resulting from this step :rtype: PropagatedOutput