First of all we would need to know which National Code your local code is modelled after.
The International Residential Code(IRC) would permit the trap to be under the floor in the manner you illustrate providing the vertical rise of the input standpipe does not exceed 42" from the water level in the trap to the top of the standpipe.
On the other hand, The Uniform Plumbing Code(UPC) requires the trap to be in the same room as the standpipe and the vertical riser may not exceed 30". The lowest portion of the trap must also be 6" above the finished floor.
In regards to the AAV (Air Admittance Valve commonly called a Studor Vent). The IRC requires all structures to have one main vent which runs undiminished in size from the building main drain up and out through the roof. Additional auxillary vents may be terminated through the roof, through the wall, in the attic space or an unlimited number of AAV's.
The UPC requires ALL vents to terminate through the roof, except it will permit a maximum of one Air Admittance Valve per structure with the expressed written approval of your local inspector. (Normally they only allow the use of an AAV for a kitchen sink when installed in an Island, an even then they prefer you install an Island Loop Vent).
If an AAV is permitted in your locality, the base of the AAV must be a minimum of 4" above the highest water level of the trap it serves, however I would recommend placing it as high as is practical for the location while keeping in mind that an AAV must remain accessible for service or inspection.
With the singular exception of a "RODDING TEE" used to make a cleanout, all lines connecting to a horizontal line must be connected by means of a Wye, Wye & 1/8 bend or a Combo. You may not install a Sanitary Tee in a horizontal line with the side opening of the Tee going vertical.
When installing an AAV or auxillary vent you must keep a minimum clearance of 2x the pipe diameter from the Trap to the vent connection. In this case the horizontal line is 2" so there MUST BE a minimum of 2" x 2= 4" clearance from the trap weir (The point where the water spills out of the trap) to the vent opening.
The size of all lines is determined by the number and type of fixtures served by that line. The codes assign a DFU(drainage fixture unit) load value to each fixture and at each point in the DWV(Drain, Waste & Vent) system we must compute the number of DFU's on that specific line, then select the pipe diameter according to the load except in some instances the code may require a fixture to have a specific minimum. By example a clothes washer standpipe is rated at 2DFU's and a laundry sink is 2DFU's but we may compute them in combination as a Laundry group which is rated at 3DFU's.
The codes permit an 1-1/2" line to carry up to 3DFU's however the code has an exception that requires the washer standpipe to be a 2" line, therefore in your application the horizontal branch line should be a 2" line.