Changes

Jump to navigation Jump to search
2,006 bytes added ,  22:02, 16 April 2016
Follow instructions given on the website. Macs already come with Perl, using the stackbuilder application which was also downloaded through the same link, download the PL/Perl package.
 
==Additional Findings==
 
The NHL as an organization cares about players birthdays as of June 30th of the season year, this determines players eligibility for contracts UFA and 35-plus. Due to this as of now age is calculated based on June 30th cut off.
 
RFA: Player has fewer than seven years of accrued seasons AND younger than 27 at the end of a league year using June 30th as cut off.
UFA: More than 7 years of accrued seasons OR is 27 or older at the end of a league year.
35-plus: Automatically in effect when a player reaches 35 in the cut off of a certain season.
Exceptions to the RFA, UFA rules occur when listed in source.
 
There are no loans in the NHL (trades only), so when a player has switched teams we take the last team in the string of teams as that is where he probably spent most of the season. Also contract ownership switches from team to team with a caphit somewhere between 50-100% taken on by the new team.
 
Is CPI necessary??
 
Use this syntax to dump a database:
pg_dump dbname > outfile
 
Restoring a database:
psql dbname < infile
 
Sources:
[https://en.wikipedia.org/wiki/NHL_salary_cap#Trades_and_salary_retention]
[https://www.reddit.com/r/hockey/wiki/contracts#wiki_entry_level_contracts_.28elc.29_and_elc_slides]
==Variables==
$signbonus =~ s/[^\d]//g;
Now with all that you should have all of the data that I looked for in its own variable, to do whatever you want with.
 
==Deciding Contract Type==
 
Simple decisions:
*We have contract type declared as Entry Level or Thirty-Five Plus -- Just use this
*If previous contract was TFP then TFP
*We have contract type declared as Standard or NULL then:
**Age based choices:
**If age >=27 & <35 and new contract then UFA
**If age > 35 and new contract then TFP
**If Age is <=21 and length is 3 then Entry Level
**If Age is >=22 <24 and length is 2 then Entry Level
**If Age is >=24 <25 and length is 1 then Entry Level
**If Age is <25 and he doesn't have the right length then RFA
**If age > 25 <= 27 then RFA
*If contract type is Standard and Exp Status is RFA then RFA
*If the player has a previous contract, use its expiry status, irrespective of whether type is Standard or NULL
Anonymous user

Navigation menu