HolonTransformer.java 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. package classes;
  2. /**
  3. * The class HolonTransformer represents a Transformer that transforms a flow to a lower flow.
  4. * Transforemer are not used in the current State of the Project but could be used the future.
  5. *
  6. * @author Gruppe14
  7. *
  8. */
  9. public class HolonTransformer extends AbstractCpsObject {
  10. /* Ratio of the transformer */
  11. float transformRatio;
  12. /* Fixed transform value */
  13. float transformFixed;
  14. float maxInput;
  15. float maxOutput;
  16. /**
  17. * Constructor Set type of object (Transformer), its transform ratio and the
  18. * default name ("Transformer").
  19. *
  20. * @param objName name for the Object
  21. */
  22. public HolonTransformer(String objName) {
  23. super(objName);
  24. }
  25. /**
  26. * Copy of the Object.
  27. *
  28. * @param obj the Object to Copy
  29. */
  30. public HolonTransformer(AbstractCpsObject obj) {
  31. super(obj);
  32. this.setTransformRatio(((HolonTransformer) obj).getTransformRatio());
  33. this.setTransformFixed(((HolonTransformer) obj).getTransformFixed());
  34. }
  35. /**
  36. * Set transform ratio.
  37. *
  38. * @param ratio
  39. * desired ratio
  40. */
  41. public void setTransformRatio(float ratio) {
  42. this.transformRatio = ratio;
  43. }
  44. /**
  45. * Output the actual ratio of the transformer.
  46. *
  47. * @return actual ratio of the transformer
  48. */
  49. public float getTransformRatio() {
  50. return this.transformRatio;
  51. }
  52. /**
  53. * Set fixed Transform Value.
  54. *
  55. * @param fixed
  56. * desired fixed Transform Value
  57. */
  58. public void setTransformFixed(float fixed) {
  59. this.transformFixed = fixed;
  60. }
  61. /**
  62. * Output the actual fixed Transform Value.
  63. *
  64. * @return actual fixed Transform Value
  65. */
  66. public float getTransformFixed() {
  67. return this.transformFixed;
  68. }
  69. /**
  70. * Get the Output of the Transformer.
  71. *
  72. * @return The Output
  73. */
  74. public float getOutput() {
  75. float output = 0;
  76. return output;
  77. }
  78. }