Skip to content

Commit

Permalink
adding min_thrust L2 norm contraint, renaming constant param
Browse files Browse the repository at this point in the history
  • Loading branch information
hhijazi committed Jan 11, 2024
1 parent fc3c19b commit 0ef5841
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/Optimization/MILP/SpaceTraffic/Sensor_Assign.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ int main(int argc, const char * argv[]) {
bool add_impulse_max = false;
if(add_impulse_max){
int max_nb = 2; /*< max number of thrust impulses */
double min_thrust = 200; /*< minimum thrust applied if impulse binary is one (using L2 norm on (ux,uy,uz)*/
double min_th = 200; /*< minimum thrust applied if impulse binary is one (using L2 norm on (ux,uy,uz)*/
Mopt.add(b.in(T));

Constraint<> thrust_on_off_ux("thrust_on_off_ux");
Expand Down Expand Up @@ -101,7 +101,7 @@ int main(int argc, const char * argv[]) {
Mopt.add(max_impulses <= 0);

Constraint<> min_thrust("min_thrust");
min_thrust = ux*ux + uy*uy + uz*uz - min_thrust*min_thrust;
min_thrust = ux*ux + uy*uy + uz*uz - min_th*min_th;
Mopt.add(min_thrust.in(T) >= 0);


Expand Down

0 comments on commit 0ef5841

Please sign in to comment.