This page picks up from the Mason file with Variables example. We are starting to get into more advanced topics like what sort of algebraic expression is valid, and more details about models, devices, and optimization, which will require some additional reading to use fully.
Optimization
Both variables and the arguments of the device can be optimized.
<?xml version="1.0"?>
<mason>
<freq start="100 MHz" stop="200 MHz" step="5 MHz" />
<output name="sample.out" />
<variables>
<f_mid value="150 MHz" > <opt min="100 MHz" max="200 MHz" step="0.1 MHz" />
</f_mid>
</variables>
<model alias="TL">
<primitive name="simple_transmission_lines/lossless_transmission_line.xml" />
</model>
<port number="1" node="1" impedance="50" />
<port number="2" node="2" impedance="100" />
<TL node_list="1 2" >
<z0 value="75" > 75 will be the initial value
<opt min="50" max="100" step="0" />
</z0>
<f0 value="f_mid" />
<theta value="90 deg" />
</TL>
<optimization>
<random iterations="1000" />
<simplex iterations="2" />
<goal calculation="20*log10(abs(S_1_1))" min="-1000" max="-20" />
</optimization>
<flag output_data_format="dB" set_width="15" />
</mason>
Optimization
Both variables and the arguments of the device can be optimized.
<?xml version="1.0"?>
<mason>
<freq start="100 MHz" stop="200 MHz" step="5 MHz" />
<output name="sample.out" />
<variables>
<f_mid value="150 MHz" > <opt min="100 MHz" max="200 MHz" step="0.1 MHz" />
</f_mid>
</variables>
<model alias="TL">
<primitive name="simple_transmission_lines/lossless_transmission_line.xml" />
</model>
<port number="1" node="1" impedance="50" />
<port number="2" node="2" impedance="100" />
<TL node_list="1 2" >
<z0 value="75" > 75 will be the initial value
<opt min="50" max="100" step="0" />
</z0>
<f0 value="f_mid" />
<theta value="90 deg" />
</TL>
<optimization>
<random iterations="1000" />
<simplex iterations="2" />
<goal calculation="20*log10(abs(S_1_1))" min="-1000" max="-20" />
</optimization>
<flag output_data_format="dB" set_width="15" />
</mason>