Solved
Objective Function Problem:
Hi, the "objective function" of my program is read as a variable in AIMMS. All the parameters in the objective function already have a data read from excel. My problem is, AIMMS keeps on saying "the scope of index i has not been specified" when I try to specify the index, the program won't run because it will say that the objective function should be a free scalar variable. What should I do?
Best answer by Anonymous
Seems you are still missing a sum(i, as you have a variable tt(i,j) and the objective needs to become scalar variable. If you open the error (red cross), it should highlight the exact point. In a reproduced similar problem (different model as I do not have yours), this looks like:
BTW (if I may): Looking at some of your identifiers and specifically constraints, you might want to give them some more self-explanatory names (you did that for Sets). This will make the model easier to read and debug (e.g. saying Constraint_12 is infeasible is less intuitive than calling it RespectDemand). Same for objective, is this a Cost, Revenue or so? Also, when you come back later, you are able to read the model-tree and understand what the model does. Just as an illustration:
BTW (if I may): Looking at some of your identifiers and specifically constraints, you might want to give them some more self-explanatory names (you did that for Sets). This will make the model easier to read and debug (e.g. saying Constraint_12 is infeasible is less intuitive than calling it RespectDemand). Same for objective, is this a Cost, Revenue or so? Also, when you come back later, you are able to read the model-tree and understand what the model does. Just as an illustration:
Sign up
Already have an account? Login
Please use your business or academic e-mail address to register
Login to the community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.


