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
Binary variables that indicate whether a task 'i' is in process at time 'j' could be connected up as follows using the 'ifstart' and 'iffinish' variables (NB: I am using 'duration' for the task processing duration which, I assume, is a more suitable name in place of the 'wait' from my previous code example). I am also correcting the relation linking start, duration, and finish times per task from my previous example:
declarations
x: array(1..nTask, 1..nTime) of mpvar ! Processing indicators
duration: array(1..nTask) of mpvar ! Task processing duration
end-declarations
forall(i in 1..nTask,j in 1..nTime) do
x(i,j) is_binary
sum(k in 1..j) ifstart(i,k) >= x(i,j)
sum(k in 1..j) (ifstart(i,k)-iffinish(i,k)) <= x(i,j)
end-do
forall(i in 1..nTask) do
sum(j in 1..nTime) x(i,j) = duration(i)
tstart(i)+duration(i) = tfinish(i)
end-doRelated 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