Closed narjad closed 8 years ago
Hello,
To retreive the solution for one variable we use the following piece of code as explained in the tutorial:
... output = sddp(lattice,settings) ; lattice = output.lattice; path = ... [~,~,~,solution] = forwardPass(lattice, path, settings); xVal = lattice.getPrimalSolution(var.x, solution);
Actually we want to retreive the wait and see solution, so we tried:
[~,~,solution_WS] = waitAndSee(lattice, path, settings); xValWS = lattice.getPrimalSolution(var.p, solution_WS) ;
but it raises the following error:
Error using NldsModel/updatePrimalSolution (line 221) solution should be a struct() with field primal Error in Lattice/getPrimalSolution (line 441) primalSolution = model.updatePrimalSolution(primalSolution, variable, solutionForward{t}) ;
if we inspect each structure for example we see:
>> solution{1} ans = primal: [88x1 double] trials: [44x1 double] costWithTheta: 4.3620e+05 costWithoutTheta: 4.3061e+04 dualCntr: [383x1 double] dualCuts: 1 >> solution_WS{1} ans = x: [88x1 double] xTrial: [44x1 double] costWithoutTheta: 4.3061e+04
Is it correct to rename these fields in /fast/src/auxprobs/waitAndSee.m line 132 and 133 ?
/fast/src/auxprobs/waitAndSee.m
Best,
Arnaud
Yep, it is. Would be more consistent. I just fixed it in the last commit (84b2c3d646652cbadcf4698f9ef52965759cd8b9)
Leopold
Hello,
To retreive the solution for one variable we use the following piece of code as explained in the tutorial:
Actually we want to retreive the wait and see solution, so we tried:
but it raises the following error:
if we inspect each structure for example we see:
Is it correct to rename these fields in
/fast/src/auxprobs/waitAndSee.m
line 132 and 133 ?Best,
Arnaud