<div dir="ltr">I am working on Loops.<br><br>What I want to do is if there is a loop like this<br><span style="font-family:verdana,sans-serif"><br>for(int i=0;i<n;i++)<br>{<br>    s1;<br>    s2;<br>    s3;<br>}</span><br><br>I want to split it into two<br><br><span style="font-family:monospace,monospace">for(int i=0;i<n1;i++) //loop1<br>{<br>    s1;<br>    s2;<br>    s3;<br>}<br>for(int i=n1;i<n;i++) //loop2 <br>{<br>    s1;<br>    s2;<br>    s3;<br>}<br></span><br>but while creating loop2 when I am trying to add s1 of loop2 I am getting an error.<br><span style="color:rgb(0,0,0)"><b><br>[Thread-3] ERROR heros.solver.CountingThreadPoolExecutor - Worker thread execution failed: Chain already contains object.<br>java.lang.RuntimeException: Chain already contains object.</b><br></span><br><br>Can you please help me resolve this issue?<br>I am getting an idea that I have to create new Unit to replace but how should I create a new Unit from the old one.<br><br>Thanks,<br>--Nikhil</div>