Hello! I have a problem and I hope someone can help me.

I have a 2-dimensional array in Excel and I load it to Xpress IVE optimisation suite as integer values or as strings (code below uses integer). However in a separate file I write some functions and I need this data in the linctr datatype. Till so far, this does not work. Does anybody know how to do this?

X: array(1..9,1..4) of integer

!Transfer X(integer) to linctr

function Test():linctr

declarations

lTest:linctr

end-declarations

lTest:=linctr(X(1,1))

returned:=lTest

end-function

Here is how you could write your conversion subroutine 'Test' (assuming that the provided value is to be treated as the RHS value of the constraint):

function Test(v:integer):linctr

setcoeff(returned, v)

end-function

X(1,1):=3

myctr:=Test(X(1,1))

writeln(getcoeff(myctr)) ! Output: 3