Skip to content

Commit

Permalink
Remove variable lookup that was created only for the strangle pattern (
Browse files Browse the repository at this point in the history
  • Loading branch information
abelsiqueira authored Feb 18, 2025
1 parent 347a493 commit ce0672c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/structures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@ mutable struct TulipaVariable
indices::DataFrame
table_name::String
container::Vector{JuMP.VariableRef}
lookup::OrderedDict # TODO: This is probably not type stable so it's only used for strangling

function TulipaVariable(connection, table_name::String)
return new(
DuckDB.query(connection, "SELECT * FROM $table_name") |> DataFrame,
table_name,
JuMP.VariableRef[],
Dict(),
)
end
end
Expand Down
4 changes: 0 additions & 4 deletions src/variables/investments.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ function _create_investment_variable!(
base_name = "$name[" * join(keys_from_row(row), ",") * "]"
) for row in eachrow(this_var.indices)
]
this_var.lookup = OrderedDict(
keys_from_row(row) => var for
(var, row) in zip(this_var.container, eachrow(this_var.indices))
)
return
end

Expand Down

0 comments on commit ce0672c

Please sign in to comment.