package MpmasMILPSOS;
use strict;
use warnings;
use Exporter;
use Storable qw(dclone);
use Data::Dumper;
use MpmasQLModelElementAbstract;

our @ISA = qw(MpmasQLModelElementAbstract);

##class variables
sub defaultclass {"sos"};
sub list_of_default_fields { 
	my @array = qw(name type priority);
	return \@array;
}
sub list_of_attribute_fields{
	my @array = qw(othermilp othermilp_subelements name type priority activity_list);
	return \@array;
}
sub list_of_attribute_stubs {
	my @array = qw(orow_);
	return \@array;
}
my %defaults = (
	name	=>	"N/A",
	type	=>	3,
	priority	=>	1000,
);
sub get_default_value {
	return $defaults{$_[1]};
}
sub set_default_value {
	$defaults{$_[1]} = $_[2] ;
}

##specific accessor classes


sub add_activities {
    my $self = shift;
    push @{$self->{activity_list}}, @_;
}
sub number_of_activities_in_set {
    return scalar @{ $_[0]->{activity_list} } if (exists  $_[0]->{activity_list} );
    return 0;
}
sub activities {
   return @{$_[0]->{activity_list}}  if (exists  $_[0]->{activity_list} );;
    return undef;
}
1;
