Skip to content

Custom objective function for PV #484

Answered by MartaVanin
Anju-0 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, there's multiple ways to do that, here are some suggestions:

  1. you could define separate variables for the p and q of solar , but probably in this case it is not practical and error-prone, as you would have to re-write also all the constraints where these are used to make sure they are added where needed. Though it feels a bit overkill if the only distinction is whether some variables are in the objective function or not.
  2. you add a key to the "gen" dictionary items (or the "load" dictionary, if you define solar as negative load) that "flags" whether that specific generator/load is solar or not. e.g.,
data["gen"]["1"] = Dict{String, Any}(......, "solar"=>true)
...
data["gen"]["14"] = Dict

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Anju-0
Comment options

@MartaVanin
Comment options

@Anju-0
Comment options

Answer selected by Anju-0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants