Question related to the load of the strategy #7

Closed
opened 2021-04-30 14:31:56 +00:00 by samueleresca · 2 comments
samueleresca commented 2021-04-30 14:31:56 +00:00 (Migrated from github.com)

Hi @mwhittaker,

I see in the comments you mentioned the following definition for the load in the optimal strategy:

 load(a) = (fr * rprob(a) / rcap(a)) + (fw * wprob(a) / wcap(a))

In the following examples, you define the constraint:

 min l subject to
               fr * r0 * rcap(a) + fw * (w0 + w1) * wcap(a) <= l
               fr * r0 * rcap(b) + fw * (w2 + w3) * wcap(b) <= l
               fr * r1 * rcap(c) + fw * (w0 + w2) * wcap(c) <= l
               fr * r1 * rcap(d) + fw * (w1 + w3) * wcap(d) <= l

Am I right to assume that it is a typo in the comments, and it should be like this:

 min l subject to
               fr * r0 / rcap(a) + fw * (w0 + w1) / wcap(a) <= l
               fr * r0 / rcap(b) + fw * (w2 + w3) / wcap(b) <= l
               fr * r1 / rcap(c) + fw * (w0 + w2) / wcap(c) <= l
               fr * r1 / rcap(d) + fw * (w1 + w3) / wcap(d) <= l

Or am I missing something?

Thanks

Hi @mwhittaker, I see in the comments you mentioned the [following definition](https://github.com/mwhittaker/quoracle/blob/7c7223bd6d30faae3c55dfde9df9fa406656ef11/quoracle/quorum_system.py#L355) for the load in the optimal strategy: ``` load(a) = (fr * rprob(a) / rcap(a)) + (fw * wprob(a) / wcap(a)) ``` In the following examples, you define the constraint: ``` min l subject to fr * r0 * rcap(a) + fw * (w0 + w1) * wcap(a) <= l fr * r0 * rcap(b) + fw * (w2 + w3) * wcap(b) <= l fr * r1 * rcap(c) + fw * (w0 + w2) * wcap(c) <= l fr * r1 * rcap(d) + fw * (w1 + w3) * wcap(d) <= l ``` Am I right to assume that it is a typo in the comments, and it should be like this: ``` min l subject to fr * r0 / rcap(a) + fw * (w0 + w1) / wcap(a) <= l fr * r0 / rcap(b) + fw * (w2 + w3) / wcap(b) <= l fr * r1 / rcap(c) + fw * (w0 + w2) / wcap(c) <= l fr * r1 / rcap(d) + fw * (w1 + w3) / wcap(d) <= l ``` Or am I missing something? Thanks
mwhittaker commented 2021-04-30 14:44:02 +00:00 (Migrated from github.com)

Oops! You're not missing anything. That's 100% a bug. Just pushed a commit to fix it. Thankfully, even though I messed up the comments, I got it right in the code (reads and writes). Thanks so much @samueleresca for finding this! I hope you're enjoying the code :)

Oops! You're not missing anything. That's 100% a bug. Just pushed a commit to fix it. Thankfully, even though I messed up the comments, I got it right in the code ([reads](https://github.com/mwhittaker/quoracle/blob/d83a811a905a51fc13ebc00ddac036d559463380/quoracle/quorum_system.py#L531) and [writes](https://github.com/mwhittaker/quoracle/blob/d83a811a905a51fc13ebc00ddac036d559463380/quoracle/quorum_system.py#L535)). Thanks so much @samueleresca for finding this! I hope you're enjoying the code :)
samueleresca commented 2021-04-30 14:54:49 +00:00 (Migrated from github.com)

I'm reading the paper and having an in-depth look at the code, and I'm finding it really interesting; I'm learning a lot, amazing work.

Thanks @mwhittaker 👍🏻

I'm reading the paper and having an in-depth look at the code, and I'm finding it really interesting; I'm learning a lot, amazing work. Thanks @mwhittaker 👍🏻
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: greg/quoracle#7
No description provided.