Skip to content

Array of components  #2674

@B-LIE

Description

@B-LIE

Is there an example of how to use arrays of components in the documentation❓

image

From a presentation, I've seen the the syntax:

@components begin
    resistor[1:n] = Resistor()
end

I don't know if this is a standard notation or not. I've tried to use it, but have problems when I add equations where the instances have fields, such...

@equations begin
    resistor[1].R ~ 3 
end

would not work.

However,

@components begin
    resistor_1 = Resistor()
end
#
@equations begin
    resistor_1.R ~ 3
end

would work.

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions