mario.Database.update_scenarios
- Database.update_scenarios(scenario, **matrices)
Updates the matrices for a specific scenario.
Note
using update scenarios, will update only the matrices passed. In case, that the update, impacts other matrices, this should be done manually using update_scenarios and updating other matrices or reseting the datbases using reset_to_flows or reset_to_coefficients and recalculate the matrices based on the inputs.
- Parameters:
scenario (str) – the name of the scenario
matrices (pd.DataFrame) – dict of the matrices as dataframes (keys are the name of the matrices and values are the DataFrames)
Example
To update the z and v matrices in example object for scenario baseline with new_z and new_v
example.update_scenarios(scenario='baseline',z=new_z,v=new_v)