﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3274	Inheritance problems on power systems library	anonymous	Per Östlund	"I analyze for a lot of time the power system library. 
We can see in the Recursive BuildModel Test of the power system library that some test fails to run. 
Most of the fails appear  when transformers are involved in the model. 
The examples under the spot file using transformers have most of them a change in the configuration of the transformers. 
All the transformers in the power system library 3ph have Y-Y topology configuration by default. In the real world the Delta-Y configuration is the most used. 
To reuse the transformer model a redeclaration statement needs to be used at the model of the system under construction. 
According with choices explicit in the model, to change the topology of the transformer term the follow statement is needed. 
PowerSystems.AC3ph.Transformers.TrafoStray trafo(par = data, redeclare PowerSystems.AC3ph.Ports.Topology.Delta top_p) 
If I am not wrong, this redeclare statement supposes to work, but when I analyzed the initialized model, the topology change in the port is missing and it remains an Y topology. 
When I tried to run the simulation, an error message in pop-up window appears saying that there more variables than equations. 
Analyzing the topology definition port of the transformer, YDportTrafo_p_n, The definition is done by default Y topology for both ports when the possibility to redeclare each port into Delta topology. This definition includes same variables declarations about Voltages and Currents to connect the port with its terminals considering the relations between the coils. 
According with my tests, the discrepancy between the number of the number of variables and the number of equations is the result of the redeclaration statement, the variables definition are lost. In the other hand, the topology of the port remains Y. 
When I tried to redefine the variables again, the compiler ignore the statement with a warning message. 
I check the same model without changing the topology of the transformer and it works find. 
I suppose that there is a bug in the omc compiler when it try to translate the model and the redeclare statement fails. 
Fixing this problem will increase the success when running Recursive BuildModel Test of the power system library. "	defect	closed	blocker	2.0.0	New Instantiation	trunk	fixed		Adeel Asghar
