Solve function modified to support diodes

Still fails two tests, though - solve check for diodes doesn't seem to run, all diodes are assumed to be forward biased