Matrix of variables

10 views
Skip to first unread message

Atefe Naderi

unread,
May 3, 2024, 9:42:04 PMMay 3
to AMPL Modeling Language
Hello everyone, 
I have 4 variables like this:
var p0;
var b;
var x;
var y;
And I want to create a matrix of these variables with dimensions (4*1) like so:
var X = [p0, b, x, y]
Could anyone please provide me with the syntax for this matrix? Furthermore, I would like to express the following constraint:
A * X < B .
Where A and B are matrixes of values that I have defined previously. Thank you.
Atena.

AMPL Google Group

unread,
May 4, 2024, 8:19:28 AMMay 4
to AMPL Modeling Language
Your question has been moved to our new user forum at discuss.ampl.com, and a response has been posted there. To see the response, use this link:

https://discuss.ampl.com/t/matrix-of-variables/1084/2

To reply, click the red "Reply" button that follows the response. (Do not send an email reply to this message.)


--
Robert Fourer

We're switching to a new, enhanced user forum.
Join it now at discuss.ampl.com.
{#HS:2588132682-124399#}
Reply all
Reply to author
Forward
0 new messages