Documentation‎ > ‎

Write a Mason File with Optimization

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.


Both variables and the arguments of the device can be optimized

     <?xml version="1.0"?>                                                               
        <freq start="100 MHz" stop="200 MHz" step="5 MHz" />                             
        <output name="sample.out" />                                                     
           <f_mid value="150 MHz" >                                                                    <opt min="100 MHz" max="200 MHz" step="0.1 MHz" />                          
        <model alias="TL">                                                               
           <primitive name="simple_transmission_lines/lossless_transmission_line.xml" /> 
        <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" />                                        
           <f0 value="f_mid" />                                                          
           <theta value="90 deg" />                                                      
           <random  iterations="1000" />                                                 
           <simplex iterations="2" />                                                    
           <goal calculation="20*log10(abs(S_1_1))" min="-1000" max="-20" />             
        <flag output_data_format="dB" set_width="15" />