I want to implement a fixed-frequency sawtooth generator with a peak voltage (Vpk) that I can control using an external variable (Vx). I created a simple circuit using a voltage controlled current source, a capacitor, and a reset switch like the figure below. However, this circuit increase the single simulation time from 0.2 second to 2.7 second. The time factor is important for me because I am doing thousands of simulation runs (optimization loop).
Is there a simpler and faster way to implement this variable-peak sawtooth generator (ideal ways are ok)?