Search found 5 matches

by bw0717
1 month ago
Forum: Syntax
Topic: The problem of equations
Replies: 1
Views: 593

The problem of equations

assign_employee(j, t).. sum(i, x(i, j, t)) =e= 1; How do I get Vacation, noassignment not to be bound as well =1 Set i 'employees' / zhu, tsai, xu, lu, chen, wang / j 'workstation' / zone1, zone2, zone3, zone4, vacation, noassignment / t 'days'/1*10/ work_zone / zone1, zone2, zone3, zone4/; $onImpl...
by bw0717
11 months ago
Forum: Modeling
Topic: Shortest Path Issue
Replies: 1
Views: 2213

Shortest Path Issue

I want to find the shortest path from point A to point G No repetition, no turning back image.png A B C D E F G A 8 6 B 5 10 C 6 9 D 10 E 7 F 11 G or A.B 8 A.C 6 B.D 5 B.E 10 C.D 6 C.F 9 D.G 10 E.G 7 F.G 11 I don't know how to write variables and equations. Can anyone provide me with a sample?
by bw0717
1 year ago
Forum: Modeling
Topic: HELP!Questions about linear planning
Replies: 3
Views: 1620

Re: HELP!Questions about linear planning

Thank you very much to the people who helped me. The problem has largely been solved. But there are still some small problems to be improved. equations obj 'Cost summary' Nutrition1(j) 'Identify foods from the matrix that meet the nutritional requirements' Nutrition2 'Upper limit of saturated fat' W...
by bw0717
1 year ago
Forum: Modeling
Topic: HELP!Questions about linear planning
Replies: 3
Views: 1620

Re: HELP!Questions about linear planning

I added some notes and changed some practices
Using mip, I still can't get the results I expect
GAMS.rar
(24.31 KiB) Downloaded 61 times
by bw0717
1 year ago
Forum: Modeling
Topic: HELP!Questions about linear planning
Replies: 3
Views: 1620

HELP!Questions about linear planning

HELP! I have two questions. This is a question about daily nutrient. 1.When you can only choose to eat one item a day, what do you need to eat to satisfy your nutrition? 2.When you have to eat three different foods every day, how do you choose to meet your nutritional needs? *Saturated fat no more t...