Jump to content

lwebzem

Members
  • Posts

    6
  • Joined

  • Last visited

Retained

  • Lepton

lwebzem's Achievements

Lepton

Lepton (1/13)

10

Reputation

  1. Does anyone know links to forums (similar like this) for using Lingo (Lindo) modeling or optimization, math modeling, computer science algorithms? Thanks.
  2. I would first build the graph for all possible contacts and then apply dynamic programming. Here is the first step: Input data in the form for each contract ordered by starttime START_TIME END_TIME COST id N number of contracts FOR i=1 TO N END_NODE= True MIN_END_TIME=99999 FOR j=i+1 TO N IF MIN_END_TIME <= START_TIME(j) THEN EXIT FOR 'we are done for node i ELSE IF END_TIME(j) < MIN_END_TIME THEN MIN_END_TIME=END_TIME(j) END IF END IF IF START_TIME(j) >= END_TIME(i) THEN W(i,j)=Cost(i) END_Node=False END IF NEXT IF END_Node=True then ' I am adding the end node so ' all paths will be finished in this node W(i,N+1)=0 END IF NEXT ' Now adding the start node FOR i=1 to N W(0,i)=Cost(i) NEXT ' So the weight for link from START node to node 1 is the cost of contract 1 ' the weight for link from node 4 to node 5 is the cost of contract 5 and so on.... Now I believe we can apply the dynamic programming to find path from START node to END node with max sum of weight whict will be prophit or cost from contracts. It will be similar to finding shortest path algorithm.
  3. You are very welcome. To have a more gradual curve instead of e=2.71 use any number between 1 and 2.71 ( 1 < e < 2.71...) for example we can take e=2, and here is how it looks: rank 0 1 2 3 4 e=2 1 0.5 0.25 0.125 0.065 e=2.71 1 0.369 0.136 0.05 0.018 Everything will be the same, only need to change e=2.71 to another number. Let me know please if any other questions. Thanks.
  4. Here is the exponentional model: I am going to use exp function y=e^(-rank) where e=2.71..... ^ is for power and rank is ranks: 0,1,2,3,4,5....RL where 0 rank is for the best perfomer, 1 is for next to best, and so on and RL is rank of lowest performer. If you use another counting then ajustment should be done. So the best performer will get max payout because e^(-0) = 1 the next to best will get e^(-1)=1/e next will get e^(-2)=1/(e*e) and so on. (This is only percent not the dollar amount) This way we have exponentional distribution. To get actual dollar amount we use equation Sum(X*e^(-rank(i))=N*Fee where rank(i) is rank for ith performer so the algo will be 1. X=(N*Fee)/Sum(e^(-rank(i)) 2. payout for performer i will be Payout=X*e(-rank(i)) where rank(0) is rank of the best performer The Sum is geometric progression with q=1/e and can be simplified Sum=(((1/e)^N)-1)/((1/e)-1)=(q^N-1)/(q-1) The calculations for max. payout will be the same assuming that q^N ~ const as N getting bigger.
  5. Here is my model: Let's the MAX rank achieved by someone is Rank_Max The payout for this user will be X. Because each user is getting paid based on the perfomance(rank) the payout for each user will be X*(Rank(I))/Rank_MAX) where Rank(I) is rank of user I. The sum of all payouts should be = to Number_of_users*Fee where Fee is enry fee So we have Sum(X*Rank(I)/Rank_MAX)=Number_of_users*Fee OR X*Sum(Rank(I)/Rank_MAX)=Number_of_users*Fee Based on this the algo should be: 1. X= Number_of_users*Fee / Sum(Rank(I)/Rank_MAX) 2. Payout(I)=X * Rank(I)/Rank_Max for each user I To max payout we can try to change the entry Fee. With incresement of entry fee the number of users will go down. Let's B will be the number of users when fee=0, assuming linear dep. we can say then Number_of_users=B-A*Fee with some fee there will not be any users.Let's say the lowest such fee is Fee_Max and since 0=B-A*Fee_Max => A=B/Fee_Max To max payout we need to max X which is X= Number_of_users*Fee / Sum(Rank(I)/Rank_MAX) OR X=(B-A*Fee)Fee/Sum(Rank(I)/Rank_MAX)) Taking deriv. by Fee to find max: B-2A*Fee_opt=0 OR Fee_opt=B/2A science A=B/Fee_Max we can say that Fee_opt=Fee_Max/2 So, the max payout will be for Fee_Max/2
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.