MATLAB Gurobi model.A
回答済みHi everyone, in creating model.A in MATLAB, how do I model x(t-1) in the constraint below?
x(t) - x(t-1) = scalar value
where
x(t) - value of x at time t
x(t-1) - value of x at time t-1
Thank you.
0
-
Hi Elvin,
For these particular constraints, you have to define your matrix to have T columns and T-1 rows, where T is the number of x variables. Then set the diagonal marix entries to -1 and the upper off-diagonal entries to 1. For an example of how to define the A matrix, please refer to our MATLAB examples. In particular, you could have a look at the facility.m example.
Best regards,
Jaromił1 -
Hi Jaromił,
Thank you very much for these information! Highly appreciated
0
サインインしてコメントを残してください。
コメント
2件のコメント