Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
1

jEPlus: formula calculation error

asked 3 years ago

qirachel's avatar

updated 3 years ago

Hi,

I am using jEPlus for optimization, and I used a formula to define the optimization objection.

I found the obtained results quite strange and I went back to check if I made a mistake in defining the formula,

and here I found out that the formula didn't work out for a to the power of b functions, I used the tested formula: v5=2^3 and the evaluation results calculated by jEPlus is 1 instead of 8, see the attached screenshot.

I was wondering if this is a bug for the calculation of this type of functions or if I defined it in a wrong way.

Thanks in advance. image description

Preview: (hide)

Comments

update: I tried the following formulas and the evaluation results are all wrong: v5 = 2^6 = 4; v5 = 2^7 = 5; v5 = 2^8 = 10; v5 = 2^9 = 11;

seems like jEPlus see "^" as either "+" or ''-''

qirachel's avatar qirachel  ( 3 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 3 years ago

qirachel's avatar

problem solved: v5 should be defined as v5 = Math.pow(2, 3) instead of v5 = 2^3

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 3 years ago

Seen: 227 times

Last updated: Apr 06 '22