Merge various maps in the given component type from a base 
        component type.

        @param ct: Component type to be resolved.
        @type ct: lems.model.component.ComponentType

        @param base_ct: Component type to be resolved.
        @type base_ct: lems.model.component.ComponentType

def merge_component_types(self, ct, base_ct):
        """
        Merge various maps in the given component type from a base 
        component type.

        @param ct: Component type to be resolved.
        @type ct: lems.model.component.ComponentType

        @param base_ct: Component type to be resolved.
        @type base_ct: lems.model.component.ComponentType
        """

        #merge_maps(ct.parameters, base_ct.parameters)
        for parameter in base_ct.parameters:
            if parameter.name in ct.parameters:
                p = ct.parameters[parameter.name]
                basep = base_ct.parameters[parameter.name]
                if p.fixed:
                    p.value = p.fixed_value
                    p.dimension = basep.dimension
            else:
                ct.parameters[parameter.name] = base_ct.parameters[parameter.name]
            
        merge_maps(ct.properties, base_ct.properties)
        
        merge_maps(ct.derived_parameters, base_ct.derived_parameters)
        merge_maps(ct.index_parameters, base_ct.index_parameters)
        merge_maps(ct.constants, base_ct.constants)
        merge_maps(ct.exposures, base_ct.exposures)
        merge_maps(ct.requirements, base_ct.requirements)
        merge_maps(ct.component_requirements, base_ct.component_requirements)
        merge_maps(ct.instance_requirements, base_ct.instance_requirements)
        merge_maps(ct.children, base_ct.children)
        merge_maps(ct.texts, base_ct.texts)
        merge_maps(ct.links, base_ct.links)
        merge_maps(ct.paths, base_ct.paths)
        merge_maps(ct.event_ports, base_ct.event_ports)
        merge_maps(ct.component_references, base_ct.component_references)
        merge_maps(ct.attachments, base_ct.attachments)

        merge_maps(ct.dynamics.state_variables, base_ct.dynamics.state_variables)
        merge_maps(ct.dynamics.derived_variables, base_ct.dynamics.derived_variables)
        merge_maps(ct.dynamics.conditional_derived_variables, base_ct.dynamics.conditional_derived_variables)
        merge_maps(ct.dynamics.time_derivatives, base_ct.dynamics.time_derivatives)
        
        #merge_lists(ct.dynamics.event_handlers, base_ct.dynamics.event_handlers)
        
        merge_maps(ct.dynamics.kinetic_schemes, base_ct.dynamics.kinetic_schemes)

        merge_lists(ct.structure.event_connections, base_ct.structure.event_connections)
        merge_lists(ct.structure.child_instances, base_ct.structure.child_instances)
        merge_lists(ct.structure.multi_instantiates, base_ct.structure.multi_instantiates)

        merge_maps(ct.simulation.runs, base_ct.simulation.runs)
        merge_maps(ct.simulation.records, base_ct.simulation.records)
        merge_maps(ct.simulation.event_records, base_ct.simulation.event_records)
        merge_maps(ct.simulation.data_displays, base_ct.simulation.data_displays)
        merge_maps(ct.simulation.data_writers, base_ct.simulation.data_writers)
        merge_maps(ct.simulation.event_writers, base_ct.simulation.event_writers)