Skip to content

Commit

Permalink
add explanation to AbstractDemandNode
Browse files Browse the repository at this point in the history
  • Loading branch information
Jingru923 committed May 31, 2024
1 parent 0b8aef8 commit ba2c8d2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/contribute/addnode.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ struct NewNodeType <: AbstractParameterNode
# Other fields
end
```
Another abstract class inherited from `AbstractParameterNode` is called `AbstractDemandNode`. For creating new node type used in allocation, define a struct:

```julia
struct NewNodeType <: AbstractDemandNode
node_id::Vector{NodeID}
# Other fields
end
```

These fields do not have to correspond 1:1 with the input tables (see below). The vector with all node IDs that are of the new type in a given model is a mandatory field. Now you can:

Expand Down

0 comments on commit ba2c8d2

Please sign in to comment.