Forum Discussion
FICO
5 years agoCommunity Manager
mpvar variables and identifiers
Hi, Is it possible to sum a mpvar and an integer variable into an index of another mpvar ? Example: declarations
x: array(1..10,1..5) of mpvar
y: mpvar
end-declarations
y is_integer
y <= 2
fo...
FICO
5 years agoCommunity Manager
Thank you.
I'll try to provide more detailed info.
For instance, consider 2 decision variables. Start(i,j) is 1 if task i starts at j and Finish(i,j) is 1 if task i finish the job at j.
If the time between start and finish is known, I can perform the following constraint:
declarations
Start: array(1..nTask, 1..nTime) of mpvar
Finish: array(1..nTask, 1..nTime) of mpvar
time: array(1..nTask) of integer
end-declarations
forall(i in 1..nTask, j in 1..nTime)Start(i,j) = Finish(i,j+time(i))But now, if several options of time are available, for instance between 1 and 4, I want also to optimize the best choices of it.
Related Content
Related Content
I have an optimization model where setting certain variables can lead to constraint violations. Is there a way to identify and remove all infeasible constraints before solving the model?
1 year agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum2 unread comments2 unread0Views0likes2CommentsVariable names in callback (Java API)
I construct a cut in a preintsol callback using variables from the model containing the callback. When constructing the model, I give the variables names (using withName(...)) and store them in a vec...9 months agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum4 unread comments4 unread1View0likes4CommentsMPVAR mod integer
Hi all, I'm wondering is it possible to modulo an mpvar. I have a set of mpvars Xs which are binary and I want to have Sum(i in set) Xi mod 2 = 0 (in other words), the sum of the binary variabl...9 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum2 unread comments2 unread0Views0likes2Comments