Power_1.test 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. %description:
  2. Test for normal operation, energy storage should not be depleted and should not be charged.
  3. %file: test.ned
  4. import inet.power.storage.SimpleEpEnergyStorage;
  5. import inet.power.consumer.AlternatingEpEnergyConsumer;
  6. import inet.power.generator.AlternatingEpEnergyGenerator;
  7. network Test
  8. {
  9. submodules:
  10. energyStorage: SimpleEpEnergyStorage;
  11. energyConsumer: AlternatingEpEnergyConsumer;
  12. energyGenerator: AlternatingEpEnergyGenerator;
  13. }
  14. %inifile: omnetpp.ini
  15. [General]
  16. network = Test
  17. ned-path = .;../../../../src
  18. sim-time-limit = 11s
  19. cmdenv-express-mode = false
  20. #omnetpp 5.0 - 5.1 compatibility:
  21. eventlog-file = "${resultdir}/${configname}-${runnumber}.elog"
  22. output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
  23. output-vector-file = "${resultdir}/${configname}-${runnumber}.vec"
  24. snapshot-file = "${resultdir}/${configname}-${runnumber}.sna"
  25. **.energyStorage.nominalCapacity = 10 J
  26. **.energyStorage.initialCapacity = 5 J
  27. **.energyConsumer.sleepInterval = uniform(10ms, 20ms)
  28. **.energyConsumer.consumptionInterval = uniform(5ms, 10ms)
  29. **.energyConsumer.powerConsumption = uniform(1W, 2W)
  30. **.energyGenerator.sleepInterval = uniform(10ms, 20ms)
  31. **.energyGenerator.generationInterval = uniform(5ms, 10ms)
  32. **.energyGenerator.powerGeneration = uniform(1W, 2W)
  33. %not-contains: stdout
  34. Energy storage depleted
  35. %not-contains: stdout
  36. Energy storage charged
  37. %#--------------------------------------------------------------------------------------------------------------
  38. %not-contains: stdout
  39. undisposed object:
  40. %not-contains: stdout
  41. -- check module destructor
  42. %#--------------------------------------------------------------------------------------------------------------