Hi everyone
I’m trying to iteratively solve an optimisation problem in which most of the elements (e.g. objective function and constraints) remain the same over the iterations, but the constraint below needs to be updated with recent data,
@constraint(model, con, [Up; Uf] .== H*alpha)
where Uf and alpha are a 32- and a 40-elements variables, H is a 40x40 matrix and Up is an 8-element vector.
The problem that I’m solving requires that I update con to change the values of Hu and Up. Currently I’m simply deleting the constraint and adding it again with the updated values, but I imagine this isn’t efficient. I tried updating H using the approach suggested in the JuMP manual (as shown in the MWE below), but with no success.
What is the best approach to deal with this kind of constraint? The approach I’m currently using works, but I don’t believe deleting and recreating constraints is efficient. For context, I’m recent to Julia and I’ve been using matlab for years.
using JuMP, Ipopt
# Define data
H = [0.8285911616142245 0.9694396491365609 0.996852329094453 0.9474374188905399 0.8495658863289253 0.8150567337579983 0.8260950501765646 0.7772990625211669 0.7973177427014393 0.9945923412587303 0.8344606810190933 0.931870019332437 0.9071740895323583 0.9416046739798282 0.9740618842487063 0.9139442278758516 0.8663661450350677 0.9925961858840693 0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598;
0.9539970200614036 0.8594167420580591 0.8729573584147194 0.8525658050195425 0.8168659134775795 0.8886771634228199 0.8289103960032675 0.9564270324691854 0.8612823481061153 0.7654838670166808 0.9180474580264514 0.7961762292295225 0.8687389629392916 0.8365432531760428 0.9012583240971035 0.8200754543441915 0.9182587236776176 0.8574623560327377 0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411;
0.9694396491365609 0.996852329094453 0.9474374188905399 0.8495658863289253 0.8150567337579983 0.8260950501765646 0.7772990625211669 0.7973177427014393 0.9945923412587303 0.8344606810190933 0.931870019332437 0.9071740895323583 0.9416046739798282 0.9740618842487063 0.9139442278758516 0.8663661450350677 0.9925961858840693 0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996;
0.8594167420580591 0.8729573584147194 0.8525658050195425 0.8168659134775795 0.8886771634228199 0.8289103960032675 0.9564270324691854 0.8612823481061153 0.7654838670166808 0.9180474580264514 0.7961762292295225 0.8687389629392916 0.8365432531760428 0.9012583240971035 0.8200754543441915 0.9182587236776176 0.8574623560327377 0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509;
0.996852329094453 0.9474374188905399 0.8495658863289253 0.8150567337579983 0.8260950501765646 0.7772990625211669 0.7973177427014393 0.9945923412587303 0.8344606810190933 0.931870019332437 0.9071740895323583 0.9416046739798282 0.9740618842487063 0.9139442278758516 0.8663661450350677 0.9925961858840693 0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996 0.794756164381045;
0.8729573584147194 0.8525658050195425 0.8168659134775795 0.8886771634228199 0.8289103960032675 0.9564270324691854 0.8612823481061153 0.7654838670166808 0.9180474580264514 0.7961762292295225 0.8687389629392916 0.8365432531760428 0.9012583240971035 0.8200754543441915 0.9182587236776176 0.8574623560327377 0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509 0.8497012392917532;
0.9474374188905399 0.8495658863289253 0.8150567337579983 0.8260950501765646 0.7772990625211669 0.7973177427014393 0.9945923412587303 0.8344606810190933 0.931870019332437 0.9071740895323583 0.9416046739798282 0.9740618842487063 0.9139442278758516 0.8663661450350677 0.9925961858840693 0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996 0.794756164381045 0.7677226906095862;
0.8525658050195425 0.8168659134775795 0.8886771634228199 0.8289103960032675 0.9564270324691854 0.8612823481061153 0.7654838670166808 0.9180474580264514 0.7961762292295225 0.8687389629392916 0.8365432531760428 0.9012583240971035 0.8200754543441915 0.9182587236776176 0.8574623560327377 0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509 0.8497012392917532 0.9658652611753151;
0.8495658863289253 0.8150567337579983 0.8260950501765646 0.7772990625211669 0.7973177427014393 0.9945923412587303 0.8344606810190933 0.931870019332437 0.9071740895323583 0.9416046739798282 0.9740618842487063 0.9139442278758516 0.8663661450350677 0.9925961858840693 0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996 0.794756164381045 0.7677226906095862 0.7604051785110943;
0.8168659134775795 0.8886771634228199 0.8289103960032675 0.9564270324691854 0.8612823481061153 0.7654838670166808 0.9180474580264514 0.7961762292295225 0.8687389629392916 0.8365432531760428 0.9012583240971035 0.8200754543441915 0.9182587236776176 0.8574623560327377 0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509 0.8497012392917532 0.9658652611753151 0.7866559037938129;
0.8150567337579983 0.8260950501765646 0.7772990625211669 0.7973177427014393 0.9945923412587303 0.8344606810190933 0.931870019332437 0.9071740895323583 0.9416046739798282 0.9740618842487063 0.9139442278758516 0.8663661450350677 0.9925961858840693 0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996 0.794756164381045 0.7677226906095862 0.7604051785110943 0.9990283662633253;
0.8886771634228199 0.8289103960032675 0.9564270324691854 0.8612823481061153 0.7654838670166808 0.9180474580264514 0.7961762292295225 0.8687389629392916 0.8365432531760428 0.9012583240971035 0.8200754543441915 0.9182587236776176 0.8574623560327377 0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509 0.8497012392917532 0.9658652611753151 0.7866559037938129 0.9285886543912947;
0.8260950501765646 0.7772990625211669 0.7973177427014393 0.9945923412587303 0.8344606810190933 0.931870019332437 0.9071740895323583 0.9416046739798282 0.9740618842487063 0.9139442278758516 0.8663661450350677 0.9925961858840693 0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996 0.794756164381045 0.7677226906095862 0.7604051785110943 0.9990283662633253 0.9915596837444779;
0.8289103960032675 0.9564270324691854 0.8612823481061153 0.7654838670166808 0.9180474580264514 0.7961762292295225 0.8687389629392916 0.8365432531760428 0.9012583240971035 0.8200754543441915 0.9182587236776176 0.8574623560327377 0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509 0.8497012392917532 0.9658652611753151 0.7866559037938129 0.9285886543912947 0.9854275534977632;
0.7772990625211669 0.7973177427014393 0.9945923412587303 0.8344606810190933 0.931870019332437 0.9071740895323583 0.9416046739798282 0.9740618842487063 0.9139442278758516 0.8663661450350677 0.9925961858840693 0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996 0.794756164381045 0.7677226906095862 0.7604051785110943 0.9990283662633253 0.9915596837444779 0.8695763201938923;
0.9564270324691854 0.8612823481061153 0.7654838670166808 0.9180474580264514 0.7961762292295225 0.8687389629392916 0.8365432531760428 0.9012583240971035 0.8200754543441915 0.9182587236776176 0.8574623560327377 0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509 0.8497012392917532 0.9658652611753151 0.7866559037938129 0.9285886543912947 0.9854275534977632 0.9161052325816541;
0.7973177427014393 0.9945923412587303 0.8344606810190933 0.931870019332437 0.9071740895323583 0.9416046739798282 0.9740618842487063 0.9139442278758516 0.8663661450350677 0.9925961858840693 0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996 0.794756164381045 0.7677226906095862 0.7604051785110943 0.9990283662633253 0.9915596837444779 0.8695763201938923 0.8659216865657627;
0.8612823481061153 0.7654838670166808 0.9180474580264514 0.7961762292295225 0.8687389629392916 0.8365432531760428 0.9012583240971035 0.8200754543441915 0.9182587236776176 0.8574623560327377 0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509 0.8497012392917532 0.9658652611753151 0.7866559037938129 0.9285886543912947 0.9854275534977632 0.9161052325816541 0.8852443550169791;
0.9945923412587303 0.8344606810190933 0.931870019332437 0.9071740895323583 0.9416046739798282 0.9740618842487063 0.9139442278758516 0.8663661450350677 0.9925961858840693 0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996 0.794756164381045 0.7677226906095862 0.7604051785110943 0.9990283662633253 0.9915596837444779 0.8695763201938923 0.8659216865657627 0.868862755449324;
0.7654838670166808 0.9180474580264514 0.7961762292295225 0.8687389629392916 0.8365432531760428 0.9012583240971035 0.8200754543441915 0.9182587236776176 0.8574623560327377 0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509 0.8497012392917532 0.9658652611753151 0.7866559037938129 0.9285886543912947 0.9854275534977632 0.9161052325816541 0.8852443550169791 0.8931468436763589;
0.8344606810190933 0.931870019332437 0.9071740895323583 0.9416046739798282 0.9740618842487063 0.9139442278758516 0.8663661450350677 0.9925961858840693 0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996 0.794756164381045 0.7677226906095862 0.7604051785110943 0.9990283662633253 0.9915596837444779 0.8695763201938923 0.8659216865657627 0.868862755449324 0.9883561956306676;
0.9180474580264514 0.7961762292295225 0.8687389629392916 0.8365432531760428 0.9012583240971035 0.8200754543441915 0.9182587236776176 0.8574623560327377 0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509 0.8497012392917532 0.9658652611753151 0.7866559037938129 0.9285886543912947 0.9854275534977632 0.9161052325816541 0.8852443550169791 0.8931468436763589 0.8781365642130943;
0.931870019332437 0.9071740895323583 0.9416046739798282 0.9740618842487063 0.9139442278758516 0.8663661450350677 0.9925961858840693 0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996 0.794756164381045 0.7677226906095862 0.7604051785110943 0.9990283662633253 0.9915596837444779 0.8695763201938923 0.8659216865657627 0.868862755449324 0.9883561956306676 0.7952361023128759;
0.7961762292295225 0.8687389629392916 0.8365432531760428 0.9012583240971035 0.8200754543441915 0.9182587236776176 0.8574623560327377 0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509 0.8497012392917532 0.9658652611753151 0.7866559037938129 0.9285886543912947 0.9854275534977632 0.9161052325816541 0.8852443550169791 0.8931468436763589 0.8781365642130943 0.8548932902085405;
0.9071740895323583 0.9416046739798282 0.9740618842487063 0.9139442278758516 0.8663661450350677 0.9925961858840693 0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996 0.794756164381045 0.7677226906095862 0.7604051785110943 0.9990283662633253 0.9915596837444779 0.8695763201938923 0.8659216865657627 0.868862755449324 0.9883561956306676 0.7952361023128759 0.7660429807540107;
0.8687389629392916 0.8365432531760428 0.9012583240971035 0.8200754543441915 0.9182587236776176 0.8574623560327377 0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509 0.8497012392917532 0.9658652611753151 0.7866559037938129 0.9285886543912947 0.9854275534977632 0.9161052325816541 0.8852443550169791 0.8931468436763589 0.8781365642130943 0.8548932902085405 0.8944470652932451;
0.9416046739798282 0.9740618842487063 0.9139442278758516 0.8663661450350677 0.9925961858840693 0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996 0.794756164381045 0.7677226906095862 0.7604051785110943 0.9990283662633253 0.9915596837444779 0.8695763201938923 0.8659216865657627 0.868862755449324 0.9883561956306676 0.7952361023128759 0.7660429807540107 0.77896651943102;
0.8365432531760428 0.9012583240971035 0.8200754543441915 0.9182587236776176 0.8574623560327377 0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509 0.8497012392917532 0.9658652611753151 0.7866559037938129 0.9285886543912947 0.9854275534977632 0.9161052325816541 0.8852443550169791 0.8931468436763589 0.8781365642130943 0.8548932902085405 0.8944470652932451 0.7883231727220852;
0.9740618842487063 0.9139442278758516 0.8663661450350677 0.9925961858840693 0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996 0.794756164381045 0.7677226906095862 0.7604051785110943 0.9990283662633253 0.9915596837444779 0.8695763201938923 0.8659216865657627 0.868862755449324 0.9883561956306676 0.7952361023128759 0.7660429807540107 0.77896651943102 0.8369433798664419;
0.9012583240971035 0.8200754543441915 0.9182587236776176 0.8574623560327377 0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509 0.8497012392917532 0.9658652611753151 0.7866559037938129 0.9285886543912947 0.9854275534977632 0.9161052325816541 0.8852443550169791 0.8931468436763589 0.8781365642130943 0.8548932902085405 0.8944470652932451 0.7883231727220852 0.9042818935189274;
0.9139442278758516 0.8663661450350677 0.9925961858840693 0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996 0.794756164381045 0.7677226906095862 0.7604051785110943 0.9990283662633253 0.9915596837444779 0.8695763201938923 0.8659216865657627 0.868862755449324 0.9883561956306676 0.7952361023128759 0.7660429807540107 0.77896651943102 0.8369433798664419 0.8953794455524079;
0.8200754543441915 0.9182587236776176 0.8574623560327377 0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509 0.8497012392917532 0.9658652611753151 0.7866559037938129 0.9285886543912947 0.9854275534977632 0.9161052325816541 0.8852443550169791 0.8931468436763589 0.8781365642130943 0.8548932902085405 0.8944470652932451 0.7883231727220852 0.9042818935189274 0.9868174276620444;
0.8663661450350677 0.9925961858840693 0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996 0.794756164381045 0.7677226906095862 0.7604051785110943 0.9990283662633253 0.9915596837444779 0.8695763201938923 0.8659216865657627 0.868862755449324 0.9883561956306676 0.7952361023128759 0.7660429807540107 0.77896651943102 0.8369433798664419 0.8953794455524079 0.9925449686431893;
0.9182587236776176 0.8574623560327377 0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509 0.8497012392917532 0.9658652611753151 0.7866559037938129 0.9285886543912947 0.9854275534977632 0.9161052325816541 0.8852443550169791 0.8931468436763589 0.8781365642130943 0.8548932902085405 0.8944470652932451 0.7883231727220852 0.9042818935189274 0.9868174276620444 0.8140023455985446;
0.9925961858840693 0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996 0.794756164381045 0.7677226906095862 0.7604051785110943 0.9990283662633253 0.9915596837444779 0.8695763201938923 0.8659216865657627 0.868862755449324 0.9883561956306676 0.7952361023128759 0.7660429807540107 0.77896651943102 0.8369433798664419 0.8953794455524079 0.9925449686431893 0.7824420769757024;
0.8574623560327377 0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509 0.8497012392917532 0.9658652611753151 0.7866559037938129 0.9285886543912947 0.9854275534977632 0.9161052325816541 0.8852443550169791 0.8931468436763589 0.8781365642130943 0.8548932902085405 0.8944470652932451 0.7883231727220852 0.9042818935189274 0.9868174276620444 0.8140023455985446 0.8579485145032006;
0.9104695506113016 0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996 0.794756164381045 0.7677226906095862 0.7604051785110943 0.9990283662633253 0.9915596837444779 0.8695763201938923 0.8659216865657627 0.868862755449324 0.9883561956306676 0.7952361023128759 0.7660429807540107 0.77896651943102 0.8369433798664419 0.8953794455524079 0.9925449686431893 0.7824420769757024 0.8439499340776127;
0.8630148473758418 0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509 0.8497012392917532 0.9658652611753151 0.7866559037938129 0.9285886543912947 0.9854275534977632 0.9161052325816541 0.8852443550169791 0.8931468436763589 0.8781365642130943 0.8548932902085405 0.8944470652932451 0.7883231727220852 0.9042818935189274 0.9868174276620444 0.8140023455985446 0.8579485145032006 0.7678354128386425;
0.955626341337954 0.8905203035732796 0.9236729891592618 0.9231337398310591 0.8601964717750347 0.8940804578347381 0.8564549107390229 0.9370433932915307 0.9531399258646586 0.9129130002223945 0.8584933163821729 0.7794211846795046 0.9884906960557989 0.9810616877909453 0.8880263785776568 0.9364794022483661 0.8836993987284949 0.8963165954788619 0.8267954109061333 0.8914087646394822 0.7544235191129598 0.7795282536457996 0.794756164381045 0.7677226906095862 0.7604051785110943 0.9990283662633253 0.9915596837444779 0.8695763201938923 0.8659216865657627 0.868862755449324 0.9883561956306676 0.7952361023128759 0.7660429807540107 0.77896651943102 0.8369433798664419 0.8953794455524079 0.9925449686431893 0.7824420769757024 0.8439499340776127 0.8834607353171732;
0.9226412263866202 0.829190286369325 0.8582247457091453 0.7850996141145684 0.9210659955993652 0.8149424805471573 0.9936706127423657 0.9817343180288739 0.8098102709120388 0.9619507253979593 0.8056733382682834 0.8597996130713885 0.8836904797696481 0.9788983402943187 0.7624329108667968 0.7918710283473316 0.9112509606146643 0.8488369569819281 0.8311318732274775 0.8245328237769585 0.9299469955146411 0.8763313557580509 0.8497012392917532 0.9658652611753151 0.7866559037938129 0.9285886543912947 0.9854275534977632 0.9161052325816541 0.8852443550169791 0.8931468436763589 0.8781365642130943 0.8548932902085405 0.8944470652932451 0.7883231727220852 0.9042818935189274 0.9868174276620444 0.8140023455985446 0.8579485145032006 0.7678354128386425 0.8624293100949555]
Up = [0.9311195438007046; 0.9526382891718077; 0.9895185275976004; 0.7671660605112687; 0.758144332973139; 0.8699801876312837; 0.921090625605257; 0.9981662594972459]
# Cretae model
model = Model(Ipopt.Optimizer; add_bridges = false)
@variable(model, Uf[1:32])
@variable(model,alpha[1:40])
@constraint(model, con, [Up; Uf] .== H*alpha)
# Update H
H = 2*H
set_normalized_coefficient(con, alpha, H)