Product of Binvar and Real number

22 views
Skip to first unread message

Ayub Afridi

unread,
Oct 13, 2023, 11:37:32 AM10/13/23
to YALMIP
Hello John! i hope you are well. i have writing this problem because i know you can help.
i am trying to create a constraint which is MILP based optimization.
in the constraint i am doing a product of binvar with real number and the resultant is NaN.
can you tell me if its a logical mistake or else? if the optimization model is not solved or executed completly then the decision variables (binary and real) always gives NaN?
below is the equation in which i am interested
mu_product(end+1) = path.mu_matrix{server_index, service_index, time} * services.reqs(service_idx);

path.mu_matrix is binary decision variable;
services.reqs are just a real number (2000);

Johan Löfberg

unread,
Oct 13, 2023, 1:49:55 PM10/13/23
to YALMIP
sounds like you are inserting an sdpvar in a double

Ayub Afridi

unread,
Oct 16, 2023, 5:02:42 AM10/16/23
to YALMIP
Hello John! i saw the problem mentioned in the links you shared,but none of them provides any solution, i mean there is no solution provided how to insert or work around with inserting sdpvar into double

Johan Löfberg

unread,
Oct 16, 2023, 5:11:26 AM10/16/23
to YALMIP
Do you mean that you have managed to setup the model, but the solution is nan after making a call to a solver? You haven't told us what the diagnostic code is when you call optimize so we have no idea what has happened
Reply all
Reply to author
Forward
0 new messages