The short answer: It depends. Either 10, 20 or 30 hours of simulator/FTD/ATD time may be used, but all of it must be with an approved instructor. None of it may be solo.
None of the requirements you posted are related to simulator time.
50 hours of Pilot in Command cross country
This can be done solo, as you are a rated pilot and thus PIC. This need not be solo XC and can be done with a passenger or CFI.
40 hours of simulated or actual instrument time
In this quote, simulated instrument time refers to time spent in the airplane during flight in visual meteorological conditions (VMC) that you are wearing a view-limiting device to simulate IMC. While wearing a view-limiting device you must be accompanied by another pilot who acts as your safety pilot. Thus, none of this time may be accomplished solo. You will always need another pilot either in simulated or actual instrument conditions.
15 hours of flight instruction towards Instrument Rating
This time may overlap with the above (actually, must overlap), the regulation reads (14 CFR 61.65 (d)(2)):
(2) Forty hours of actual or simulated instrument time in the areas of operation listed in paragraph (c) of this section, of which 15 hours must have been received from an authorized instructor who holds an instrument-airplane rating...
Now back to your question, what about simulator time? For this we look further down to 14 CFR 61.65 (h) and (i)
(h) Use of flight simulators or flight training devices. If the instrument time was provided by an authorized instructor in a flight simulator or flight training device—
(1) A maximum of 30 hours may be performed in that flight simulator or flight training device if the instrument time was completed in accordance with part 142 of this chapter; or
(2) A maximum of 20 hours may be performed in that flight simulator or flight training device if the instrument time was not completed in accordance with part 142 of this chapter.
(i) Use of an aviation training device. A maximum of 10 hours of instrument time received in an aviation training device may be credited for the instrument time requirements of this section if—
(1) The device is approved and authorized by the FAA;
(2) An authorized instructor provides the instrument time in the device;
(3) No more than 10 hours of instrument time in a flight simulator or flight training device was credited for the instrument time requirements of this section;
(4) A view-limiting device was worn by the applicant when logging instrument time in the device; and
(5) The FAA approved the instrument training and instrument tasks performed in the device.
The use of simulators and flight training devices is covered by (h) above, and the limit of 20 or 30 hours depends on how the training is conducted. In either case, note that time must be "provided by an authorized instructor". Section (i) deals with lesser training devices that are limited to 10 hours but is also required to be conducted by an authorized instructor.
Reprising the short answer, any time spent in a simulator, flight training device or aviation training device where you are solo or without an authorized instructor does not count toward anything. Sim time is only valid when conducted by an authorized instructor.