convexengineering / SPaircraft

Models for commercial aircraft design
http://spaircraft.readthedocs.org
25 stars 17 forks source link

fully integrated model only solves in debug mode #27

Closed mayork closed 7 years ago

mayork commented 7 years ago

unsure of why this is, needs to be solved ASAP. It appears no variables are at the bound and no constants are relaxed.

bqpd commented 7 years ago

What part of debug does it need; the Bounded constraintset or the Relaxed constraintset?

mayork commented 7 years ago

well...at the optimal point nothing is at the bound and the relax values are all 1...

bqpd commented 7 years ago

Right, but we already know that something's going on because it doesn't solve without debug, so if you try just Bounding it instead of using debug we can see if that's the necessary component.

mayork commented 7 years ago

I edited my local debug as shown below and it solves, so I think it only needs relaxed constants right?

        if self.substitutions:
            constsrelaxed = ConstantsRelaxed(self)
            feas = Model(constsrelaxed.relaxvars.prod()**30 * self.cost,
                         constsrelaxed)
            # NOTE: It hasn't yet been seen but might be possible that
            #       the self.cost component above could cause infeasibility
        else:
            feas = Model(self.cost, self)
bqpd commented 7 years ago

Interesting! That would appear to be the case...

mayork commented 7 years ago

It seems like running debug the way I have it configured is like a penalty convex-concave procedure...thoughts? Since relax is 1 at the optimal point I think that I might actually be finding a valid solution we can trust.

@1ozturkbe

mayork commented 7 years ago

woody and ned think the relaxes constants is a valid solution method. I will write a precondition method to edit the model so we don't need to use debug and close the issue after pushing that.

1ozturkbe commented 7 years ago

Coolio, super down to get this issue resolved! Plus, @bqpd the implementation of constraint violation penalties in the solve I expect would resolve the issue where you get in a feasibility solve loop that never resolves. What do you think?

bqpd commented 7 years ago

I think it will 'resolve' that in the sense that it'll converge, but I think the convergent result will have relax variables with a value greater than one.

1ozturkbe commented 7 years ago

It is interesting that we have models that will never break out of the feasibility solve loop and will return UNKNOWN, but will give relax=1 when implemented with penalty functions. So the implementation does matter in this case; wouldn't you agree?

bqpd commented 7 years ago

Yeah, I'm thinking of changing the implementation, if it works for this with RelaxAllConstraints. Could save a bit of time, even.

mayork commented 7 years ago

I think this is solved by the relaxed constants method, closing the issue now but anyone can feel free to reopen if they disagree