code: def write_case_data(self, file):
          
          file.write("function mpc = %s\n" % self._fcn_name)
          file.write('\n%%%% MATPOWER Case Format : Version %d\n' % 2)
          file.write("mpc.version = '%d';\n" % 2)
  
          file.write("\n%%%%-----  Power Flow Data  -----%%%%\n")
          file.write("%%%% system MVA base\n")
          file.write("%sbaseMVA = %g;\n" % (self._prefix, self.case.base_mva))
docs: Writes the case data in MATPOWER format.