Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: market bid example error #1187

Open
ktehranchi opened this issue Sep 9, 2024 · 0 comments
Open

docs: market bid example error #1187

ktehranchi opened this issue Sep 9, 2024 · 0 comments
Assignees

Comments

@ktehranchi
Copy link

ktehranchi commented Sep 9, 2024

I noticed an error with the example on adding a market bid- the example defines a variable cost without an explicit CostCurve structure (PieceWiseStepData).

The docs for set_variable_cost! specify that data::Union{Nothing, TimeSeriesData, CostCurve{PiecewiseIncrementalCurve}} . The example in the docs does not use a CostCurve and throws an error.

However when I was testing different CostCurves, I found only PiecewiseStepData would function properly. I updated the docs with what worked for me.

These are the three CostCurves I tested:

IncrementalCurve(PiecewiseStepData([1.0, 2.0, 3.0], [4.0, 6.0]), 20.0)
PiecewiseIncrementalCurve(20.0, [1.0, 2.0, 3.0], [4.0, 6.0])
PiecewiseStepData([1.0, 2.0, 3.0], [24.0, 26.0])

Error for PiecewiseIncrementalCurve case:

julia> set_variable_cost!(sys, generator, time_series_data)
ERROR: TypeError: in _process_set_cost, expected PiecewiseStepData, got Type{PiecewiseIncrementalCurve}
Stacktrace:
 [1] _process_set_cost(::Type{CostCurve{PiecewiseIncrementalCurve}}, ::Type{PiecewiseStepData}, sys::System, component::ThermalStandard, cost::Deterministic)
   @ PowerSystems ~/.julia/packages/PowerSystems/F94iA/src/models/cost_function_timeseries.jl:242
 [2] set_variable_cost!(sys::System, component::ThermalStandard, data::Deterministic)
   @ PowerSystems ~/.julia/packages/PowerSystems/F94iA/src/models/cost_function_timeseries.jl:265
 [3] top-level scope
   @ REPL[64]:1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants