Forum Discussion
FICO
6 years agoCommunity Manager
Need help to solve E-101: Incompatible types in assignment ('array of linctr' := 'linctr')
I am trying to solve a simple routing model using Xpress, but I obtain the error message as stated above. The error appears in every constraint where I have declared the constraint as Contraint: arr...
FICO
6 years agoCommunity Manager
You need to employ the index value (or index tuple) when enumerating the entries of an array of 'linctr', just like what you are doing for other types of arrays (eg array of mpvar) in your example:
forall (tt in TimePeriods)
CargoCon(tt) :=
l(tt) = l(tt-1) + sum(ii in Locations) q(ii,tt); ! NB: there probably needs to be a test on the 'tt-1' index, perhaps something like: if(t>1, l(tt-1), 0)
Related Content
Related Content
Error 101: Incompatible types in assignment (robustctr := uncertainctr not defined)
I know that this is not possible in its current form, as it fails, but this is what I am trying to do. I am trying to take an uncertain pricing variable (DAUNC) and multiply it by an uncertain load ...5 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum1 unread comment1 unread0Views0likes1CommentError 101: Incompatible types for operators
I'm trying to optimize a Power System economic dispatch. My code is the following: model ProblemaMultimodal uses "mmxprs"; !Declaraciones de varaibles y parámetros declarations Pg1:mpvar Pg2...3 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum1 unread comment1 unread0Views0likes1CommentThe assignment target is invalid. You can assign values only to variables, properties and indexed properties
Hi There, When I am comprising enum to enum then getting this error msg. for comprising I am using =, is, and .equals(object) The assignment target is invalid. You can assign values only to varia...0Views0likes1Comment