7 # Don't edit the line below, it must look exactly like this.
8 # Everything above this line will be replaced #
23 my $cmd_line = $0 . " " . join( " ", @ARGV );
27 my $res = GetOptions( \%options,
28 @common_options::get_opt_strings );
32 common_options::set_globals( \%options );
34 common_options::online_help('execute', \%options, undef,{},{});
36 if ( scalar( @ARGV ) < 1 ){
37 print "At least one model file must be specified. Use 'execute -h' for help.\n";
41 ui -> category( 'modelfit' );
43 random_set_seed_from_phrase( $options{'seed'} ) if ( defined $options{'seed'} );
45 ui -> category( 'modelfit' );
47 debug -> level( $options{'debug'} );
48 debug -> package( $options{'debug_package'} );
49 debug -> subroutine( $options{'debug_subroutine'} );
50 debug -> warn_with_trace( $options{'warn_with_trace'} );
54 my $eval_string = common_options::model_parameters(\%options);
57 if( $options{'outputfile'} ){
58 @outputfiles = split( /,/, $options{'outputfile'} );
61 foreach my $model_name ( @ARGV ){
62 my $outputfile = shift @outputfiles;
63 my $model = model -> new ( eval( $eval_string ),
64 outputfile => $outputfile,
65 filename => $model_name,
66 ignore_missing_output_files => 1 );
68 push( @{$models_array}, $model );
71 my $modelfit = tool::modelfit ->
72 new ( eval( $common_options::parameters ),
73 models => $models_array );
75 open(CMD, ">", $modelfit -> directory . "/command.txt");
76 print CMD $cmd_line, "\n";
80 #$modelfit -> print_results;