Skip to content

Commit

Permalink
fix emulation model updating
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-lara committed Sep 21, 2024
1 parent 244a857 commit 1b09906
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/operation/operation_model_simulation_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function update_model!(model::OperationModel, source::SimulationState, ini_cond_
end

function update_parameters!(model::EmulationModel, state::SimulationState)
data = get_system_states(state)
data = get_decision_states(state)
update_parameters!(model, data)
return

Check warning on line 14 in src/operation/operation_model_simulation_interface.jl

View check run for this annotation

Codecov / codecov/patch

src/operation/operation_model_simulation_interface.jl#L11-L14

Added lines #L11 - L14 were not covered by tests
end
Expand Down
4 changes: 2 additions & 2 deletions src/parameters/update_container_parameter_values.jl
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ function _update_parameter_values!(
state::DatasetContainer{InMemoryDataset},
) where {T <: Union{JuMP.VariableRef, Float64}, U <: PSY.Component}
current_time = get_current_time(model)
@show state_values = get_dataset_values(state, get_attribute_key(attributes))
state_values = get_dataset_values(state, get_attribute_key(attributes))
component_names, _ = axes(parameter_array)
state_data = get_dataset(state, get_attribute_key(attributes))
state_timestamps = state_data.timestamps
Expand All @@ -325,7 +325,7 @@ function _update_parameter_values!(
"The value for the system state used in $(encode_key_as_string(get_attribute_key(attributes))): $(value) is out of the [0, 1] range",
)
end
_set_param_value!(parameter_array, value, name, t)
_set_param_value!(parameter_array, value, name, 1)
end
return

Check warning on line 330 in src/parameters/update_container_parameter_values.jl

View check run for this annotation

Codecov / codecov/patch

src/parameters/update_container_parameter_values.jl#L328-L330

Added lines #L328 - L330 were not covered by tests
end
Expand Down

0 comments on commit 1b09906

Please sign in to comment.