Search found 7 matches

by sanjadzeletovic
9 months ago
Forum: Modeling
Topic: Index control with change of variable in MIP programming
Replies: 0
Views: 1104

Index control with change of variable in MIP programming

I have a difficulties with assigning the adequate index. I want that index t starts to increment when variable u(i, t) changes state from 0 to 1 for variable i. $title Service restoration using MIP $oneolcom set t ,i, r, t_total; parameter cons(i), clpu(t,i), p(r), s, h; $if not set gdxin $set gdxin...
by sanjadzeletovic
1 year ago
Forum: Syntax
Topic: Error 121 - Issue with indexing gdx data
Replies: 6
Views: 930

Re: Error 121 - Issue with indexing gdx data

Fred,

Thank you, I haven't been aware of this operator. This solved my problem.
by sanjadzeletovic
1 year ago
Forum: Tools
Topic: Excel - reading different data from same file
Replies: 2
Views: 1134

Re: Excel - reading different data from same file

Thank you Fred, this really helped me.
by sanjadzeletovic
1 year ago
Forum: Syntax
Topic: Error 121 - Issue with indexing gdx data
Replies: 6
Views: 930

Re: Error 121 - Issue with indexing gdx data

Thank you Fred, this really helped. It is now much more clear how to transfer data from excel. I use time to calculate h, so that I know from which row I should read data for customers. However, it is only partially solving my problem. I still don't know how to use this data :( . I have problem with...
by sanjadzeletovic
1 year ago
Forum: Syntax
Topic: Error 121 - Issue with indexing gdx data
Replies: 6
Views: 930

Re: Error 121 - Issue with indexing gdx data

Thanks for the advice.
I have attached xlsx files. Files are the same but I couldn't find the way to read both data from the same file.
by sanjadzeletovic
1 year ago
Forum: Tools
Topic: Excel - reading different data from same file
Replies: 2
Views: 1134

Excel - reading different data from same file

Hi, I have one excel file with data that should be loaded in different variables, one scalar and one table. The only way I succeeded in reading them is by creating two .xls files with different names, and load data in different .gdx files. This is not so elegant solution so I wanted to ask whether t...
by sanjadzeletovic
1 year ago
Forum: Syntax
Topic: Error 121 - Issue with indexing gdx data
Replies: 6
Views: 930

Error 121 - Issue with indexing gdx data

Hi, I have difficulties in reading data that I need from .gdx file. I have succeeded in loading file from Excel, but I get an error when I try to access index that I need: Sets t time intervals / t1*t12 / [b] !! set definition[/b] i customers / c1*c5 / r row labels /r1*r97/ c column labels /c1,c2,c3...