NYUGraphics / GM_Assignment_4

0 stars 0 forks source link

Difference between soft constraints and hard constraints #1

Open Bushite opened 6 years ago

Bushite commented 6 years ago

Hi,

I am still not sure about the difference between soft constraints and hard constraints.

What is the common way to solve a linear system with hard constraints? Will the result be different from the result with soft constraints?

danielepanozzo commented 6 years ago

Hi Boran,

there are two ways:

  1. Lagrange multipliers: https://en.wikipedia.org/wiki/Lagrange_multiplier
  2. Variables elimination: https://cs.nyu.edu/%7Epanozzo/gp18/Assignment4.pdf (look for Equality Constraints, sorry for the broken link in the website page)

I recommend 2 since it makes the system smaller (and thus faster) to solve, but both are valid and will produce the same result.

Bushite commented 6 years ago

Thanks! What about their difference?

danielepanozzo commented 6 years ago

Difference between soft and hard constraints? Soft means that the constraint violation is added to energy (usually using L2 norm, i.e. summing the square of the residual to the energy) and it will thus be only partially satisfied, while hard means that you are forcing the constraint to be exactly satisfied (and you do not sum it to the energy).

Bushite commented 6 years ago

My result for hard constraints is exactly the same as that of soft constraints. Is that correct? @danielepanozzo

jiangzhongshi commented 6 years ago

Hi Boran,

Can you dump directly the values at constraints and see if they are the same (when setting, after soft solve, and your solve)

You can also try to add more nonsmooth constraints where soft solver would fail. On Thu, Mar 29, 2018 at 11:00 PM Boran Wen notifications@github.com wrote:

My result for hard constraints is exactly the same as that of soft constraints. Is that correct? @danielepanozzo https://github.com/danielepanozzo

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NYUGeometricModeling/GM_Assignment_4/issues/1#issuecomment-377432276, or mute the thread https://github.com/notifications/unsubscribe-auth/AMKxFwdcp-DcrjySwDXT2sIpvesnJR0Oks5tjZ-vgaJpZM4S8OHg .