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
The add method of the LoadCombinations class currently lacks an optional parameter for specifying the criteria. This results in a discrepancy between the output generated by the Python package and the expected input format for the API solver.
class LoadCombinations(ModelCollectionComponent):
"""Creates an instance of the SkyCiv LoadCombinations class.
"""
def add(self, name: str, combination_factors: dict) -> int:
"""Adds a new load combination.
Args:
name (str): The name of the load combination.
combination_factors (dict): Key value pairs for the factors to apply to the load groups.
Returns:
int: The ID of the created load combination.
Example::
lcs = LoadCombinations()
factors = {
"SW": 1,
"windCase": 1,
"liveLoad": 1.5
}
lcs.add("LC1", factors)
"""
next_index = next_object_key(self)
lc = LoadCombination(name, combination_factors)
setattr(self, str(next_index), lc)
return next_index
This gives te following input for the solver, resulting from the python package.
Whilst the api solver expects something like this:
"1": {
"name": "LC1",
"criteria": "strength"
},
Possible solution:
class LoadCombinations(ModelCollectionComponent):
"""Creates an instance of the SkyCiv LoadCombinations class.
"""
def add(self, name: str, combination_factors: dict, criteria: str = None) -> int:
"""Adds a new load combination.
Args:
name (str): The name of the load combination.
combination_factors (dict): Key value pairs for the factors to apply to the load groups.
criteria (str, optional): The criteria for the load combination (e.g., 'strength', 'serviceability'). Defaults to None.
Returns:
int: The ID of the created load combination.
Example::
lcs = LoadCombinations()
factors = {
"SW": 1,
"windCase": 1,
"liveLoad": 1.5
}
lcs.add("LC1", factors, criteria="strength")
"""
next_index = next_object_key(self)
lc = LoadCombination(name, combination_factors, criteria)
setattr(self, str(next_index), lc)
return next_index
The text was updated successfully, but these errors were encountered:
Problem
The add method of the LoadCombinations class currently lacks an optional parameter for specifying the criteria. This results in a discrepancy between the output generated by the Python package and the expected input format for the API solver.
This gives te following input for the solver, resulting from the python package.
Whilst the api solver expects something like this:
Possible solution:
The text was updated successfully, but these errors were encountered: