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

gdxpds.to_gdx changing dataframe order #75

Open
DIUANA opened this issue Jul 28, 2020 · 1 comment
Open

gdxpds.to_gdx changing dataframe order #75

DIUANA opened this issue Jul 28, 2020 · 1 comment

Comments

@DIUANA
Copy link

DIUANA commented Jul 28, 2020

Hi all I hope you are all fine and sage.

I am facing an issue when generating a gdx file with gdxpds.to_gdx function.

I am passing a dictionary with 198 keys and when generating the gdx it is modifyig the order of some sets.

For instance I am providing a dataframe such as this one:

2008 True
2010 True
2015 True
2020 True

And the gdx output is:

2010 Y
2015 Y
2020 Y
2008 Y

It makes difference for the current model I am working on.

Is there any way to keep the passed order when generating the gdx file with gdxpds.to_gdx?

Thanks in advance

Version info:
Python 3.7
GAMS 24.7.4
GAMS 29.1
gdxpds 1.1.0

Edit: I have also tried to implement the backend conversion but it provided me the same output issues.

@jebob
Copy link

jebob commented Oct 30, 2020

Can you provide a minimum example?

EDIT: I am guessing that this is due to the UEL being constructed from sets in a particular order.

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

2 participants