package MpmasMILPSet;

use strict;
use warnings;
use Exporter;
use Storable qw(dclone);
use Data::Dumper;
use SimpleObjectRegistry;
use MpmasInputBlock;
use SimpleObject;
use IndexedTable;
#use MpmasMILP;
#use MpmasMILPMultiperiod;


our @ISA = qw(MpmasInputfileSet);

sub class_of_files{
	my ($self) =  @_;
	if ($self->config_entry("MULTIPERIOD")) {
		require MpmasMILPMultiperiod;
		return "MpmasMILPMultiperiod";
	}
	else {
		require MpmasMILP;
		return "MpmasMILP";
	}
 }
sub filename {
	return "MILPSet";
}
sub determine_files {
	my $self = shift;
	for my $i (@{ $self->milplist}) {
	    $self->add_file($i, sprintf("%01d", $i));		
	}
}

sub prepare_shared_files {
	my $self = shift;
	my $standard_milp = $self->file($self->class_of_files . "_". MpmasInputfile::DEFBASEMILP);
	$standard_milp->prepare_shared();
}

sub prepare_special_files {
	my $self = shift;
	for my $f ($self->files) {
		$f->prepare_special(@_);
	}
}
1;
