File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -837,6 +837,7 @@ class Parameter(BaseModel):
837837 #: Nominal value.
838838 nominal_value : float | None = Field (alias = C .NOMINAL_VALUE , default = None )
839839 #: Parameter scale.
840+ # TODO: keep or remove?
840841 scale : ParameterScale = Field (
841842 alias = C .PARAMETER_SCALE , default = ParameterScale .LIN
842843 )
@@ -902,12 +903,19 @@ def _validate(self) -> Self:
902903 "Estimated parameter must have lower and upper bounds set"
903904 )
904905
905- if self .lb is not None and self .ub is not None and self .lb >= self .ub :
906+ # TODO: also if not estimated?
907+ if (
908+ self .estimate
909+ and self .lb is not None
910+ and self .ub is not None
911+ and self .lb >= self .ub
912+ ):
906913 raise ValueError ("Lower bound must be less than upper bound." )
907914
908915 # TODO parameterScale?
909916
910917 # TODO priorType, priorParameters
918+
911919 return self
912920
913921
Original file line number Diff line number Diff line change @@ -400,6 +400,9 @@ class CheckUniquePrimaryKeys(ValidationTask):
400400 """Check that all primary keys are unique."""
401401
402402 def run (self , problem : Problem ) -> ValidationIssue | None :
403+ # TODO: check that IDs are globally unique
404+ # -- replaces CheckObservablesDoNotShadowModelEntities
405+
403406 # check for uniqueness of all primary keys
404407 counter = Counter (c .id for c in problem .conditions_table .conditions )
405408 duplicates = {id for id , count in counter .items () if count > 1 }
You can’t perform that action at this time.
0 commit comments