Energy used by end of experiment

28 views
Skip to first unread message

Andrew Hardy

unread,
Jun 20, 2013, 5:35:56 AM6/20/13
to omnetpp

I can access residual energy direct but the underlying battery interface
or simple battery does not allow me to access capacity in the same units
in order to
calculate total energy used in the experiment

Do I simply have to do (mybattry->par("capacity") * 60 * 60 *
mybattery->par("voltage")) - mybattery->GetEnergy(); // rough code

Or is there a neater way?

Or perhaps I shouldn't be measuring energy used in mW-sec ?

But in some other way...

Any advice welcomed

________________________________
Important Notice: the information in this email and any attachments is for the sole use of the intended recipient(s). If you are not an intended recipient, or a person responsible for delivering it to an intended recipient, you should delete it from your system immediately without disclosing its contents elsewhere and advise the sender by returning the email or by telephoning a number contained in the body of the email. No responsibility is accepted for loss or damage arising from viruses or changes made to this message after it was sent. The views contained in this email are those of the author and not necessarily those of Liverpool John Moores University.

Daniel Pfefferkorn

unread,
Jun 20, 2013, 8:07:02 AM6/20/13
to omn...@googlegroups.com
That way worked fine for me. As the assumed battery follows a simple
linear model, I see no reason why energy consumed shouldn't be
calculated in this manner.

:D

--Daniel

Andrew Hardy

unread,
Jun 20, 2013, 8:29:01 AM6/20/13
to omn...@googlegroups.com

Great, thanks

Shaikha Al-Khuder

unread,
Dec 25, 2015, 2:15:16 AM12/25/15
to OMNeT++ Users
I actually get an error using the equation:

Multiple markers at this line

- built-in candidate operator*(unsigned __int128, unsigned long 

long)

- built-in candidate operator*(long long, unsigned int)

- built-in candidate operator*(long long, __int128)

- built-in candidate operator*(long long, long long)

- built-in candidate operator*(unsigned __int128, unsigned 

__int128)

- built-in candidate operator*(float, long long)

- built-in candidate operator*(long long, long double)

- built-in candidate operator*(long long, double)

- built-in candidate operator*(long long, float)

- built-in candidate operator*(__int128, long)

- built-in candidate operator*(float, long)

- built-in candidate operator*(__int128, long double)

- built-in candidate operator*(__int128, double)

- built-in candidate operator*(__int128, float)

- built-in candidate operator*(long long, unsigned __int128)

- built-in candidate operator*(long long, unsigned long long)

- built-in candidate operator*(long long, unsigned long)

- built-in candidate operator*(unsigned int, double)

- built-in candidate operator*(unsigned int, float)

- built-in candidate operator*(__int128, unsigned __int128)

- built-in candidate operator*(__int128, unsigned long long)

- built-in candidate operator*(__int128, unsigned long)

- built-in candidate operator*(__int128, unsigned int)

- built-in candidate operator*(__int128, __int128)

- built-in candidate operator*(__int128, long long)

- built-in candidate operator*(unsigned int, unsigned long long)

- built-in candidate operator*(unsigned int, unsigned long)

- built-in candidate operator*(unsigned int, unsigned int)

- built-in candidate operator*(unsigned int, __int128)

- built-in candidate operator*(unsigned int, long long)

- built-in candidate operator*(unsigned int, long)

- built-in candidate operator*(float, long double)

- built-in candidate operator*(unsigned int, long double)

- built-in candidate operator*(unsigned long, __int128)

- built-in candidate operator*(unsigned long, long long)

- built-in candidate operator*(unsigned long, long)

- built-in candidate operator*(float, double)

- built-in candidate operator*(unsigned long, long double)

- built-in candidate operator*(unsigned long, double)

- built-in candidate operator*(unsigned long, float)

- built-in candidate operator*(unsigned int, unsigned __int128)

- built-in candidate operator*(float, float)

- built-in candidate operator*(unsigned long long, long double)

- built-in candidate operator*(unsigned long long, double)

- built-in candidate operator*(unsigned long long, float)

- built-in candidate operator*(unsigned long, unsigned __int128)

- built-in candidate operator*(unsigned long, unsigned long long)

- built-in candidate operator*(unsigned long, unsigned long)

- built-in candidate operator*(unsigned long, unsigned int)

- built-in candidate operator*(unsigned __int128, float)

- built-in candidate operator*(unsigned long long, unsigned 

__int128)

- built-in candidate operator*(unsigned long long, unsigned long 

long)

- built-in candidate operator*(unsigned long long, unsigned long)

- built-in candidate operator*(unsigned long long, unsigned int)

- built-in candidate operator*(unsigned long long, __int128)

- built-in candidate operator*(unsigned long long, long long)

- built-in candidate operator*(unsigned long long, long)

- built-in candidate operator*(unsigned __int128, unsigned long)

- built-in candidate operator*(unsigned __int128, unsigned int)

- built-in candidate operator*(unsigned __int128, __int128)

- built-in candidate operator*(unsigned __int128, long long)

- built-in candidate operator*(unsigned __int128, long)

- built-in candidate operator*(long long, long)

- built-in candidate operator*(unsigned __int128, long double)

- built-in candidate operator*(unsigned __int128, double)

- built-in candidate operator*(unsigned __int128, int)

- built-in candidate operator*(int, int)

- built-in candidate operator*(long, int)

- built-in candidate operator*(long long, int)

- built-in candidate operator*(__int128, int)

- built-in candidate operator*(float, int)

- built-in candidate operator*(unsigned int, int)

- built-in candidate operator*(unsigned long, int)

- built-in candidate operator*(unsigned long long, int)

- built-in candidate operator*(float, unsigned long long)

- built-in candidate operator*(double, long double)

- built-in candidate operator*(double, double)

- built-in candidate operator*(double, float)

- built-in candidate operator*(float, unsigned __int128)

- built-in candidate operator*(double, int)

- built-in candidate operator*(long double, int)

- built-in candidate operator*(long double, float)

- built-in candidate operator*(double, unsigned __int128)

- built-in candidate operator*(double, unsigned long long)

- built-in candidate operator*(double, unsigned long)

- built-in candidate operator*(double, unsigned int)

- built-in candidate operator*(double, __int128)

- built-in candidate operator*(double, long long)

- built-in candidate operator*(double, long)

- built-in candidate operator*(long double, unsigned long)

- built-in candidate operator*(long double, unsigned int)

- built-in candidate operator*(long double, __int128)

- built-in candidate operator*(long double, long long)

- built-in candidate operator*(long double, long)

- built-in candidate operator*(float, unsigned long)

- built-in candidate operator*(long double, long double)

- built-in candidate operator*(long double, double)

- built-in candidate operator*(int, long long)

- built-in candidate operator*(int, long)

- built-in candidate operator*(float, unsigned int)

- built-in candidate operator*(int, long double)

- built-in candidate operator*(int, double)

- built-in candidate operator*(int, float)

- built-in candidate operator*(long double, unsigned __int128)

- built-in candidate operator*(long double, unsigned long long)

- built-in candidate operator*(long, long double)

- built-in candidate operator*(long, double)

- built-in candidate operator*(long, float)

- built-in candidate operator*(int, unsigned __int128)

- built-in candidate operator*(int, unsigned long long)

- built-in candidate operator*(int, unsigned long)

- built-in candidate operator*(int, unsigned int)

- built-in candidate operator*(int, __int128)

- built-in candidate operator*(long, unsigned __int128)

- built-in candidate operator*(long, unsigned long long)

- built-in candidate operator*(long, unsigned long)

- built-in candidate operator*(long, unsigned int)

- built-in candidate operator*(long, __int128)

- built-in candidate operator*(long, long long)

- built-in candidate operator*(long, long)

- built-in candidate operator*(float, __int128)

- because of ambiguity in conversion of 'cPar' to 'unsigned 

__int128'

- use of overloaded operator '*' is ambiguous (with operand 

types 'cPar' and 'int')




Wonder how to fix that...

Reply all
Reply to author
Forward
0 new messages