cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Liniar and Non-Liniar Programming

MN_10921447
4-Participant

Liniar and Non-Liniar Programming

Hello, Again.
Im trying to optimize a couple systems,one liniar and two others non-liniar.
Right now i have a liniar programming problem with 7 decision variables and variables and 3 restraints, how ever i have no idea how to implement a simplex algorithm. Tried using the solve block but i failed

MN_10921447_0-1705690581371.png

 

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:MN_10921447)

You forgot to provide the objective function. When you use "minimize" you sure have to tell Prime what you want to be minimized.

As an example I assumed that you want the expression you tried to evaluate at the top of the solve block to be minimized.

So define that expression as a function of the seven variables and use it as the first argument in minimize(f,...).

Werner_E_0-1705694773676.png

In case you want all values to be positive, you would have to add this as a constraint:

Werner_E_1-1705694891020.png

There still are some negative values in the solution but they are very close to zero. See it as numerical inaccuracies.

In case this is not acceptable, you can "weight" the condition by demanding that, lets say 1000 times the values must be greater than zero

Werner_E_2-1705695037493.png

 

Concerning the algorithm used there is not much documentation but Prime sure does not make use of the simplex method.

Only reference to the algorithms used is a small chapter in the help: https://support.ptc.com/help/mathcad/r9.0/en/#page/PTC_Mathcad_Help/solvers_from_KNITRO.html

 

View solution in original post

2 REPLIES 2
Werner_E
25-Diamond I
(To:MN_10921447)

You forgot to provide the objective function. When you use "minimize" you sure have to tell Prime what you want to be minimized.

As an example I assumed that you want the expression you tried to evaluate at the top of the solve block to be minimized.

So define that expression as a function of the seven variables and use it as the first argument in minimize(f,...).

Werner_E_0-1705694773676.png

In case you want all values to be positive, you would have to add this as a constraint:

Werner_E_1-1705694891020.png

There still are some negative values in the solution but they are very close to zero. See it as numerical inaccuracies.

In case this is not acceptable, you can "weight" the condition by demanding that, lets say 1000 times the values must be greater than zero

Werner_E_2-1705695037493.png

 

Concerning the algorithm used there is not much documentation but Prime sure does not make use of the simplex method.

Only reference to the algorithms used is a small chapter in the help: https://support.ptc.com/help/mathcad/r9.0/en/#page/PTC_Mathcad_Help/solvers_from_KNITRO.html

 

MN_10921447
4-Participant
(To:Werner_E)

Thank you for the response, i will try it out tomorrow in the morning and get back to this forum with whatever hurdle i come across with the non-liniar problems

Announcements

Top Tags