diff --git a/src/main/java/elntranslator/ELNTComponentCapacitor.java b/src/main/java/elntranslator/ELNTComponentCapacitor.java index d2284979204753b53f88e324ac287e695c5cadef..8937aa21fa4c28a5adeeed672b70294911f70257 100644 --- a/src/main/java/elntranslator/ELNTComponentCapacitor.java +++ b/src/main/java/elntranslator/ELNTComponentCapacitor.java @@ -38,6 +38,8 @@ package elntranslator; +import ui.eln.ELNConnectingPoint; + /** * Class ELNTComponentCapacitor * Parameters of a ELN primitive component : capacitor @@ -53,7 +55,7 @@ public class ELNTComponentCapacitor extends ELNTComponent { private ELNTModule module; - public ELNTComponentCapacitor(String _name, double _val, double _q0, String _unit0, String _unit1, ELNTModule _module) { + public ELNTComponentCapacitor(String _name, double _val, double _q0, String _unit0, String _unit1, ELNConnectingPoint[] _cp, ELNTModule _module) { name = _name; val = _val; q0 = _q0; diff --git a/src/main/java/elntranslator/ELNTComponentCurrentSinkTDF.java b/src/main/java/elntranslator/ELNTComponentCurrentSinkTDF.java index 6f83646d7d93fc028d324e146fdf5cdea2187dd3..a0ffc2cba466b95be2dd66873c63b860aabb0475 100644 --- a/src/main/java/elntranslator/ELNTComponentCurrentSinkTDF.java +++ b/src/main/java/elntranslator/ELNTComponentCurrentSinkTDF.java @@ -38,6 +38,8 @@ package elntranslator; +import ui.eln.ELNConnectingPoint; + /** * Class ELNTComponentCurrentSinkTDF * Parameters of a ELN primitive component : TDF current sink @@ -49,12 +51,14 @@ package elntranslator; public class ELNTComponentCurrentSinkTDF extends ELNTComponent { private String name; private double scale; + private ELNConnectingPoint[] cp; private ELNTModule module; - public ELNTComponentCurrentSinkTDF(String _name, double _scale, ELNTModule _module) { + public ELNTComponentCurrentSinkTDF(String _name, double _scale, ELNConnectingPoint[] _cp, ELNTModule _module) { name = _name; scale = _scale; + cp = _cp; module = _module; } @@ -66,6 +70,10 @@ public class ELNTComponentCurrentSinkTDF extends ELNTComponent { return scale; } + public ELNConnectingPoint[] getCp() { + return cp; + } + public ELNTModule getModule() { return module; } diff --git a/src/main/java/elntranslator/ELNTComponentCurrentSourceTDF.java b/src/main/java/elntranslator/ELNTComponentCurrentSourceTDF.java index c4eb1674172276b9d73cadcfbfc63d64acaebadc..464097cd520e59a8af192e98f86b219343cd4fe0 100644 --- a/src/main/java/elntranslator/ELNTComponentCurrentSourceTDF.java +++ b/src/main/java/elntranslator/ELNTComponentCurrentSourceTDF.java @@ -38,6 +38,8 @@ package elntranslator; +import ui.eln.ELNConnectingPoint; + /** * Class ELNTComponentCurrentSourceTDF * Parameters of a ELN primitive component : TDF current source @@ -49,12 +51,14 @@ package elntranslator; public class ELNTComponentCurrentSourceTDF extends ELNTComponent { private String name; private double scale; + private ELNConnectingPoint[] cp; private ELNTModule module; - public ELNTComponentCurrentSourceTDF(String _name, double _scale, ELNTModule _module) { + public ELNTComponentCurrentSourceTDF(String _name, double _scale, ELNConnectingPoint[] _cp, ELNTModule _module) { name = _name; scale = _scale; + cp = _cp; module = _module; } @@ -66,6 +70,10 @@ public class ELNTComponentCurrentSourceTDF extends ELNTComponent { return scale; } + public ELNConnectingPoint[] getCp() { + return cp; + } + public ELNTModule getModule() { return module; } diff --git a/src/main/java/elntranslator/ELNTComponentIdealTransformer.java b/src/main/java/elntranslator/ELNTComponentIdealTransformer.java index ac915027e15f3fedc43c421a86462431773ef64c..e6e8588bc085b5c0fb58d8b71ea2fbb93f969a6a 100644 --- a/src/main/java/elntranslator/ELNTComponentIdealTransformer.java +++ b/src/main/java/elntranslator/ELNTComponentIdealTransformer.java @@ -38,6 +38,8 @@ package elntranslator; +import ui.eln.ELNConnectingPoint; + /** * Class ELNTComponentIdealTransformer * Parameters of a ELN primitive component : ideal transformer @@ -49,12 +51,14 @@ package elntranslator; public class ELNTComponentIdealTransformer extends ELNTComponent { private String name; private double ratio; + private ELNConnectingPoint[] cp; private ELNTModule module; - public ELNTComponentIdealTransformer(String _name, double _ratio, ELNTModule _module) { + public ELNTComponentIdealTransformer(String _name, double _ratio, ELNConnectingPoint[] _cp, ELNTModule _module) { name = _name; ratio = _ratio; + cp = _cp; module = _module; } @@ -65,6 +69,10 @@ public class ELNTComponentIdealTransformer extends ELNTComponent { public double getRatio() { return ratio; } + + public ELNConnectingPoint[] getCp() { + return cp; + } public ELNTModule getModule() { return module; diff --git a/src/main/java/elntranslator/ELNTComponentIndependentCurrentSource.java b/src/main/java/elntranslator/ELNTComponentIndependentCurrentSource.java index 6e83ffcf1b09f5277532723076db4f259489a9a9..9596a8b4ae9b0bb3379510e7510cbd9d1786fa9f 100644 --- a/src/main/java/elntranslator/ELNTComponentIndependentCurrentSource.java +++ b/src/main/java/elntranslator/ELNTComponentIndependentCurrentSource.java @@ -38,6 +38,8 @@ package elntranslator; +import ui.eln.ELNConnectingPoint; + /** * Class ELNTComponentIndependentCurrentSource * Parameters of a ELN primitive component : independent current source @@ -51,11 +53,12 @@ public class ELNTComponentIndependentCurrentSource extends ELNTComponent { private double initValue, offset, amplitude, frequency, phase, acAmplitude, acPhase, acNoiseAmplitude; private String delay; private String unit0; + private ELNConnectingPoint[] cp; private ELNTModule module; public ELNTComponentIndependentCurrentSource(String _name, double _initValue, double _offset, double _amplitude, double _frequency, double _phase, - double _acAmplitude, double _acPhase, double _acNoiseAmplitude, String _delay, String _unit0, ELNTModule _module) { + double _acAmplitude, double _acPhase, double _acNoiseAmplitude, String _delay, String _unit0, ELNConnectingPoint[] _cp, ELNTModule _module) { name = _name; initValue = _initValue; offset = _offset; @@ -67,6 +70,7 @@ public class ELNTComponentIndependentCurrentSource extends ELNTComponent { acNoiseAmplitude = _acNoiseAmplitude; delay = _delay; unit0 = _unit0; + cp = _cp; module = _module; } @@ -113,6 +117,10 @@ public class ELNTComponentIndependentCurrentSource extends ELNTComponent { public String getUnit0() { return unit0; } + + public ELNConnectingPoint[] getCp() { + return cp; + } public ELNTModule getModule() { return module; diff --git a/src/main/java/elntranslator/ELNTComponentIndependentVoltageSource.java b/src/main/java/elntranslator/ELNTComponentIndependentVoltageSource.java index 875fd8c8f53ac5155dbfd6b8c11c10a7c069dd2a..9b2c8c944a1fb08636e2897f21f83480a56acd99 100644 --- a/src/main/java/elntranslator/ELNTComponentIndependentVoltageSource.java +++ b/src/main/java/elntranslator/ELNTComponentIndependentVoltageSource.java @@ -38,6 +38,8 @@ package elntranslator; +import ui.eln.ELNConnectingPoint; + /** * Class ELNTComponentIndependentVoltageSource * Parameters of a ELN primitive component : independent voltage source @@ -51,11 +53,12 @@ public class ELNTComponentIndependentVoltageSource extends ELNTComponent { private double initValue, offset, amplitude, frequency, phase, acAmplitude, acPhase, acNoiseAmplitude; private String delay; private String unit0; + private ELNConnectingPoint[] cp; private ELNTModule module; public ELNTComponentIndependentVoltageSource(String _name, double _initValue, double _offset, double _amplitude, double _frequency, double _phase, - double _acAmplitude, double _acPhase, double _acNoiseAmplitude, String _delay, String _unit0, ELNTModule _module) { + double _acAmplitude, double _acPhase, double _acNoiseAmplitude, String _delay, String _unit0, ELNConnectingPoint[] _cp, ELNTModule _module) { name = _name; initValue = _initValue; offset = _offset; @@ -67,6 +70,7 @@ public class ELNTComponentIndependentVoltageSource extends ELNTComponent { acNoiseAmplitude = _acNoiseAmplitude; delay = _delay; unit0 = _unit0; + cp = _cp; module = _module; } @@ -114,6 +118,10 @@ public class ELNTComponentIndependentVoltageSource extends ELNTComponent { return unit0; } + public ELNConnectingPoint[] getCp() { + return cp; + } + public ELNTModule getModule() { return module; } diff --git a/src/main/java/elntranslator/ELNTComponentInductor.java b/src/main/java/elntranslator/ELNTComponentInductor.java index 9bdba90dfa4fa7c4d935f0300a684fa9ed534b05..96020bf0903a5260c292a217c4465f9bf492730a 100644 --- a/src/main/java/elntranslator/ELNTComponentInductor.java +++ b/src/main/java/elntranslator/ELNTComponentInductor.java @@ -38,6 +38,8 @@ package elntranslator; +import ui.eln.ELNConnectingPoint; + /** * Class ELNTComponentInductor * Parameters of a ELN primitive component : inductor @@ -50,15 +52,17 @@ public class ELNTComponentInductor extends ELNTComponent { private String name; private double val, phi0; private String unit0, unit1; + private ELNConnectingPoint[] cp; private ELNTModule module; - public ELNTComponentInductor(String _name, double _val, double _phi0, String _unit0, String _unit1, ELNTModule _module) { + public ELNTComponentInductor(String _name, double _val, double _phi0, String _unit0, String _unit1, ELNConnectingPoint[] _cp, ELNTModule _module) { name = _name; val = _val; phi0 = _phi0; unit0 = _unit0; unit1 = _unit1; + cp = _cp; module = _module; } @@ -82,6 +86,10 @@ public class ELNTComponentInductor extends ELNTComponent { return unit1; } + public ELNConnectingPoint[] getCp() { + return cp; + } + public ELNTModule getModule() { return module; } diff --git a/src/main/java/elntranslator/ELNTComponentResistor.java b/src/main/java/elntranslator/ELNTComponentResistor.java index 607882b250d584029715402c701717b050d449d2..fc015176c7978f5fdd9568b3d3955c4cc92a36a1 100644 --- a/src/main/java/elntranslator/ELNTComponentResistor.java +++ b/src/main/java/elntranslator/ELNTComponentResistor.java @@ -38,6 +38,8 @@ package elntranslator; +import ui.eln.ELNConnectingPoint; + /** * Class ELNTComponentResistor * Parameters of a ELN primitive component : resistor @@ -50,13 +52,15 @@ public class ELNTComponentResistor extends ELNTComponent { private String name; private double val; private String unit; + private ELNConnectingPoint[] cp; private ELNTModule module; - public ELNTComponentResistor(String _name, double _val, String _unit, ELNTModule _module) { + public ELNTComponentResistor(String _name, double _val, String _unit, ELNConnectingPoint[] _cp, ELNTModule _module) { name = _name; val = _val; unit = _unit; + cp = _cp; module = _module; } @@ -71,6 +75,10 @@ public class ELNTComponentResistor extends ELNTComponent { public String getUnit() { return unit; } + + public ELNConnectingPoint[] getCp() { + return cp; + } public ELNTModule getModule() { return module; diff --git a/src/main/java/elntranslator/ELNTComponentTransmissionLine.java b/src/main/java/elntranslator/ELNTComponentTransmissionLine.java index 1e1af794235c22ff692ef9581cbe69da11c141e1..8211c380ec978c9017db51538d5dba8b4b305dbe 100644 --- a/src/main/java/elntranslator/ELNTComponentTransmissionLine.java +++ b/src/main/java/elntranslator/ELNTComponentTransmissionLine.java @@ -38,6 +38,8 @@ package elntranslator; +import ui.eln.ELNConnectingPoint; + /** * Class ELNTComponentTransmissionLine * Parameters of a ELN primitive component : transmission line @@ -51,16 +53,18 @@ public class ELNTComponentTransmissionLine extends ELNTComponent { private double z0, delta0; private String delay; private String unit0, unit2; + private ELNConnectingPoint[] cp; private ELNTModule module; - public ELNTComponentTransmissionLine(String _name, double _z0, double _delta0, String _delay, String _unit0, String _unit2, ELNTModule _module) { + public ELNTComponentTransmissionLine(String _name, double _z0, double _delta0, String _delay, String _unit0, String _unit2, ELNConnectingPoint[] _cp, ELNTModule _module) { name = _name; z0 = _z0; delta0 = _delta0; delay = _delay; unit0 = _unit0; unit2 = _unit2; + cp = _cp; module = _module; } @@ -88,6 +92,10 @@ public class ELNTComponentTransmissionLine extends ELNTComponent { return unit2; } + public ELNConnectingPoint[] getCp() { + return cp; + } + public ELNTModule getModule() { return module; } diff --git a/src/main/java/elntranslator/ELNTComponentVoltageControlledCurrentSource.java b/src/main/java/elntranslator/ELNTComponentVoltageControlledCurrentSource.java index 327840d4bc9836bec4a3bd54546dc922fa2685e1..fa7c19ba104a6788cfaf07b8bdcca40484ae70b5 100644 --- a/src/main/java/elntranslator/ELNTComponentVoltageControlledCurrentSource.java +++ b/src/main/java/elntranslator/ELNTComponentVoltageControlledCurrentSource.java @@ -38,6 +38,8 @@ package elntranslator; +import ui.eln.ELNConnectingPoint; + /** * Class ELNTComponentVoltageControlledCurrentSource * Parameters of a ELN primitive component : voltage controlled current source @@ -50,13 +52,15 @@ public class ELNTComponentVoltageControlledCurrentSource extends ELNTComponent { private String name; private double val; private String unit; + private ELNConnectingPoint[] cp; private ELNTModule module; - public ELNTComponentVoltageControlledCurrentSource(String _name, double _val, String _unit, ELNTModule _module) { + public ELNTComponentVoltageControlledCurrentSource(String _name, double _val, String _unit, ELNConnectingPoint[] _cp, ELNTModule _module) { name = _name; val = _val; unit = _unit; + cp = _cp; module = _module; } @@ -71,6 +75,10 @@ public class ELNTComponentVoltageControlledCurrentSource extends ELNTComponent { public String getUnit() { return unit; } + + public ELNConnectingPoint[] getCp() { + return cp; + } public ELNTModule getModule() { return module; diff --git a/src/main/java/elntranslator/ELNTComponentVoltageControlledVoltageSource.java b/src/main/java/elntranslator/ELNTComponentVoltageControlledVoltageSource.java index 564559de46729e5ec7fb0b1f861ff5ee3db359bb..7a1e9e28924f03617097debfd9b6c5d7f57f7eae 100644 --- a/src/main/java/elntranslator/ELNTComponentVoltageControlledVoltageSource.java +++ b/src/main/java/elntranslator/ELNTComponentVoltageControlledVoltageSource.java @@ -38,6 +38,8 @@ package elntranslator; +import ui.eln.ELNConnectingPoint; + /** * Class ELNTComponentVoltageControlledVoltageSource * Parameters of a ELN primitive component : voltage controlled voltage source @@ -49,12 +51,14 @@ package elntranslator; public class ELNTComponentVoltageControlledVoltageSource extends ELNTComponent { private String name; private double val; + private ELNConnectingPoint[] cp; private ELNTModule module; - public ELNTComponentVoltageControlledVoltageSource(String _name, double _val, ELNTModule _module) { + public ELNTComponentVoltageControlledVoltageSource(String _name, double _val, ELNConnectingPoint[] _cp, ELNTModule _module) { name = _name; val = _val; + cp = _cp; module = _module; } @@ -65,6 +69,10 @@ public class ELNTComponentVoltageControlledVoltageSource extends ELNTComponent { public double getVal() { return val; } + + public ELNConnectingPoint[] getCp() { + return cp; + } public ELNTModule getModule() { return module; diff --git a/src/main/java/elntranslator/ELNTComponentVoltageSinkTDF.java b/src/main/java/elntranslator/ELNTComponentVoltageSinkTDF.java index d6072a905208232cd5bb88f01d7f9f71b7dda344..da0e9c10838da1a6bbdc2a752c1ddcad3346de03 100644 --- a/src/main/java/elntranslator/ELNTComponentVoltageSinkTDF.java +++ b/src/main/java/elntranslator/ELNTComponentVoltageSinkTDF.java @@ -38,6 +38,8 @@ package elntranslator; +import ui.eln.ELNConnectingPoint; + /** * Class ELNTComponentVoltageSinkTDF * Parameters of a ELN primitive component : TDF voltage sink @@ -49,12 +51,14 @@ package elntranslator; public class ELNTComponentVoltageSinkTDF extends ELNTComponent { private String name; private double scale; + private ELNConnectingPoint[] cp; private ELNTModule module; - public ELNTComponentVoltageSinkTDF(String _name, double _scale, ELNTModule _module) { + public ELNTComponentVoltageSinkTDF(String _name, double _scale, ELNConnectingPoint[] _cp, ELNTModule _module) { name = _name; scale = _scale; + cp = _cp; module = _module; } @@ -66,6 +70,10 @@ public class ELNTComponentVoltageSinkTDF extends ELNTComponent { return scale; } + public ELNConnectingPoint[] getCp() { + return cp; + } + public ELNTModule getModule() { return module; } diff --git a/src/main/java/elntranslator/ELNTComponentVoltageSourceTDF.java b/src/main/java/elntranslator/ELNTComponentVoltageSourceTDF.java index 43e4bd26403b783785e9c6024809b945e4ed8673..6f51b41e0e710f5f517a99db9452e8d7e7ccd5fb 100644 --- a/src/main/java/elntranslator/ELNTComponentVoltageSourceTDF.java +++ b/src/main/java/elntranslator/ELNTComponentVoltageSourceTDF.java @@ -38,6 +38,8 @@ package elntranslator; +import ui.eln.ELNConnectingPoint; + /** * Class ELNTComponentVoltageSourceTDF * Parameters of a ELN primitive component : TDF voltage source @@ -49,12 +51,14 @@ package elntranslator; public class ELNTComponentVoltageSourceTDF extends ELNTComponent { private String name; private double scale; + private ELNConnectingPoint[] cp; private ELNTModule module; - public ELNTComponentVoltageSourceTDF(String _name, double _scale, ELNTModule _module) { + public ELNTComponentVoltageSourceTDF(String _name, double _scale, ELNConnectingPoint[] _cp, ELNTModule _module) { name = _name; scale = _scale; + cp = _cp; module = _module; } @@ -65,6 +69,10 @@ public class ELNTComponentVoltageSourceTDF extends ELNTComponent { public double getScale() { return scale; } + + public ELNConnectingPoint[] getCp() { + return cp; + } public ELNTModule getModule() { return module; diff --git a/src/main/java/ui/ELNPanelTranslator.java b/src/main/java/ui/ELNPanelTranslator.java index f7922c3c9fe365daf56c6336d0af74a92a58e514..d8c810b192032c7bab7e51bc46e9f5ab922f6253 100644 --- a/src/main/java/ui/ELNPanelTranslator.java +++ b/src/main/java/ui/ELNPanelTranslator.java @@ -105,8 +105,9 @@ public class ELNPanelTranslator { double q0 = capacitor.getQ0(); String unit0 = capacitor.getUnit0(); String unit1 = capacitor.getUnit1(); + ELNConnectingPoint[] cp = (ELNConnectingPoint) capacitor.connectingPoint; - ELNTComponentCapacitor elnCapacitor = new ELNTComponentCapacitor(name, val, q0, unit0, unit1, elnModule); + ELNTComponentCapacitor elnCapacitor = new ELNTComponentCapacitor(name, val, q0, unit0, unit1, cp, elnModule); elnMap.put(capacitor, elnCapacitor); elnModule.addComponentCapacitor(elnCapacitor); @@ -118,8 +119,9 @@ public class ELNPanelTranslator { String name = TDF_isink.getValue(); double scale = TDF_isink.getScale(); + ELNConnectingPoint[] cp = (ELNConnectingPoint) TDF_isink.connectingPoint; - ELNTComponentCurrentSinkTDF elnTDF_isink = new ELNTComponentCurrentSinkTDF(name, scale, elnModule); + ELNTComponentCurrentSinkTDF elnTDF_isink = new ELNTComponentCurrentSinkTDF(name, scale, cp, elnModule); elnMap.put(TDF_isink, elnTDF_isink); elnModule.addComponentCurrentSinkTDF(elnTDF_isink); @@ -131,8 +133,9 @@ public class ELNPanelTranslator { String name = TDF_isource.getValue(); double scale = TDF_isource.getScale(); + ELNConnectingPoint[] cp = (ELNConnectingPoint) TDF_isource.connectingPoint; - ELNTComponentCurrentSourceTDF elnTDF_isource = new ELNTComponentCurrentSourceTDF(name, scale, elnModule); + ELNTComponentCurrentSourceTDF elnTDF_isource = new ELNTComponentCurrentSourceTDF(name, scale, cp, elnModule); elnMap.put(TDF_isource, elnTDF_isource); elnModule.addComponentCurrentSourceTDF(elnTDF_isource); @@ -144,8 +147,9 @@ public class ELNPanelTranslator { String name = idealTransformer.getValue(); double ratio = idealTransformer.getRatio(); + ELNConnectingPoint[] cp = (ELNConnectingPoint) idealTransformer.connectingPoint; - ELNTComponentIdealTransformer elnIdealTransformer = new ELNTComponentIdealTransformer(name, ratio, elnModule); + ELNTComponentIdealTransformer elnIdealTransformer = new ELNTComponentIdealTransformer(name, ratio, cp, elnModule); elnMap.put(idealTransformer, elnIdealTransformer); elnModule.addComponentIdealTransformer(elnIdealTransformer); @@ -166,8 +170,9 @@ public class ELNPanelTranslator { double acNoiseAmpliture = isource.getAcNoiseAmplitude(); String delay = isource.getDelay(); String unit0 = isource.getUnit0(); + ELNConnectingPoint[] cp = (ELNConnectingPoint) isource.connectingPoint; - ELNTComponentIndependentCurrentSource elnISource = new ELNTComponentIndependentCurrentSource(name, initValue, offset, amplitude, frequency, phase, acAmplitude, acPhase, acNoiseAmpliture, delay, unit0, elnModule); + ELNTComponentIndependentCurrentSource elnISource = new ELNTComponentIndependentCurrentSource(name, initValue, offset, amplitude, frequency, phase, acAmplitude, acPhase, acNoiseAmpliture, delay, unit0, cp, elnModule); elnMap.put(isource, elnISource); elnModule.addComponentIndependentCurrentSource(elnISource); @@ -188,8 +193,9 @@ public class ELNPanelTranslator { double acNoiseAmpliture = vsource.getAcNoiseAmplitude(); String delay = vsource.getDelay(); String unit0 = vsource.getUnit0(); + ELNConnectingPoint[] cp = (ELNConnectingPoint) vsource.connectingPoint; - ELNTComponentIndependentVoltageSource elnVSource = new ELNTComponentIndependentVoltageSource(name, initValue, offset, amplitude, frequency, phase, acAmplitude, acPhase, acNoiseAmpliture, delay, unit0, elnModule); + ELNTComponentIndependentVoltageSource elnVSource = new ELNTComponentIndependentVoltageSource(name, initValue, offset, amplitude, frequency, phase, acAmplitude, acPhase, acNoiseAmpliture, delay, unit0, cp, elnModule); elnMap.put(vsource, elnVSource); elnModule.addComponentIndependentVoltageSource(elnVSource); @@ -204,8 +210,9 @@ public class ELNPanelTranslator { double phi0 = inductor.getPhi0(); String unit0 = inductor.getUnit0(); String unit1 = inductor.getUnit1(); + ELNConnectingPoint[] cp = (ELNConnectingPoint) inductor.connectingPoint; - ELNTComponentInductor elnInductor = new ELNTComponentInductor(name, val, q0, unit0, unit1, elnModule); + ELNTComponentInductor elnInductor = new ELNTComponentInductor(name, val, q0, unit0, unit1, cp, elnModule); elnMap.put(inductor, elnInductor); elnModule.addComponentInductor(elnInductor); @@ -230,8 +237,9 @@ public class ELNPanelTranslator { String name = resistor.getValue(); double val = resistor.getVal(); String unit = resistor.getUnit(); + ELNConnectingPoint[] cp = (ELNConnectingPoint) resistor.connectingPoint; - ELNTComponentResistor elnResistor = new ELNTComponentResistor(name, val, unit, elnModule); + ELNTComponentResistor elnResistor = new ELNTComponentResistor(name, val, unit, cp, elnModule); elnMap.put(resistor, elnResistor); elnModule.addComponentResistor(elnResistor); @@ -247,8 +255,9 @@ public class ELNPanelTranslator { String delay = transmissionLine.getDelay(); String unit0 = transmissionLine.getUnit0(); String unit2 = transmissionLine.getUnit2(); + ELNConnectingPoint[] cp = (ELNConnectingPoint) transmissionLine.connectingPoint; - ELNTComponentTransmissionLine elnTransmissionLine = new ELNTComponentTransmissionLine(name, z0, delta0, delay, unit0, unit2, elnModule); + ELNTComponentTransmissionLine elnTransmissionLine = new ELNTComponentTransmissionLine(name, z0, delta0, delay, unit0, unit2, cp, elnModule); elnMap.put(transmissionLine, elnTransmissionLine); elnModule.addComponentTransmissionLine(elnTransmissionLine); @@ -261,8 +270,9 @@ public class ELNPanelTranslator { String name = vccs.getValue(); double val = vccs.getVal(); String unit = vccs.getUnit(); + ELNConnectingPoint[] cp = (ELNConnectingPoint) vccs.connectingPoint; - ELNTComponentVoltageControlledCurrentSource elnVCCS = new ELNTComponentVoltageControlledCurrentSource(name, val, unit, elnModule); + ELNTComponentVoltageControlledCurrentSource elnVCCS = new ELNTComponentVoltageControlledCurrentSource(name, val, unit, cp, elnModule); elnMap.put(vccs, elnVCCS); elnModule.addComponentVoltageControlledCurrentSource(elnVCCS); @@ -274,8 +284,9 @@ public class ELNPanelTranslator { String name = vcvs.getValue(); double val = vcvs.getVal(); - - ELNTComponentVoltageControlledVoltageSource elnVCVS = new ELNTComponentVoltageControlledVoltageSource(name, val, elnModule); + ELNConnectingPoint[] cp = (ELNConnectingPoint) vcvs.connectingPoint; + + ELNTComponentVoltageControlledVoltageSource elnVCVS = new ELNTComponentVoltageControlledVoltageSource(name, val, cp, elnModule); elnMap.put(vcvs, elnVCVS); elnModule.addComponentVoltageControlledVoltageSource(elnVCVS); @@ -287,8 +298,9 @@ public class ELNPanelTranslator { String name = TDF_vsink.getValue(); double scale = TDF_vsink.getScale(); + ELNConnectingPoint[] cp = (ELNConnectingPoint) TDF_vsink.connectingPoint; - ELNTComponentVoltageSinkTDF elnTDF_vsink = new ELNTComponentVoltageSinkTDF(name, scale, elnModule); + ELNTComponentVoltageSinkTDF elnTDF_vsink = new ELNTComponentVoltageSinkTDF(name, scale, cp, elnModule); elnMap.put(TDF_vsink, elnTDF_vsink); elnModule.addComponentVoltageSinkTDF(elnTDF_vsink); @@ -300,8 +312,9 @@ public class ELNPanelTranslator { String name = TDF_vsource.getValue(); double scale = TDF_vsource.getScale(); + ELNConnectingPoint[] cp = (ELNConnectingPoint) TDF_vsource.connectingPoint; - ELNTComponentVoltageSourceTDF elnTDF_vsource = new ELNTComponentVoltageSourceTDF(name, scale, elnModule); + ELNTComponentVoltageSourceTDF elnTDF_vsource = new ELNTComponentVoltageSourceTDF(name, scale, cp, elnModule); elnMap.put(TDF_vsource, elnTDF_vsource); elnModule.addComponentVoltageSourceTDF(elnTDF_vsource);