HolonTransformer.java 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. public HolonTransformer makeCopy(){
  79. return new HolonTransformer(this);
  80. }
  81. }