How do I implement a "lookup-table"? FAQ
Posted: Tue Aug 10, 2021 3:53 pm
In my case the determinant is the summation of the variables from U1 to Ux that have been introduced as a binary variable to GAMS. In each iteration during the optimization these variables are set to 0 or 1 but the structure of these variables should be considered in the optimization process, for example:
The setting of variables in each iteration will be changed to reach the optimal point but each setting of variables has a cost (corresponding Value in the "lookup-table") that should be considered in the objective function.
- if (u1=1, u2=0, u3=1, u4=1) then s=10
- if (u1=0, u2=1, u3=0, u4=1) then s=100
- if...
Code: Select all
determinant corresponding Value
1-0-1-1 10
0-1-0-1 100
...