xpansion_configuration
Classes:
-
XpansionConfiguration–Xpansion configuration.
-
XpansionMatrix–Xpansion matrix types.
XpansionConfiguration
XpansionConfiguration(
xpansion_service: BaseXpansionService,
settings: XpansionSettings,
sensitivity: XpansionSensitivity,
candidates: Optional[dict[str, XpansionCandidate]] = None,
constraints: Optional[dict[str, XpansionConstraint]] = None,
)
Xpansion configuration.
Methods:
-
create_candidate–Create a candidate in the current configuration.
-
create_constraint–Create a constraint in the current configuration.
-
delete_candidates–Delete candidates if not referenced inside the sensitivity config.
-
delete_capacity–Delete a capacity file if not referenced in a candidate.
-
delete_constraints–Delete constraints in the current configuration.
-
delete_constraints_file–Delete constraint file.
-
delete_weight–Delete a weight file if not referenced in the settings.
-
get_candidates–Get investments candidates.
-
get_capacity–Get capacities.
-
get_constraints–Get constraints.
-
get_weight–Get weigths.
-
remove_constraints_and_or_weights_from_settings–Remove constraints or weights from settings.
-
remove_links_profile_from_candidate–Remove link profile from candidate.
-
set_capacity–Set capacity.
-
set_weight–Set weigths.
-
update_candidate–Update a candidate in the current configuration.
-
update_constraint–Update a constraint in the current configuration.
-
update_sensitivity–Update sensitivity.
-
update_settings–Update Xpansion settings in this configuration.
Attributes:
-
sensitivity(XpansionSensitivity) –Xpansion sensitivity parameters.
-
settings(XpansionSettings) –Xpansion settings.
Source code in src/antares/craft/model/xpansion/xpansion_configuration.py
create_candidate
create_candidate(candidate: XpansionCandidate) -> XpansionCandidate
Create a candidate in the current configuration.
Parameters:
-
(candidateXpansionCandidate) –The Xpansion candidate.
Source code in src/antares/craft/model/xpansion/xpansion_configuration.py
create_constraint
create_constraint(constraint: XpansionConstraint, file_name: str) -> XpansionConstraint
Create a constraint in the current configuration.
Parameters:
-
(constraintXpansionConstraint) –Xpansion constraint between invested capacities.
-
(file_namestr) –The
.iniconstraint file. See https://antares-xpansion.readthedocs.io/en/stable/user-guide/get-started/settings-definition/#additional-constraints for an example of the constraint file format
Returns:
-
XpansionConstraint–The constraint.
Source code in src/antares/craft/model/xpansion/xpansion_configuration.py
delete_candidates
Delete candidates if not referenced inside the sensitivity config.
Parameters:
Source code in src/antares/craft/model/xpansion/xpansion_configuration.py
delete_capacity
Delete a capacity file if not referenced in a candidate.
Parameters:
-
(file_namestr) –capacity filename
Source code in src/antares/craft/model/xpansion/xpansion_configuration.py
delete_constraints
Delete constraints in the current configuration.
Parameters:
Source code in src/antares/craft/model/xpansion/xpansion_configuration.py
delete_constraints_file
Delete constraint file.
Parameters:
-
(file_namestr) –Name of the constraint file.
Source code in src/antares/craft/model/xpansion/xpansion_configuration.py
delete_weight
Delete a weight file if not referenced in the settings.
Parameters:
-
(file_namestr) –weight filename
Source code in src/antares/craft/model/xpansion/xpansion_configuration.py
get_candidates
get_candidates() -> MappingProxyType[str, XpansionCandidate]
Get investments candidates.
Returns:
-
MappingProxyType[str, XpansionCandidate]–Read-only dictionnary of the investments candidates.
Source code in src/antares/craft/model/xpansion/xpansion_configuration.py
get_capacity
get_capacity(file_name: str) -> DataFrame
Get capacities.
Returns:
-
DataFrame–Xpansion capacity matrix.
get_constraints
get_constraints() -> MappingProxyType[str, XpansionConstraint]
Get constraints.
Returns:
-
MappingProxyType[str, XpansionConstraint]–Read-only dictionnary of Xpansion constraints.
get_weight
get_weight(file_name: str) -> DataFrame
Get weigths.
Returns:
-
DataFrame–Xpansion weight matrix.
remove_constraints_and_or_weights_from_settings
remove_constraints_and_or_weights_from_settings(constraint: bool, weight: bool) -> None
Remove constraints or weights from settings.
Parameters:
-
(constraintbool) –Whether to remove the constraints.
-
(weightbool) –Whether to remove the constraints.
Source code in src/antares/craft/model/xpansion/xpansion_configuration.py
remove_links_profile_from_candidate
remove_links_profile_from_candidate(
name: str, profiles: list[XpansionLinkProfile]
) -> None
Remove link profile from candidate.
Parameters:
-
(namestr) –Name of the candidate.
-
(profileslist[XpansionLinkProfile]) –List of link profiles (
DIRECT_LINK,INDIRECT_LINK,ALREADY_INSTALLED_DIRECT_LINKorALREADY_INSTALLED_INDIRECT_LINK)
Source code in src/antares/craft/model/xpansion/xpansion_configuration.py
set_capacity
Set capacity.
Parameters:
-
(file_namestr) –Filename of the file to create.
-
(seriesDataFrame) –Capacities to put in the file.
Source code in src/antares/craft/model/xpansion/xpansion_configuration.py
set_weight
Set weigths.
Parameters:
-
(file_namestr) –Filename of the file to create.
-
(seriesDataFrame) –Weights to put in the file.
Source code in src/antares/craft/model/xpansion/xpansion_configuration.py
update_candidate
update_candidate(
candidate_name: str, candidate: XpansionCandidateUpdate
) -> XpansionCandidate
Update a candidate in the current configuration.
Parameters:
-
(candidate_namestr) –The Xpansion candidate name to update.
-
(candidateXpansionCandidateUpdate) –The updates parameters and field.
Returns:
-
XpansionCandidate–The updates Xpansion candidate.
Source code in src/antares/craft/model/xpansion/xpansion_configuration.py
update_constraint
update_constraint(
name: str, constraint: XpansionConstraintUpdate, file_name: str
) -> XpansionConstraint
Update a constraint in the current configuration.
Parameters:
-
(namestr) –The name of the constraint.
-
(constraintXpansionConstraintUpdate) –The (partially) updated constraint.
-
(file_namestr) –The constraint file.
Returns:
-
XpansionConstraint–The new constraint.
Source code in src/antares/craft/model/xpansion/xpansion_configuration.py
update_sensitivity
update_sensitivity(sensitivity: XpansionSensitivityUpdate) -> XpansionSensitivity
Update sensitivity.
Parameters:
-
(sensitivityXpansionSensitivityUpdate) –Sensitivity (partial) update.
Returns:
-
XpansionSensitivity–The updated sensitivity parameters.
Source code in src/antares/craft/model/xpansion/xpansion_configuration.py
update_settings
update_settings(settings: XpansionSettingsUpdate) -> XpansionSettings
Update Xpansion settings in this configuration.
Parameters:
-
(settingsXpansionSettingsUpdate) –The settings to update.
Returns:
-
XpansionSettings–The updated settings.
Source code in src/antares/craft/model/xpansion/xpansion_configuration.py
XpansionMatrix
Xpansion matrix types.
Attributes:
-
CAPACITIES–Link profile matrix type.
-
WEIGHTS–Yearly weight matrix type.