#!jraceman -import
!exportVersion 1
!appInfo JRaceman v1.1.5+
!type database

#This Simplan shows how you can set up a progression that splits the
#boats up into "flights" based on overall finishing place in the heats.
#This is used for Dragon Boat racing in Sudbury, Ontario, Canada.
#The sample progression "I" is for 55 to 60 boats.  If you have a different
#number of boats, you should create the appropriate progression for that
#many boats.  That plan will look similar to the "I" progression except for
#having different numbers of Sections in SimplanStages and different numbers
#of Next Best Time in SimplanRules.

!table Stages
!columns "id","name","number","isFinal"
"S.SDBF01","Heat",1,null
"S.SDBF02","Blue Semi",2,null
"S.SDBF03","Green Semi",3,null
"S.SDBF04","Red Semi",4,null
"S.SDBF05","Blue Final",5,true
"S.SDBF06","Green Final",6,true
"S.SDBF07","Red Final",7,true

!table Simplans
!columns "id","system","plan","minEntries","maxEntries"
"SP.SDBF01","SDBF","DF",1,6
"SP.SDBF10","SDBF","I",55,60

!table SimplanStages
!columns "id","simplanId","stageId","sectionCount","fillOrder"
"SS.SDBF.DF1","SP.SDBF01","S.SDBF07",1,null
"SS.SDBF.I1","SP.SDBF10","S.SDBF01",10,"SEQ_SEQ"
"SS.SDBF.I2","SP.SDBF10","S.SDBF02",4,"SNAKE"
"SS.SDBF.I3","SP.SDBF10","S.SDBF03",3,"SNAKE"
"SS.SDBF.I4","SP.SDBF10","S.SDBF04",3,"SNAKE"
"SS.SDBF.I5","SP.SDBF10","S.SDBF05",4,"SEQ"
"SS.SDBF.I6","SP.SDBF10","S.SDBF06",3,"SEQ"
"SS.SDBF.I7","SP.SDBF10","S.SDBF07",3,"SEQ"

!table SimplanRules
!columns "id","simplanId","fromStageId","toStageId","thruPlace","nextBestTimes"
"SR.SDBF.I1","SP.SDBF10","S.SDBF01","S.SDBF04",null,18
"SR.SDBF.I2","SP.SDBF10","S.SDBF01","S.SDBF03",null,18
"SR.SDBF.I3","SP.SDBF10","S.SDBF01","S.SDBF02",null,24
"SR.SDBF.I4","SP.SDBF10","S.SDBF04","S.SDBF07",1,15
"SR.SDBF.I5","SP.SDBF10","S.SDBF03","S.SDBF06",1,15
"SR.SDBF.I6","SP.SDBF10","S.SDBF02","S.SDBF05",1,20
