Calculates the time-domain solution of the circuit. The instr will be stored in the .timeSolve attribute of the instr object. :param instr: SLiCAP instruction object that holds instruction data. :type instr: SLiCAPinstruction.instruction :return: instr of the execution of the
(instr)
| 1035 | return instr |
| 1036 | |
| 1037 | def _doTimeSolve(instr): |
| 1038 | """ |
| 1039 | Calculates the time-domain solution of the circuit. |
| 1040 | |
| 1041 | The instr will be stored in the .timeSolve attribute of the instr object. |
| 1042 | |
| 1043 | :param instr: SLiCAP instruction object that holds instruction data. |
| 1044 | :type instr: SLiCAPinstruction.instruction |
| 1045 | |
| 1046 | :return: instr of the execution of the instruction. |
| 1047 | :rtype: SLiCAPinstruction.instruction |
| 1048 | """ |
| 1049 | instr = _doSolve(instr) |
| 1050 | if instr.step: |
| 1051 | for solution in instr.solve: |
| 1052 | timeSolution = sp.zeros(len(solution), 1) |
| 1053 | for i in range(len(solution)): |
| 1054 | laplaceinstr = solution[i] |
| 1055 | timeSolution[i] = ilt(laplaceinstr, ini.laplace, sp.Symbol('t')) |
| 1056 | instr.timeSolve.append(timeSolution) |
| 1057 | else: |
| 1058 | timeSolution = sp.zeros(len(instr.solve), 1) |
| 1059 | for i in range(len(instr.solve)): |
| 1060 | laplaceinstr = instr.solve[i] |
| 1061 | timeSolution[i] = ilt(laplaceinstr, ini.laplace, sp.Symbol('t')) |
| 1062 | instr.timeSolve = timeSolution |
| 1063 | return instr |
| 1064 | |
| 1065 | def _doMatrix(instr): |
| 1066 | """ |
no test coverage detected