Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Successfull translating from excel to c, but getting many failure test #10

Open
kubido opened this issue Mar 28, 2016 · 6 comments
Open

Comments

@kubido
Copy link

kubido commented Mar 28, 2016

Hi @tamc

I'm using the calculator (the old one) for indonesia here (http://calculator2050.esdm.go.id)
we made some changes to the model.xlsx (here)
when trying to translate the model into c, it getting many test failures. log file

My assumption it's a excel version issue?

Regards

@tamc
Copy link
Member

tamc commented Mar 29, 2016

The simplest possible cause is that the Excel had not been recalculated before it was saved. It is worth triggering a manual recalculation in the excel, saving it, and running the conversion again.

If that isn’t the reason, then the next possibility is that it is some failure in the conversion process. I can take a look, but not until later in the week.

All the btest

Tom

On 28 Mar 2016, at 19:18, Rifki Fauzi [email protected] wrote:

Hi @tamc

I'm using the calculator (the old one) for indonesia here (http://calculator2050.esdm.go.id)
we made some changes to the model.xlsx (here)
when trying to translate the model into c, it getting many test failures. log file

My assumption it's a excel version issue?

Regards


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@kubido
Copy link
Author

kubido commented Mar 31, 2016

Hi Tom,
after tracing the values. I dunno why it seems it's load wrong vector.

for example
we defined in "electricity_f77" will be pointed into vector 'E.01 / column_V5' in sheet 2011.
but it return wrong column in model.c it pointed to another vector.. let's called 'C.02 / column_X5'

what's the possiblitiy of this? is that something we missed in the excel model?

@tamc
Copy link
Member

tamc commented Mar 31, 2016

Ok. I will take a look. Though may not get to it until the weekend.

On 31 Mar 2016, at 09:43, Rifki Fauzi [email protected] wrote:

Hi Tom,
after tracing the values. I dunno why it seems it's load wrong vector.

*for example: *
we defined in "electricity_f77" will be pointed into vector 'E.01 / column_V5' in sheet 2011.
but it return wrong column in model.c it pointed to another vector.. let's called 'C.02 / column_X5'

what's the possiblitiy of this? is that something we missed in the excel model?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@tamc
Copy link
Member

tamc commented Apr 4, 2016

The first thing I have found is this:

On sheet XII.a, cell N16 and similar, it has:
=INDEX(INDIRECT("'"&XII.a.Inputs[#Headers]&"'!Year.Matrix"),MATCH("SubTotal."&$A$2,INDIRECT("'"&XII.a.Inputs[#Headers]&"'!Year.Modules"),0),MATCH([Vektor],INDIRECT("'"&XII.a.Inputs[#Headers]&"'!Year.Vectors"),))

Which the excel to C translation gets wrong.

It expects the arguments to MATCH to be made explicitly, i.e., by using a ,0) rather than ,) as in:

=INDEX(INDIRECT("'"&XII.a.Inputs[#Headers]&"'!Year.Matrix"),MATCH("SubTotal."&$A$2,INDIRECT("'"&XII.a.Inputs[#Headers]&"'!Year.Modules"),0),MATCH([Vektor],INDIRECT("'"&XII.a.Inputs[#Headers]&"'!Year.Vectors”),0))

Changing those gets the number of errors down to 18. I will look at what is causing those next.

Best wishes

Tom

On 28 Mar 2016, at 19:18, Rifki Fauzi [email protected] wrote:

Hi @tamc

I'm using the calculator (the old one) for indonesia here (http://calculator2050.esdm.go.id)
we made some changes to the model.xlsx (here)
when trying to translate the model into c, it getting many test failures. log file

My assumption it's a excel version issue?

Regards


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@tamc
Copy link
Member

tamc commented Apr 4, 2016

Ok. That seems to be it. If I replace all the times that the Excel uses ,) with ,0) then the translation happens without errors.

@Pistorius
Copy link

hi @tamc Im working in the Calculator from Chile and im getting problems trying to convert my xlsx file. I have an issue here

Greetings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants