Vusal Babashov
- Total activity 21
- Last activity
- Member since
- Following 0 users
- Followed by 0 users
- Votes 0
- Subscriptions 3
Comments
Recent activity by Vusal Babashov-
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...
-
Thanks very much!
-
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...
-
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,...
-
Thank you very much. Adding LHS.notna() and RHS.notna() seems to solve the issue. LHS, RHS = y.align(u.groupby(["i", "k"]).sum(), join='left' or 'inner') also seems to work, but I need to do a bit...
-
You're right. The indices don't match, as seen below - the first is a subset of the other. Index([1, 3, 8, 2, 4, 6, 16, 9, 14], dtype='int64', name='i')Index([4, 2, 5, 3, 10, 1, 15, 11, 6, 8, 12, 7...
-
Below are the dtypes for y_is and u_ikn i int64s objectdtype: objecti int64k int64n int64dtype: object
-
INSTALLED VERSIONS------------------python : 3.9.9.final.0pandas : 2.0.0numpy : 1.24.2pytz : 2023.3dateutil : 2.8.2setuptools : 67.6.1pip ...
-
That would be very difficult for me to share. But here are a few tips that perhaps can help. LHS and RHS have the same number of - 12,427 - rows. When I print the difference, the indices are the sa...
-
Thanks, Riley. This is indeed a cleaner solution. This is the math programming I am trying to implement. As you can see, I have several misaligned constraints. However, when I try the constraint...