Sabrin Rashwan
I am currently pursuing a Master`s degree in operation research. In particular, my Master is about optimizing a variant of vehicle routing problem (VRPs).
- Total activity 51
- Last activity
- Member since
- Following 0 users
- Followed by 0 users
- Votes 11
- Subscriptions 13
Posts
Recent activity by Sabrin Rashwan-
How to get a more compacted version of some constraints?!
AnsweredDear all, I have the next information: R = [1,2,3,4,5] # no of requests rb = {1:1,2:-1,3:-1,4:1,5:1} # takes 1 or -1Cr1 = {1: C[0:3], 2:C[3:6], 3:C[6:9], 4:C[9:12], 5:C[12:15] }Cr2 = {1: C[15:18],2...
-
DARP: How to correctly calculate the Big-M value that exists in two inequalities?
AnsweredThe formulation includes a Big-M . Actually I am not sure of how to calculate it perfectly. I am sharing my calculations hereafter. This Big-M does exist in two inequalities. I can share the ineq...
-
Saved Log File of a MIP model: Read, Recall, Analyze
AnsweredI have programmed code for optimizing a vehicle routing problem. I have limited the runtime to 2 hours and saved the log to a file ''L2.log''. After obtaining the result I closed the spyder interfa...
-
How to remove a specific set of constraints from a bigger dictionary of constraints
AnsweredI have a constraint dictionary and a list of some infeasible arcs (i,j) Given that the list PD is part of N. ''' P = [1,2,3,4] #Pick-up nodesD = [5,6,7,8] # drop-off nodes, the range function does...
-
How to program correctly a list with list comprehension including if-statement ?
AnsweredI have n=4 and P = [1,2,3,4] , plus the next dictionnaries d1= {m+10: 0 for m in range(12)}d = {0:0, 1:15,2:30,3:15,4:30,5:15,6:30,7:15,8:30,9:0,**d1}c = {(i,j): np.round(np.hypot(xc[i]-xc[j], yc...
-
My Code takes too long time : how I perform Arc elimination to make it faster
AnsweredMy code aims at optimizing a NP-hard network problem. The network composes of 22 nodes and 484 arcs. I used v = m.getVars() & print(len(v)) to get the number of variables are 2986. However, when I...
-
Gurobi/python: infeasible model
AnsweredI have a model m . I want to code the two constraints shown in the figure correctly. The different set of data are as follows: ``` R = [1,2,3,4] K = [1,2] P = [1,2,3,4] D = [5,6,7,8] PD = P ...
-
Gurobi/Python: How to write the for statement correctly in a constraint ?
AnsweredI have the above constraint. I have written both the left-hand side and right- hand side. My problem is how to code the ''for'' statement where R, N, Cr are all sets. N\Cr means all elements in N ...
-
How to properly write a constraint with the right hand side needs to choose among three possible numbers
AnsweredI have a constraint with the right-hand side that needs to choose among three possible numbers. Regardless the left handside, my focus now is on the right-hand side. The constraint is shown in the ...
-
How to Code a parameter in Gurobi/python interface
AnsweredI have a model with some parameters, variables, and constraints. I have a problem mainly in coding the f parameter that required in a specific set of constraints. Indeed, this shown in the image be...