Vusal Babashov
 Total activity 21
 Last activity
 Member since
 Following 0 users
 Followed by 0 users
 Votes 0
 Subscriptions 3
Activity overview
Latest activity by Vusal Babashov
Vusal Babashov commented,
x[D,485] <= 1.0 x[A,27] + x[A,42] <= 1.0 x[B,31] <= 1.0 x[C,185] <= 1.0 x[E,52] <= 1.0 In reality, I only need to add this one x[A,27] + x[A,42] <= 1.0 and the rest of the constraints are redundant...

Vusal Babashov commented,
What I mean is that the model is useful for assigning resources to stores. Each store has a predefined week for the assignment. If we know, which store a resource is assigned to, we will know what...

Vusal Babashov commented,
Hi Maliheh, Not really, since k is predefined (i.e., fixed) in reality, there was no point in adding week_id to the index list. So, I defined the variables as x_ik for specific i and k pairs and s...

Vusal Babashov created a post,
Groupby constraint Gurobipy Pandas
AnsweredHi Everyone, I have defined a decision variable x_ik using the pandas and gppd.add_vars() method. Below are the top 5 rows for a minimal example. week_id ...

Vusal Babashov commented,
Hi Riley Thanks for the approaches. Variable definition is fine for i, k and n but constrain is applied to certain subset of i,k and n. To clarify, the index i is the same on both sides of the cons...

Vusal Babashov commented,
For example, below is a filtered Pandas df for one set of i, k', k, n after data manipulation and wrangling. i k' k n 0 1 287 32 ...

Vusal Babashov commented,
Hi Riley: I have a following constraint which I am trying to implement. I am having a problem with aligning the indices. What would be the right approach to align LHS and RHS here? I am a bit conf...

Vusal Babashov commented,
Thanks very much!

Vusal Babashov commented,
Hi Riley: I start as follows: df= df_joined[['i', 's', 'k']].head()constraint_index = pd.Series(index = pd.MultiIndex.from_frame(df, names= ['i', 's', 'k'])) Then, I do the following: LHS, _ = y...

Vusal Babashov commented,
Hi Riley: While going through the LP file, I noticed a missing detail in the formulation of the constraint where index k is dependent on index s. Sorry about this mistake on my end. At the moment,...