Skip to content
Snippets Groups Projects
Commit 6ea5cdb1 authored by Hailu, Dawit's avatar Hailu, Dawit
Browse files

first feasible solution

parent 0f5b1196
Branches
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
...@@ -326,13 +326,19 @@ SCIP_DECL_RELAXINIT(relaxInitlagr) ...@@ -326,13 +326,19 @@ SCIP_DECL_RELAXINIT(relaxInitlagr)
SCIP_Real forcompare = -1000000000000000000; SCIP_Real forcompare = -1000000000000000000;
SCIP_CALL(SCIPstartClock(relaxscip,totaliteration)); SCIP_CALL(SCIPstartClock(relaxscip,totaliteration));
SCIP_Real* feasol; int* feasol;
SCIP_CALL(SCIPallocBufferArray(relaxscip,&feasol,nvars)); //will containt a feasible solution for our problem. SCIP_CALL(SCIPallocBufferArray(relaxscip,&feasol,nvars)); //will containt a feasible solution for our problem.
for(int v=0;v<nvars;v++) for(int v=0;v<nvars;v++)
{ {
feasol[v]=-1; //we assign initial values equal to -1, signifying that the variable's value hasn't been decided yet. feasol[v]=-1; //we assign initial values equal to -1, signifying that the variable's value hasn't been decided yet.
} }
for(int v=0;v<nvars;v++)
{
printf(" %d ",feasol[v]);
}
int* nvarsingoodconss; int* nvarsingoodconss;
SCIP_CALL(SCIPallocBufferArray(relaxscip,&nvarsingoodconss,SCIPgetNConss(relaxscip))); //will contain {9,9,9,9,9,9} for the 6f4s problem. SCIP_CALL(SCIPallocBufferArray(relaxscip,&nvarsingoodconss,SCIPgetNConss(relaxscip))); //will contain {9,9,9,9,9,9} for the 6f4s problem.
......
row and column identified in (sec) : 0.000258 row and column identified in (sec) : 0.000100
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment