Skip to content

Commit

Permalink
Check if all the fields are present in the vessel specification in Ge…
Browse files Browse the repository at this point in the history
…nerateVesselsConfigFiles
  • Loading branch information
frabas committed Mar 16, 2017
1 parent 1b40855 commit c237121
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions GenerateVesselsConfigFiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@
vessel_specifications[i, "WorkHoursEnd"],
vessel_specifications[i, "firm_id"]
)
if(length(vessel_features)!=19) stop("Missing field(s) in the vessel specification input file!!!")



step_in_share <- rep(vessel_specifications[i, "N..of.vessels"]/ sum(vessel_specifications[, "N..of.vessels"], na.rm=TRUE), nb_stocks)
# i.e. 100 % of each TAC per stock will be booked for these new vessels
# catch equation parameters: totcatch_inkgperhour_thisspecies = exp( vesselspe_sp + metierspe_sp + (avaispe_sp_szgr * avai_sp_szgr *1000 * gearsel_szgr ) )
Expand Down
1 change: 1 addition & 0 deletions RunVesselsConfigFiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ getPolyAroundACoord <- function(dat, a_dist_m){
coord <- coord[sample(x=1:nrow(coord), size=ceiling(nrow(coord)*prop_to_keep), replace=FALSE ),]
# => e.g. keep 100 % of the potential grounds by default...but you might reduce this prop if untractable simus

# caution if prop_to_keep<1 then you´ll potentially have to redo the shortPaths library each time this present routine is re-run....
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------

Expand Down

0 comments on commit c237121

Please sign in to comment.