title: Parametrised Modelica library and possibility to use models as parameters
body: <p>I try to make a parametrised library.  I works fine using packages and connectors as parameters.</p>
  
  <p>Using a model as a parameter is also possible.
  However, if the model is used in the library to build new models using extend, then it is not allowed, what I understand.</p>
  
  <p>I wonder if the library contains a model with inner/outer style of connector, is it then allowed to let the inner model to be a parameter of the library?</p>
  
  <p>Below a simple example to illustrate the problem. TEST is the library and Fish3b is an application. When I run the Example in the library TEST it all works, but when I have a separate application file it does not. </p>
  
  <p>The error text is: cannot find class declaration for AquariumType running JModelica 2.4</p>
  
  <pre><code>package TEST
  
     model FishType1
         outer Real T;
         Real health;
     equation
         health = 30-T;
     end FishType1;
  
     model FishType2
         outer Real T;
         Real health;
     equation
         health = 32-T;
     end FishType2;
  
     package Equipment
         model AquariumType
             replaceable model FishType
             end FishType;       
             FishType fish;
             inner Real T;
         equation
            T = 29;
         end AquariumType;
     end Equipment;
  
     // Adapt AquariumType model to actual fish
     model Aquarium
         import TEST.Equipment.AquariumType;
         extends AquariumType(redeclare model FishType=FishType2);
     end Aquarium;
  
     // Example
     model Example
         Aquarium aquarium;
     end Example;
  
  end TEST;
  </code></pre>
  
  <p>And below an example of application code that import from library above
   - and here is some error I think.</p>
  
  <pre><code>   encapsulated package Fish3b
  
         model FishType3
             outer Real T;
             Real health;
         equation
             health = 34-T;
         end FishType3;
  
         // Adapt package Equipment with AquariumType model to actual fish
         package Equipment3 
             import TEST.Equipment;
             extends Equipment.AquariumType(redeclare model   FishType=FishType3);
         end Equipment3;
  
         // Example
         model Example
             import Fish3b.Equipment3;
             Equipment3.AquariumType aquarium;
         end Example;
  
     end Fish3b;
  </code></pre>