modelicaでは、2つのスペースを接続し、ある程度の距離を置いた後、それらの間にオブジェクト、たとえばボールを渡す必要があります。私の例では、2つのスペースがあります。1つはフリースペース(力なし)で、突然、ボールに作用する地球のスペース(重力)の近くに入ります。最初のスペースから2番目のスペースにボールを渡すことができる必要がありますが、それを取得できません。これが最小限の例です。
model Ball
Real[2] position;
Real[2] velocity;
parameter Real mass=1;
equation
der(position) = velocity;
end Ball;
connector Flange
Real p;
flow Ball b;
end Flange;
model FreeSpace
Ball ball;
parameter Real length;
Flange f;
equation
// need to do something, probably here, to end the first space when ball is at length
end FreeSpace;
model NearEarth
extends FreeSpace;
parameter Real[2] g={0,-9.8};
equation
der(ball.velocity) = g;
end NearEarth;
model PassBall
FreeSpace free(ball.velocity={5,0},ball.position={0,10});
NearEarth near;
equation
connect(free.f,near.f);
end Equation;
おそらく私は非常に間違ったことをしているのかもしれませんが、これが私がいる場所です。(実際の問題では、FreeSpaceから継承するスペースを伝搬する電子パルスがありますが、それぞれに異なる力が作用しています。)提案は素晴らしいです!