Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/examples_src/orbital_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def plot_traj(sim, x_idx=0, y_idx=2):
for pos_vel, cov in zip(sim.x.T.squeeze(), sim.C.T):
pos = pos_vel[[x_idx, y_idx]]
C = cov[[x_idx, y_idx]][:, [x_idx, y_idx]]
lambda_, v = np.linalg.eig(C)
lambda_, v = np.linalg.eigh(C)
lambda_ = np.sqrt(lambda_)

ellipse = Ellipse(
Expand Down
11 changes: 10 additions & 1 deletion src/condor/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class BaseModelMetaData:
options: object = None

inherited_methods: dict = dc.field(default_factory=dict)
is_template: bool = False

# assembly/component can also get children/parent
# assembly/components get inheritance rules? yes, submodels don't need it -- only
Expand Down Expand Up @@ -891,7 +892,9 @@ def __prepare__(
)
is not None
):
meta = user_model_metclass.metadata_class(model_name=model_name)
meta = user_model_metclass.metadata_class(
model_name=model_name, is_template=as_template
)
# actually creating a model template, TODO at some point tap into
# inheritance tree for now nothing fails this check
if as_template:
Expand Down Expand Up @@ -1463,6 +1466,8 @@ def bind_embedded_models(self):
}
)

self.update_model_assignments(model_assignments)

for (
embedded_model_ref_name,
embedded_model_instance,
Expand Down Expand Up @@ -1490,6 +1495,9 @@ def bind_embedded_models(self):

bound_embedded_model.bind_embedded_models()

def update_model_assignments(self, model_assignments):
return

def bind_input_as_embedded(
self,
parent_instance,
Expand Down Expand Up @@ -1537,6 +1545,7 @@ def bind_output_as_embedded(self, parent_instance, bound_embedded_model):
if isinstance(sym_bound_field, FieldValues) and isinstance(
ran_bound_field, FieldValues
):
# TODO: sym_bound_field_dict is really just list_of?
sym_bound_field_dict = dc.asdict(sym_bound_field)
ran_bound_field_dict = dc.asdict(ran_bound_field)
assignment_updates.update(
Expand Down
Loading